dokuwiki安装

DokuWiki System Requirements

1. Webserver supporting PHP

2. PHP version 5.3.3 or later

download:http://download.dokuwiki.org/

dokuwiki是不需要数据库支持的。

INstall:

CentOS

CentOS 7.x

 

Firewall Rules

Incoming traffic on port 80 may be blocked by default. If so, we must create a permanent firewall rule to accept incoming traffic to our DokuWiki website.

sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --reload	  
 sudo yum -y install firewall

Apache

Ensure apache service always starts on boot.

sudo systemctl enable httpd.service  
sudo yum -y install httpd

mod_rewrite must be enabled so the .htaccess file which locks down the /data directory can be executed.

Add the following 1 line to a new .conf file and restart apache to load the mod_rewrite module

echo LoadModule rewrite_module modules/mod_rewrite.so > /etc/httpd/conf.d/addModule-mod_rewrite.conf
sudo systemctl restart httpd.service
 

PHP GD Module Install

The PHP GD module must be installed for image resizing.

 sudo yum install php

sudo yum install php-gd
 

SELinux Note

CentOS comes with SELinux enabled by default which prevents the apache user from writing to the Document Root and sub directories.

Option 1 We will now modify SELinux to monitor apache in permissive mode. This allows apache to read/write to directories required by DokuWiki and maintains safety by not disabling SELinux.

sudo yum install policycoreutils-python
sudo semanage permissive -a httpd_t

Note:enable SELinux

Option 2 Modify context (conf & data directories)

sudo chcon -Rv --type=httpd_sys_rw_content_t /var/www/html/dokuwiki/conf
sudo chcon -Rv --type=httpd_sys_rw_content_t /var/www/html/dokuwiki/data

sudo semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/dokuwiki/conf
sudo semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/dokuwiki/data
sudo restorecon -v /var/www/html/dokuwiki/conf
sudo restorecon -v /var/www/html/dokuwiki/data

http://ip/dokuwiki/install.php

 与ldap账号集成:

以下提供centos,redhat配置:add conf/local.protected.php;其它os参考:https://www.dokuwiki.org/plugin:authldap:openldap

Enterprise IPA on Red Hat Enterprise Linux

conf/local.protected.php
<?php
/* OpenLDAP config - details: https://www.dokuwiki.org/plugin:authldap:openldap */
$conf['authtype'] = 'authldap';
$conf['superuser'] = '@wiki';
$conf['plugin']['authldap']['server'] = 'ldap://ipa.example.com:389';
$conf['plugin']['authldap']['usertree'] = 'cn=users,cn=accounts,dc=example,dc=com';
$conf['plugin']['authldap']['grouptree'] = 'cn=groups,cn=accounts,dc=example,dc=com';
$conf['plugin']['authldap']['userfilter'] = '(&(uid=%{user})(objectClass=posixAccount))';
$conf['plugin']['authldap']['groupfilter'] = '(&(member=%{dn})(objectClass=posixGroup))';
$conf['plugin']['authldap']['version'] = '3';
原文地址:https://www.cnblogs.com/nbuntu/p/5508629.html