1. 安装apache2、php5
sudo apt-get install apache2 php5
2. 下载dokuwiki,解压
cd /var/www sudo cp ~/download/dokuwiki-2011-05-25a.tgz ./ sudo tar -zxvf dokuwiki-2011-05-25a.tgz sudo mv dokuwiki-2011-05-25a dokuwiki
3. 设置权限
#data和conf目录需要写权限 cd dokuwiki sudo chown -R www-data:www-data data conf
5. 安全设置1,移动数据
#切换到目录/var/www/dokuwiki sudo mkdir /var/lib/dokuwiki sudo mv conf data bin /var/lib/dokuwiki sudo vi /var/lib/dokuwiki/conf/local.php #在末尾添加一行: $conf['savedir'] = '/var/lib/dokuwiki/data/'; sudo vi inc/preload.php #原本没有这个文件,写入以下内容 <?php define('DOKU_CONF','/var/lib/dokuwiki/conf/');
6. 安全设置2, 禁止用户访问http://127.0.0.1/dokuwiki/inc等目录
sudo vi /etc/apache2/sites-available/default 将 <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride none Order allow,deny allow from all </Directory> 改为 <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all </Directory> sudo service apache2 restart
ubuntu下安装dokuwiki
点赞
收藏