在 Ubuntu 上使用 DokuWiki 构建你自己的 wiki
1.环境信息
upsmart@ganglia:~cat /etc/issue
Ubuntu 16.04.5 LTS \n \l
upsmart@ganglia:~ uname -a
Linux ganglia 4.4.0-131-generic #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
安装Apache
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install apache2 -y
安装 PHP7 和模块
sudo apt-get install php7.0-fpm php7.0-cli php-apcu php7.0-gd php7.0-xml php7.0-curl php7.0-json php7.0-mcrypt php7.0-cgi php7.0 libapache2-mod-php7.0 -y
重启Apache,以便Apache注册PHP模块
sudo /etc/init.d/apache2 restart
安装DokuWiki
创建目录DokuWiki
mkdir -p /var/www/html/DokuWiki
下载dokuwiki项目包
cd /var/www/DokuWiki
sudo wget http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
解压dokuwiki项目包
sudo tar xvf dokuwiki-stable.tgz
sudo mv dokuwiki-2018-04-22b DokuWiki
sudo chown www-data. -R DokuWiki
配置 Apache
sudo vim /etc/apache2/sites-available/dokuwiki.conf
<VirtualHost 192.168.123.39:80>
ServerAdmin wikiadmin@thishosting.rocks
DocumentRoot /var/www/html/DokuWiki/
ServerName wiki.thishosting.rocks
ServerAlias www.wiki.thishosting.rocks
<Directory /var/www/DokuWiki/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/wiki.thishosting.rocks-error_log
CustomLog /var/log/apache2/wiki.thishosting.rocks-access_log common
</VirtualHost>
重启下服务
sudo /etc/init.d/apache2 restart
安装DokuWiki
访问下面连接安装
http://192.168.123.39/DokuWiki/install.php