溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

Dokuwiki安裝 (linux)

發(fā)布時(shí)間:2020-03-01 05:20:33 來(lái)源:網(wǎng)絡(luò) 閱讀:591 作者:wx5c99da787fd83 欄目:建站服務(wù)器

Dokuwiki安裝 (linux)
一.簡(jiǎn)介
dokuwiki是一個(gè)開(kāi)源wiki引擎程序,運(yùn)行于PHP環(huán)境下。無(wú)需數(shù)據(jù)庫(kù)。Doku Wiki 程序小巧而功能強(qiáng)大、靈活,適合中小團(tuán)隊(duì)和個(gè)人網(wǎng)站知識(shí)庫(kù)的管理。
二.安裝步驟:
1.安裝前需要確保以下相依組件是否已經(jīng)安裝

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環(huán)境,故要先裝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服務(wù),故還需裝httpd

yum install httpd

systemctl start httpd

4.然后安裝dokuwiki,dokuwiki是沒(méi)有l(wèi)inux和Windows之分,所以安裝的時(shí)候可以自己下載下再導(dǎo)入虛擬機(jī)中,也可以直接執(zhí)行以下命令

#wget -c http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz //下載網(wǎng)站安裝壓縮包
#tar -zvxf dokuwiki-stable.tgz //解包解壓縮
#cp -r dokuwiki-2017-02-19e /var/www/html/wiki //復(fù)制解壓的網(wǎng)站源碼文件到網(wǎng)站根目錄

5.更改httpd.conf

vim /etc/httpd/conf/httpd.conf

將 DocumentRoot 目錄更改到第4步中的dokuwiki路徑下 默認(rèn)為/var/www/html
下面配置作用是對(duì)URL進(jìn)行過(guò)濾以保證數(shù)據(jù)安全

<LocationMatch "/(data|conf|bin|inc)/">

Order allow,deny

Deny from all

Satisfy All

</LocationMatch>

6.修改權(quán)限
根據(jù)httpd.conf 中下述兩個(gè)配置值進(jìn)行修改

User apache
Group apache

權(quán)限不修改會(huì)導(dǎo)致下面的訪問(wèn)頁(yè)面報(bào)錯(cuò)

#chown -R apache.apache /var/www/html/wiki//將文件所有者由root用戶(hù)
改為apache用戶(hù)

7.調(diào)整Apache mime設(shè)定,讓Apache 可以支援 PHP (/etc/mime.types ) ,在配置中加入

application/x-httpd-php php php4 phtml
application/x-httpd-php-source phps

重啟

systemctl restart httpd

8.關(guān)閉防火墻

 setenforce 0
 systemctl stop firewalld

9.訪問(wèn)網(wǎng)站ip/wiki/install.php

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI