dokuwiki

什麼是dokuwiki?

dokuwiki是一個基於GPLv2開源的wiki應用程式 由php寫成,支援Linux及BSD等許多作業系統

安裝dokuwiki

1.update ports tree

# portsnap fetch
# portsnap extract
# portsnap fetch update

2.Install Apache 2.4

# cd /usr/ports/www/apache24
# make install clean

註:dokuwiki不需要安裝MySQL

3.Install GCC 4.8

# cd /usr/ports/lang/gcc48
# make install clean

4.Install PHP 5.6

# cd /usr/ports/lang/php56
# make install clean

5.Install php56-gd

# cd /usr/ports/graphics/php56-gd
# make install clean

6.Install DokuWiki

# cd /usr/ports/www/dokuwiki
# make install clean

設定PHP

Install mod_php56

# cd /usr/ports/www/mod_php56
# make install clean

In/usr/local/etc/, there are two similar PHP configuration files -- php.ini-development and php.ini-production

// php.ini-development contains settings recommended for use in development environments

// php.ini-production contains settings recommended for use in production environments

# cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini

// For the server module versions of PHP, this file is loaded only once when the web server is started.

// For the CGI and CLI version, it happens on every invocation.


edit /usr/local/etc/php.ini

# vim /usr/local/etc/php.ini


此設定可參考
https://www.dokuwiki.org/install:php
https://secure.php.net/manual/en/ini.list.php

編輯完後記得

# rehash

設定apache

編輯/usr/local/etc/apache24/httpd.conf

ServerRoot “/usr/local”
ServerAdmin [email protected]
ServerName www.example.com:80
DocumentRoot “/usr/local/www/apache24/data”
LoadModule php5_module libexec/apache24/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php index.htm index.html

編輯/etc/rc.conf

# vim /etc/rc.conf

Add the following line to /etc/rc.conf

apache24_enable=“YES”

Launch Apache

# service apache24 start

Create a new test.php to test whether PHP was configured successfully or not

#  echo “<? phpinfo(); ?>” >> /usr/local/www/data/test.php

設定dokuwiki

# ln –s /usr/local/www/dokuwiki /usr/local/www/apache24/data/dokuwiki

You can also copy data to Apache

# cp /usr/local/www/dokuwiki /usr/local/www/apache24/data/dokuwiki

Change the privilege from root:wheel to www:www for Dokuwiki

# chown –R www:www /usr/local/www/dokuwiki

Open install.php by your browser