1、軟件下載
搭建LAMP所需的集成包?xampp-linux-x64-7.2.11-0-installer.run下載地址
testlink-1.9.19.tar.gz下載地址TestLink - Browse /TestLink 1.9 at SourceForge.net
2、安裝xampp
# chmod755 xampp-linux-x64-7.2.11-0-installer.run?
?# ./xampp-linux-x64-7.2.11-0-installer.run
在windows中xshell安裝需要先提前裝xmanager,官網(wǎng)可下載試用版
3厌处、配置xampp
1)開啟xampp服務(wù)
#? /opt/lampp/lampp start
如果開始失敗,提示Another web server is already running紧卒,說明接口被占用
查看開啟了那些端口?netstat -anp
修改文件路徑
/opt/lampp/etc/httpd.conf? 80改為其他端口师妙,訪問地址加上端口號(hào)
/opt/lampp/etc/extra/httpd-ssl.conf?中修改443端口號(hào)
/opt/lampp/xampp中,修改對(duì)應(yīng)的80和443為新端口
修改后镀虐,重新執(zhí)行命令啟動(dòng)即可
4箱蟆、安裝Testlink
將下載的包解壓到/lampp/htdocs/下 (tar -zxvf testlink-1.9.19.tar.gz),重命名為testlink
打開瀏覽器刮便,訪問http://localhost:8084/testlink進(jìn)入安裝頁面(也可以在本地遠(yuǎn)程訪問空猜,把localhost改為服務(wù)器的地址),如圖遠(yuǎn)程無法訪問,linux需要開通可以訪問8084端口的權(quán)限
第一頁如果提示:session_start():Session data file is not created by your uid恨旱,進(jìn)入到提示信息里的目錄辈毯,刪除session,刷新頁面搜贤,提示就沒有了
1)配置php.ini文件
#? vim /opt/lampp/etc/php.ini
延長(zhǎng)session時(shí)間
session.gc_maxlifetime?=?3600
修改參數(shù)
max_execution_time =?120
數(shù)據(jù)庫參數(shù)去掉注釋谆沃,多去幾個(gè)也沒關(guān)系
2)最后兩行是確認(rèn)目錄是否存在,testlink下的config.inc.php文件進(jìn)行一些修改:
將$tlCfg->log_path = '/var/testlink/logs/'; 修改為:$tlCfg->log_path = TL_ABS_PATH."logs"
另外還需要將$g_repositoryPath = '/var/testlink/upload_area/';? 修改為:$g_repositoryPath = TL_ABS_PATH."upload_area"
刷新頁面后仪芒,會(huì)提示如下唁影,需要給三個(gè)文件添加權(quán)限
# chmod 777 htdocs/testlink/upload_area/
?# chmod 777 htdocs/testlink/logs/
?# chmod 777 htdocs/testlink/gui/templates_c/
后續(xù)也有權(quán)限問題,可以直接將整個(gè)目錄加上權(quán)限? chmod 777 lampp/ -R
最后一頁如果提前創(chuàng)建數(shù)據(jù)庫桌硫,設(shè)置過訪問密碼夭咬,在testlink連接數(shù)據(jù)庫時(shí)輸入設(shè)置好的賬號(hào)和密碼啃炸,如果創(chuàng)建表失敗铆隘,可刪除后testlink自動(dòng)創(chuàng)建
3)創(chuàng)建成功后,再次訪問http://localhost:8009/testlink? 默認(rèn)用戶名:admin密碼:admin南用,即可登錄成功膀钠,如果已有testlink需要遷移,原來的數(shù)據(jù)庫備份導(dǎo)入即可
# cd/opt/lampp/bin/?
?#./mysql -uroot -ppassword
>use testlink裹虫;
>source?/usr/testlink/testlink.sql? ?
遇到的問題:
1)編輯測(cè)試用例集的名字時(shí)肿嘲,報(bào)錯(cuò)?Uncaught ArgumentCountError: Too few arguments to function initializeGui(), 3 passed in /usr/testlink/lampp/htdocs/testlink/lib/testcases/containerEdit.php on line 208 and exactly 4 expected in /usr/testlink/lampp/htdocs/testlink/lib/testcases/containerEdit.php:1342 Stack trace: #0 /usr/testlink/lampp/htdocs/testlink/lib/testcases/containerEdit.php(208): initializeGui(NULL, 11377, NULL) #1 {main} thrown in?/usr/testlink/lampp/htdocs/testlink/lib/testcases/containerEdit.php?on line?1342
是缺少參數(shù)或者參數(shù)為空或者不存在引起的報(bào)錯(cuò),208行initializeGui()只傳了3個(gè)值筑公,而1342行需要4個(gè)值雳窟,此時(shí)修改提示信息中的1342行,默認(rèn)都賦上空值即可