基本思路:先安裝好nginx和mysql和php,上傳禪道的源碼。把禪道的源碼包扔到 nginx/apache 的工程路徑內或者nginx/apache內的配置文件指向nginx的路徑,然后將nginx/apache做集成,然后再配數據庫,然后再瀏覽器內安裝禪道,過程中會執行建表的過程,然后再改禪道內的數據包內的配置文件,ip,端口號,數據庫名,用戶,密碼等,起服務的時候,才能ok
部署java項目也是一樣,把工程包扔到tomcat下而已,改工程包里面的數據庫屬性配置文件等。
一、部署安裝好Nginx
二、可以在apache內也可以做該配置,也就是在apache內配置禪道:
apache其實也是一樣,但是要改配置文件:
vi etc/httpd/conf/httpd.conf
改里面的禪道路徑
# DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/usr/local/zentaopms/www" #
重啟apache:
service httpd restart
然后輸入apache的ip:port/index.php,就可以開始安裝禪道
安裝禪道的問題:可能會遇見session.save_path不存在不可用的問題
1、先修改這三個文件的執行權限
chmod o=rwx -R /opt/zentaopms/tmp/ chmod o=rwx -R /opt/zentaopms/www/data chmod o=rwx -R /var/lib/php/session
2、改php.ini配置文件(改一個地方就ok,不要瞎改)
vi /etc/php.ini
; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. Note: Windows users have to change this ; variable in order to use PHP's session functions. ; ; The path can be defined as: ; ; session.save_path = "N;/path" session.save_path= "/var/lib/php/session" ; where N is an integer. Instead of storing all the session files in ; /path, what this will do is use subdirectories N-levels deep, and ; store the session data in those directories. This is useful if ; your OS has problems with many files in one directory, and is ; a more efficient layout for servers that handle many sessions.
可以看到:server是apache
圖,不小心刪了,假裝是吧
三、Nginx轉發php設置:
在配置文件內更改:
vi /usr/local/nginx/conf/nginx.conf
server { listen 82; server_name localhost; location / { root /usr/local/zentaopms/www/; index index.php index.html index.htm; } location ~ .php$ { root /usr/local/zentaopms/www/; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/zentaopms/www/$fastcgi_script_name; include fastcgi_params; } error_page 500 502 503 504 /50x.html; }
我的禪道源碼放在哪里?
在
/usr/local/zentaopms
將Nginx,reload一下
/usr/local/nginx/sbin/nginx -s reload
然后輸入Nginx的ip:port/index.php,就可以開始安裝禪道。
安裝過程順利,遇見這問題:
禪道專業版本的核心代碼都是加密的(前端的html, css, js, 配置,語言項是開源的。),使用的加密軟件是 ioncube,因此要能運行禪道專業版本的軟件,先要安裝ioncube擴展。OS:我為啥要作死安裝專業版的
禪道的介紹:https://www.zentao.net/book/zentaoprohelp/194.html
根據文檔說明
一、下載loader-wizard.php( 支持php5.3、php5.4、php5.5、php5.6、php7.0、php7.1版本)
ioncube提供了一個安裝的向導程序,可以非常方便的幫助檢測php的運行環境,自動給出提示。
1.1 通過下面的地址下載loader-wizard: http://www.ioncube.com/loader-wizard/loader-wizard.zip
1.2 下載之后,將其解壓縮,到apache的www或者htdoc目錄。(我們是部署在 nginx上,而且,我們也改了 81 的路徑 ,所以放到禪道 的路徑 www 下面就可以了)
二、運行loader-wizard.php程序
2.1 使用瀏覽器訪問loader-wizard.php 比如 http://localhost/loader-wizard.php 實際的訪問路徑根據情況修改。
2.2 這個loader程序經過計算之后,會自動給出提示( 下圖只是一個例子,具體操作需要根據貴公司網頁訪問 loader-wizard.php后顯示的界面操作):
根據提示,將 tar.gz 解壓放進 /usr/lib64/php/modules ,那些 .so 文件要賦予 x 權限
把 00……啥的放進 /etc/php.d 內
然后重啟 nginx和 php
就說明,這個解密軟件咱就ok了
再去看看,我們的 禪道首頁,感動到眼淚掉下來