DiscuzX 安装:
系统环境 : linux
系统架构 : 最前端两台Nginx 使用Keepalived 来实现 高可用和负载均衡 然后使用这两台Nginx 来发布后端的多个应用,后端包括 Tomcat 和 PHP 环境
软件环境 : Nginx --> (Nginx + PHP)--> Mysql
第一个Nginx 作为前端, Nginx + PHP 的环境用来 安装 DiscuzX 使用Nginx 替代 Apache 最后端的数据仓库使用的Mysql
前端Nginx 配置:
vim /app/nginx/conf.d/bbs.test.com
server {
listen 80;
server_name bbs.test.com;
location ~* {
proxy_pass http://172.16.80.21:80;
proxy_set_header Host bbs.test.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
log_format bbslogs '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log logs/bbslog.log bbslogs;
}
Nginx + PHP 配置
vim /app/nginx/conf.d/bbs.test.com
server {
listen 80;
server_name bbs.test.com;
index index.html index.htm index.php;
root /app/bbs.test.com/;
rewrite /$ /forum.php last;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
PHP 的安装请参考我的另一篇博客:http://blog.csdn.net/moguibeijing/article/details/10974033
其中论坛系统安装和PHP环境安装在其中一台主机
1. DiscuzX 程序 1.0、 1.5、 2.0、 2.5、3.0Beta
1)备份数据库
2)建立文件夹 old,旧程序除了 data , config, uc_client, uc_server 目录以外的程序移动进入 old目录中
3) 上传 3.0 RC程序(压缩包中 upload 目录中的文件)
4)上传安装包 utility 目录中的 update.php 到论坛 install 目录,删除 install 目录中的index.php
执行 http://你的域名/论坛路径/install/update.php
参照提示进行升级即可。升级时间随着数据的大小和服务器性能而变, 依据测试,10G左右的论坛,从 2.5 升级值 3.0 大约需 1.5-2.5 个小时。如果你的版本更老一些,升级的时间消耗的会更多些。
升级完毕,进入后台,更新缓存,并测试功能。最后,你可以将old目录中所需要的东西移动回来
后台路径:http://192.168.1.1/admin.php?
本人在从2.0平台升级3.0平台是遇到提示:请先升级 UCenter 到 1.6.0 以上版本。
如果使用为Discuz! X自带UCenter,请先下载 UCenter 1.6.0, 在 utilities 目录下找到对应的升级程序,复制或上传到 Discuz! X 的 uc_server 目录下,运行该程序进行升级
这个提示是在合成DZ+UC版遇到的,
问题解决帖:
应用帖子:http://www.discuz.net/forum.php?mod=viewthread&tid=2744425
方法:
第一、http://你的域名/install/update.php?step=prepare 直接输入
第二、在updata.php文件中 查找代码 if(version_compare($version, '1.5.2') <= 0) { 将代码修改为:if(version_compare($version, '1.5.2') >= 0) { 就可以跳过检查了!!
此方法可用!