您的位置:首页 > 运维架构 > Nginx

(8)安装wiki开源产品

2016-08-05 11:21 417 查看
1)数据库
mysql -uroot -poldboy
create database wiki;
grant all on wiki.* to wiki@'localhost' identified by 'wiki';
flush privileges;
quit;

2)下载wiki
http://kaiyuan.baike.com/

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;
        }
    }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  l nginx