Linux(CentOS)安装dokuwiki

Dokuwiki作为一款wiki工具,有php实现,需要使用服务器来运行,因此需要配置一些环境。

安装环境:

Linux(CentOS)
PHP(包括相关的Json库以及Xml库)
Apache HTTP服务器

准备安装环境

安装php环境
Yum install php
Yum install php-json
Yum install php-json

安装apache http服务器

Yum install httpd
Httpd是apache在centos上的库

安装dokuwiki

https://download.dokuwiki.org/
将dokuwiki解压到apache http服务器的位置上
/var/www/html/dokuwiki

设置权限

chown -R apache:apache /var/www/html/dokuwiki

将“/var/www/html/dokuwiki”的用户和用户组设置为apache,通过Apache服务器访问的用户为Apache,为了保证服务器可以修改该目录下的数据

chmod -R 755 /var/www/html/dokuwik

设置用户修改权限

进入 /var/www/html/dokuwiki目录

 chmod -R 777 data/ 
 chmod -R 777 lib/ 
 chmod -R 777 conf/

编辑httpd.conf

nano /etc/httpd/conf/httpd.conf
在<Directory /var/www>.....后插入代码

<Directory /var/www/dokuwiki>
order deny,allow
allow from all
</Directory>

<LocationMatch "/(data|conf|bin|inc)/">
order allow,deny
deny from all
satisfy all
</LocationMatch>

开通端口

firewall-cmd --permanent --zone=public --add-service=http 
firewall-cmd --reload

关闭SELinux防火墙(如果资源无法访问)

临时关闭:setenforce 0
临时开启:setenforce 1

永久关闭:修改/etc/selinux/config
nano /etc/selinux/config
将SELINUX=enforcing 改为 SELINUX=disable
重启电脑

启动dokuwiki

systemctl enable httpd.service
Systemctl start httpd

访问wiki

http://IP/dokuwiki/install.php

设置和使用dokuwiki

https://www.dokuwiki.org/manual

posted @ 2022-08-19 19:49  LDnanchao  阅读(280)  评论(0编辑  收藏  举报