先說結(jié)論诫硕,還是用一鍵安裝包的方式安裝吧 T T
摸索了很久的原因是對debian下地apache2完全不熟= =
目前需要做的事情是:講之前圖方便搭在windows下的禪道遷移到linux下
獲取備份
首先在windows下獲取備份文件祠饺,重點伍俘,遷移前后需要為同一版本,要不很麻煩蚣抗,反正我沒搞定侈百,于是我在windows下升到了最新版然后再到linux下恢復(fù)
直接看官方的遷移教程就好了http://www.zentao.net/video/Windows-to-Linux-79999.html
官網(wǎng)下載deb包
官網(wǎng)都沒提到如何進行安裝,只能從2012年提供的源碼安裝包中得到一些提示
http://www.zentao.net/book/zentaopmshelp/101.html
直接安裝翰铡,多方便啊
事實上我來來回回搞了很多次钝域,把apache2的每一個目錄一個個看過去,然后又瞎改一通導(dǎo)致不能用= =
一定記得要打開終端锭魔,看看提示內(nèi)容例证,很重要
正在解包 zentaopms (9.1.stable) ...
正在設(shè)置 zentaopms (9.1.stable) ...
zentaopms has been successfully installed.
Please run sudo apache2ctl restart and visit http://localhost/zentao.
#按照提示,sudo apache2ctl restart迷捧,報錯
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
#所以需要編輯一下
sudo vim /etc/apache2/apache2.conf
#加入
ServerName 127.0.0.1:80
sudo apache2ctl restart
瀏覽器輸入localhost/zentao织咧,接下來一直失敗
哇靠原來這么容易就進去了,官方搞得很周全漠秋,只是如果再有份文檔就完美了
#然后繼續(xù)報錯
#數(shù)據(jù)庫連接失敗 SQLSTATE[28000] [1698] Access denied for user 'root'@'localhost'
#deb一鍵安裝的笙蒙,根本沒地方設(shè)置密碼啊喂,先試試能不能連地上
mysql -u root -p
Enter password:
#密碼輸入空
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
#這和劇情發(fā)展的不太一樣庆锦,ORZ捅位,來吧,手工改密碼,由于mysql版本為5.7.15-1
#關(guān)閉服務(wù)
/etc/init.d/mysql stop
#跳過權(quán)限表驗證
sudo mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
mysql -u root mysql
#終于進來了绿渣,選數(shù)據(jù)庫
use mysql
#看看表朝群,有個user燕耿,看看結(jié)構(gòu)
show table中符;
describe user;
#有個authentication_string誉帅,改密碼
update user set authentication_string=password('root') where user='root' ;
#成功了淀散,總是忘記加分號= =,出現(xiàn)->的時候別慌蚜锨,只是忘了加分號
quit
/etc/init.d/mysql stop
/etc/init.d/mysql restart
#然后掉入了另一個坑
#數(shù)據(jù)庫連接失敗 SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111)
#然后又一通亂試http://stackoverflow.com/questions/19658891/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run
#這時就在想档插,能不能先安裝mysql
https://dev.mysql.com/downloads/repo/apt/
sudo dpkg -i mysql-apt-config_0.8.3-1_all.deb
#選擇Debian 8 ("Jessie"),server亚再,5.7
cd /
sudo apt-get update
sudo apt-get install mysql-server