安装前配置
1.nano /etc/portage/package.accept_keywords
=www-apps/dokuwiki-20150810a **
=www-servers/nginx-1.9.13 ~arm
2.nano /etc/portage/make.conf
USE="php"
NGINX_MODULES_HTTP="access browser charset empty_gif fastcgi gzip limit_conn limit_req map proxy realip referer scgi split_clients secure_link spdy ssi ssl upstream_hash upstream_ip_hash upstream_keepalive upstream_least_conn userid uwsgi"
PHP_TARGETS="php5-6"
PHP_INI_VERSION="production"
3.nano /etc/portage/package.use
www-servers/nginx NGINX_MODULES_HTTP: fastcgi
www-apps/dokuwiki vhosts
dev-lang/php frm nginx xmlreader xmlwriter berkdb bzip2 cgi cli crypt ctype curl force-cgi-redirect gdbm hash iconv intl ldap mysql ncurses nls pcre pic readline reflection session spl ssl zlib exif gd imap json pdo sockets soap suhosin wddx xml xmlrpc zip unicode
>=app-eselect/eselect-php-0.9.1 fmp
安装
USE="frm" emerge -v php
这里必须使用frm因为需要php-frm启动.
emerge -v ngxin
emerge -v www-apps/dokuwiki
`emerge -v webapp-config’
安装后配置
nginx 配置
nano /etc/vhosts/webapp-config
找到#vhost_server="nginx"
去掉#
安装dokuwiki
webapp-config -I dokuwiki 20150810a
nano /etc/nginx/nginx.conf
index doku.php,index.html;
server { 只是server部分,前面参看gentoo wiki.
listen 192.168.88.108;
server_name localhost;
access_log /var/log/nginx/localhost.access_log main;
error_log /var/log/nginx/localhost.error_log info;
root /var/www/localhost/htdocs/dokuwiki;
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi.conf;
fastcgi_pass unix:/run/php-fpm.socket;
}
location ~ /(data|conf|bin|inc)/ { #保护数据安全
deny all;
}
}
php-fpm设置
nano /etc/php/fpm-php5.6/php-fpm.conf
[global]
pid = run/php-fpm.pid
error_log = log/php-fpm.log
user = nginx
group = nginx
listen = /run/php-fpm.socket
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
pm.max_children = 5
pm.start_servers = 3
chdir = /var/www/localhost/htdocs/dokuwiki
nano /etc/php/fpm-php5.6/php.ini
date.timezone =<Asia/Shanghai>
设置dokuwiki权限
chown -R nginx:nginx /var/www/localhost/htdocs/dokuwiki
启动nginx php-fpm 服务
/etc/init.d/nginx start
/etc/init.d/php-fpm start
浏览器登入dokuwiki
在地址栏输入你的ip+install.php
`eg: 192.168.1.108/install.php
write by vastchen
2016.4.30