基于LNMP部署DiscuzX
[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
最新文章
- eval解析JSON中的注意点
- .eww
- zzuli-小火山的跳子游戏
- Android 获取渠道名称
- Qt之课外实践——文件操作(简单清道夫)
- Python 创建函数和代码重用
- JVM 性能调优实战之:一次系统性能瓶颈的寻找过程
- C++开发必看 四种强制类型转换的总结
- Qt 学习之路:坐标系统
- 马云收购UC你,至于到底是谁宣战
- HDU 2102 A计划 经典搜索
- 数据结构——Java实现单链表
- Linux(CentOS 7)安装测试mysql5.6服务
- xml错误之cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:annotation-driven'.
- Java第一、二次实训作业
- Java笔记Spring(九)
- MT【56】2017联赛一试解答最后一题:一道复数题的几何意义
- mysql 知识
- animate.css源码
- Knockout应用开发指南 应用举例(简单、高级)
热门文章
- python_模块 collections,random
- python面试题之docstring是什么?
- strings - 显示文件中的可打印字符
- html浮动小问题
- 微信小程序 封装接口
- Qt 【“QWebView/private/qwebview interface p.h”: No such file or directory】
- @Condition 条件化注册Bean
- JS时间差(毫秒/天数/月份)
- Java打war包or打jar包
- HDU 4866	 Shooting 题解:主席树