curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
yum install net-tools -y
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
yum -y install httpd
yum -y wget
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
wget -c http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
tar -zvxf dokuwiki-stable.tgz
cp -r dokuwiki-2018-04-22b/. /var/www/html
chown -R apache:apache /var/www/html
启动httpd并设置开机启动
service httpd start
systemctl enable httpd
关闭selinux
vi /etc/selinux/config
将 SELINUX=enforcing 修改为 SELINUX=disabled
firewall-cmd --zone=public --add-port=80/tcp –permanent
firewall-cmd --reload
访问网页安装
http://IP或者域名
配置完成后删除install.php
rm install.php
vi /etc/httpd/conf/httpd.conf
Servicename wiki.vip56.cn
service httpd restart
原文:https://www.cnblogs.com/yaozhenfa/p/13679755.html