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 {
    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) { 就可以跳過檢查了!!

此方法可用!

發佈了16 篇原創文章 · 獲贊 0 · 訪問量 7萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章