Dokuwiki安裝 (linux)

Dokuwiki安裝 (linux)
一.簡介
dokuwiki是一個開源wiki引擎程序,運行於PHP環境下。無需數據庫。Doku Wiki 程序小巧而功能強大、靈活,適合中小團隊和我的網站知識庫的管理。
二.安裝步驟:
1.安裝前須要確保如下相依組件是否已經安裝php

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環境,故要先裝PHPhtml

# 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

成功了。mysql

# 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服務,故還需裝httpdlinux

yum install httpd

systemctl start httpd

4.而後安裝dokuwiki,dokuwiki是沒有linux和Windows之分,因此安裝的時候能夠本身下載下再導入虛擬機中,也能夠直接執行如下命令c++

#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.confsql

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 中下述兩個配置值進行修改apache

User apache
Group apache

權限不修改會致使下面的訪問頁面報錯vim

#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

相關文章
相關標籤/搜索