1)数据库
mysql -uroot -poldboy
create database wiki;
grant all on wiki.* to wiki@'localhost' identified by 'wiki';
flush privileges;
quit;
2)下载wiki
1、cd /application/nginx/html/wiki
2、wget http://kaiyuan.hudong.com/download/HDWiki-v5.1GBK-20141205.zip
3、unzip HDWiki-v5.1GBK-20141205.zip
4、
mv HDWiki-v5.1GBK-20121102/* .
mv hdwiki/* .
3)域名配置
1、vi /application/nginx/conf/nginx.conf
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
include extra/wiki.conf;
}
vi /application/nginx/conf/extra/wiki.conf
server {
listen 80;
server_name wiki.etiantian.org;
root html/wiki;
index index.php index.html index.htm;
access_log logs/wiki_access.log;
location ~ .*\.(php|php5)?$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}