OpenCMS部署流程及部署過程中遇到問題的解決方案

來源:互聯網
上載者:User

1.OpenCms伺服器安裝步驟

1.1安裝Java的JDK,需要1.5或者更新版本;

1.2安裝Tomcat;

1.3安裝MySQL;

1.4下載war包,部署opencms.war包;

1.5通過瀏覽器訪問http://localhost:8080/opencms/setup/地址,按照提示步驟配置就可以;

具體步驟可以官方地址參考:http://www.opencms.org/en/development/installation/server.html,有詳細流程

2.1.5的配置中由於MySQL預設的配置max_allowed_packet小於OpenCMS要求的16M值會出現如下錯誤:

註:max_allowed_packet參數是在mysql4以後才有的,在mysql4以前版本,還沒有這個參數 

在安裝opencms是會出現如下錯誤:

MySQL system variable 'max_allowed_packet' is set to 1048576 Byte (1MB).
Please note that it will not be possible for OpenCms to handle files bigger than this value in the VFS.
Error while checking the server configuration!
-------------------------------------------
Your 'max_allowed_packet' variable is set to less than 16777216 Byte (16MB).
The required value for running OpenCms is at least 16MB.Please change your MySQL configuration (in the my.ini or my.cnf file).

解決該問題的辦法:

1.可以通過MySQLWorkbench-Server Status查看到Configuration File:/etc/my.cnf設定檔位置,但是去尋找時並沒有該檔案,說明安裝MySQL時並沒有產生;

2.通過MySQL的命令尋找my.cnf的位置,均沒有找到my.cnf檔案;

localhost:~ apple$ /usr/local/mysql-5.7.17-macos10.12-x86_64/bin/mysql --help | grep my.cnf

                      order of preference, my.cnf, $MYSQL_TCP_PORT,

/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf 

3.後來度娘搜尋參考http://blog.csdn.net/u013679882/article/details/52919874地址發現可以修改my-default.cnf檔案,然後改為my.cnf複製到/etc下面既可以 在/usr/local/mysql/support-files下有一個my-default.cnf,只要把這個檔案複製到/etc/下,再改名就好了

3.1編輯檔案步驟vi /etc/my.cnf 

3.2插入max_allowed_packet=100M,該值大於等於16M即可

3.3按下Esc然後按:wq儲存即可

3.4需要關閉MySQL重新啟動MySQL設定的值才會生效


需要瞭解更多安裝細節可以參考:http://www.tuicool.com/articles/Rz2Uj2I


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.