标签:php -v art nload 虚拟 mcrypt table fir emctl gcc-c++
Dokuwiki安装 (linux)yum install gcc-c++
yum install make
yum install expat-devel
yum install perl
yum install curl-devel
yum install libxml2-devel
yum install libjpeg-devel
yum install libpng-devel
yum install freetype-devel
2.由于dokuwiki需要PHP环境,故要先装PHP
# yum install epel-release
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
# 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 -v
PHP 5.6.40 (cli) (built: Jul 3 2019 06:59:29)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
3.dokuwiki还需要Apache服务,故还需装httpd
yum install httpd
systemctl start httpd
4.然后安装dokuwiki,dokuwiki是没有linux和Windows之分,所以安装的时候可以自己下载下再导入虚拟机中,也可以直接执行以下命令
#wget -c http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz //下载网站安装压缩包
#tar -zvxf dokuwiki-stable.tgz //解包解压缩
#cp -r dokuwiki-2017-02-19e /var/www/html/wiki //复制解压的网站源码文件到网站根目录
5.更改httpd.conf
vim /etc/httpd/conf/httpd.conf
将 DocumentRoot 目录更改到第4步中的dokuwiki路径下 默认为/var/www/html
下面配置作用是对URL进行过滤以保证数据安全
<LocationMatch "/(data|conf|bin|inc)/">
Order allow,deny
Deny from all
Satisfy All
</LocationMatch>
6.修改权限
根据httpd.conf 中下述两个配置值进行修改
User apache
Group apache
权限不修改会导致下面的访问页面报错
#chown -R apache.apache /var/www/html/wiki//将文件所有者由root用户
改为apache用户
7.调整Apache mime设定,让Apache 可以支援 PHP (/etc/mime.types ) ,在配置中加入
application/x-httpd-php php php4 phtml
application/x-httpd-php-source phps
重启
systemctl restart httpd
8.关闭防火墙
setenforce 0
systemctl stop firewalld
9.访问网站ip/wiki/install.php
标签:php -v art nload 虚拟 mcrypt table fir emctl gcc-c++
原文地址:https://blog.51cto.com/14259167/2420950