一、 CentOS设置
1. 更换阿里源
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
2. 安装网络工具
yum install net-tools -y
3. 使用阿里NTP服务
yum install chrony -y
sed -i "/server/d" /etc/chrony.conf
vi /etc/chrony.conf #增加 server ntp.aliyun.com iburst
systemctl restart chronyd
chronyc tracking
二、安装Dokuwiki
1.安装依赖
yum -y install httpd
yum -y wget
2. 安装PHP 5.6
yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof
php --version
3. 下载并解压
wget -c http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
tar -zvxf dokuwiki-stable.tgz
4. 移动到apache文件夹
cp -r dokuwiki-2018-04-22b/. /var/www/html
5. 修改执行用户组
chown -R apache:apache /var/www/html
启动httpd并设置开机启动
service httpd start
systemctl enable httpd
关闭selinux
vi /etc/selinux/config
将 SELINUX=enforcing 修改为 SELINUX=disabled
6. 打开防火墙
firewall-cmd --zone=public --add-port=80/tcp –permanent
firewall-cmd --reload
访问网页安装
http://IP或者域名
配置完成后删除install.php
rm install.php
三、配置域名访问
1. 打开并编辑
vi /etc/httpd/conf/httpd.conf
Servicename wiki.vip56.cn
service httpd restart
来源:oschina
链接:https://my.oschina.net/u/4385595/blog/4586428