apache+dokuwiki

先做准备工作

yum -y install epel-release
#安装php7的yum源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
#安装php7 
yum erase php* 
yum -y install php*
yum -y install php70w-mysql php70w-xml php70w-soap php70w-xmlrpc php70w-mbstring php70w-json php70w-gd php70w-mcrypt
#php -v查看版本 要5.6以上才行

参考官网配置 https://www.dokuwiki.org/install:apache

echo “

AliasMatch ^/dokuwiki/sites/[^/]+$      /usr/share/dokuwiki/
AliasMatch ^/dokuwiki/sites/[^/]+/(.*)$ /usr/share/dokuwiki/$1
Alias      /dokuwiki                    /usr/share/dokuwiki/


Options +FollowSymLinks
require all granted
##VER APACHE2.4
	#Allow from localhost 127.0.0.1 ::1

        

                # Uncomment to implement server-side URL rewriting
                # (cf. ).
                        # Do *not* mix that with multisite!
                #RewriteEngine on
                #RewriteBase /dokuwiki
                #RewriteRule ^lib                      - [L]
                #RewriteRule ^doku.php                 - [L]
                #RewriteRule ^feed.php                 - [L]
                #RewriteRule ^install.php              - [L]                
                #RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L]
                #RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1 [QSA,L]
                #RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2 [QSA,L]
                #RewriteRule ^$                        doku.php  [L]
                #RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
        



        Require all denied
        ##FOR VER APACHE2.4



        Require all denied
        ##FOR VER APACHE2.4

” >> /etc/dokuwiki/apache.conf

下载安装包 放到正确的地方

https://download.dokuwiki.org/

tar zxvf dokuwiki...tgz -C /var/www/html

vim /etc/httpd/conf #更改配置文件

改 DocumentRoot "/var/www/html"

#重启httpd服务

systemctl restart httpd.servise

在浏览器里输入 $IP/dokuwiki/install.php

填写安装表单 完成后点保存

apache+dokuwiki_第1张图片

删除install.php 重新进入网页 $IP/dokuwiki/就可以搭建你自己的wiki知识库啦

apache+dokuwiki_第2张图片

你可能感兴趣的:(linux运维)