1.安裝apache2 $sudo apt-get install apache2
2.為避免和nginx 80沖突,apache2的啟動(dòng)端口改為60080。修改 vim/etc/apache2/ports.conf //或者改為其它端口,不重復(fù)行。
NameVirtualHost *:60080
Listen 60080
3.修改完成后重啟apache2. $sudo service apache2 restart
4.安裝php5。 $sudo apt-get install php5 libapache2-mod-php5
5. 安裝mysql apt-get install mysql-server
安裝php5-mysql。$ sudo apt-get install -y php5-mysql
//安裝這個(gè)是為了將php和mysql連接起來(lái)。
netstat -tap | grep mysql //檢查mysql服務(wù)是否運(yùn)行
/etc/init.d/mysql restart //啟動(dòng)mysql服務(wù)
6.下載并解壓禪道:
curl -L http://sourceforge.net/projects/zentao/files/6.4/ZenTaoPMS.6.4.stable.zip/download>ZenTaoPMS.6.4.stable.zip //這里是6.4版的禪道
unzip ZenTaoPMS.6.4.stable.zip
8.將zentaopms拷貝到/var/www中
$sudo cp -r zentaopms/ /var/www/
9.瀏覽器輸入http://ip:port/zentaopms/www/install.php即可出現(xiàn)禪道安裝頁(yè)面。
如果無(wú)法訪問(wèn)install.php那么需要配置zentao的virtualhost。
如下:
$ vim /etc/apache2/sites-enabled/zentao
<VirtualHost *:60080>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
保存后刷新頁(yè)面。能訪問(wèn)即可。
附:一般問(wèn)題解決方案。
1.在安裝禪道的時(shí)候,如果出現(xiàn)與數(shù)據(jù)庫(kù)無(wú)法連接,可以重啟Apache2后重新連接。
2.如果安裝完禪道以后,打開(kāi)xxx/index.php出現(xiàn)空白頁(yè)面,可以到xxx/config/my.php文件中,修改debug屬性為true。然后刷新頁(yè)面,會(huì)顯示錯(cuò)誤日志。如果想重新安裝,則只需要?jiǎng)h除my.php后即可再次執(zhí)行xxx/install.php重新安裝禪道。