DiscuzX 論壇安裝升級

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{
listen80;
server_namebbs.test.com;

location~*{
proxy_passhttp://172.16.80.21:80;
proxy_set_headerHostbbs.test.com;
proxy_set_headerX-Real-IP$remote_addr;
proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;
}

log_formatbbslogs'$remote_addr-$remote_user[$time_local]"$request"'
'$status$body_bytes_sent"$http_referer"'
'"$http_user_agent"$http_x_forwarded_for';
access_loglogs/bbslog.logbbslogs;
}

Nginx+PHP配置

vim/app/nginx/conf.d/bbs.test.com

server{
listen80;
server_namebbs.test.com;
indexindex.htmlindex.htmindex.php;
root/app/bbs.test.com/;
rewrite/$/forum.phplast;

error_page404/404.html;
error_page500502503504/50x.html;
location=/50x.html{
roothtml;
}

location~\.php${
fastcgi_pass127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
includefastcgi_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.0RC程序(壓縮包中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,請先下載UCenter1.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){就可以跳過檢查了!!

此方法可用!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章