[root@nginx~]# unzip ComsenzDiscuz-DiscuzX-master.zip
[root@nginxDiscuzX]# mv upload/ /usr/local/nginx/html/bbs
[root@nginx~]# cd /usr/local/nginx/html/bbs/config/
[root@nginxconfig]# cp config_global_default.php config_global.php
[root@nginxconfig]# cp config_ucenter_default.php config_ucenter.php
[root@nginx~]# cd /usr/local/nginx/html/bbs
[root@nginxbbs]#chmod -R 777 config/ data/ uc_client/ uc_server/
[root@nginx~]#mysql -uroot -p123456
mysql> create database bbs;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on bbs.* to 'bbs'@'localhost' identified by 'bbs123456';
Query OK, 0 rows affected, 1 warning (0.07 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

[root@nginx~]# vim /usr/local/nginx/conf/nginx.conf
user nginx nginx;
worker_processes 2;
error_log logs/error.log;
pid logs/nginx.pid;
worker_rlimit_nofile 102400;

events {
use epoll;
worker_connections 4096;
}

http {
include mime.types;
default_type application/octet-stream;
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;
sendfile on;
keepalive_timeout 65;

server {
listen 80;
server_name localhost;
charset utf-8;

location / {
root html/bbs;
index index.php index.html index.htm;
}

location ~ \.php$ {
root html/bbs;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}

location /status {
stub_status on;
access_log off;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
[root@nginxetc]#killall -HUP nginx

浏览器访问http://192.168.200.111

05-22 05:10