How to deploy TestRail in Linux step by step

背景:

TestRail為一個(gè)測試用例管理平臺(tái)潮瓶,其功能簡單大方陶冷,但足夠滿足項(xiàng)目的測試用例庫使用。

TestRail需要LAMP環(huán)境毯辅,官網(wǎng)提供了完整的LAMP環(huán)境配置文檔埂伦,可參考:https://www.howtoforge.com/quick-n-easy-lamp-server-centos-rhel

LAMP部署精簡就是下面幾個(gè)步驟:

Install Apache

yum install httpd httpd-devel

/etc/init.d/httpd start

Install MySQL Database Server

yum install mysql mysql-server mysql-devel

/etc/init.d/mysqld start

mysql> USE mysql;

mysql> UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';

mysql> FLUSH PRIVILEGES;

Install PHP5 Scripting Language

yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml

/etc/init.d/httpd restart

后面的phpMyAdmin,Webmin不是必須的思恐,可以不安裝沾谜。

TestRail安裝步驟胀莹,參考官網(wǎng)提供的文檔:http://docs.gurock.com/testrail-admin/installation-unix

創(chuàng)建數(shù)據(jù)庫:

mysql>CREATE DATABASE testrail DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

mysql>CREATE USER 'testrail'@'127.0.0.1' IDENTIFIED BY 'zyLC021';

mysql>GRANT ALL ON testrail.* TO 'testrail'@'127.0.0.1';

mysql>FLUSH PRIVIGELES;

備注:

127.0.0.1 不能用 localhost 代替基跑,否則在TestRail Setup Wizard 第二步會(huì)報(bào)錯(cuò),數(shù)據(jù)庫無法連接描焰,如下圖:


Installing TestRail

To install the actual application, just upload and extract the TestRail installation archive to your web server and copy the files to your web server'swwwdirectory (Centos: ?it's/var/www/html/testrail).

#cd /opt/

#mkdir testrail

#cd testrail

#mkdir attachments

#mkdir reports

#chmod apache:apache /opt/testrail/attachments

#chmod apache:apache /opt/testrail/reports

#mkdir /var/www/html/testrail/logs

#chmod apache:apache /var/www/html/testrail/logs

開始安裝:


Activating the TestRail background task

The last step of the TestRail installation consists of installing the background task. The background task is responsible, among other things, for sending out email notifications for test changes if this feature is enabled. The background task needs to be triggered in regular intervals to do its work and the easiest way to do this under Unix-based systems is to add acronjob. If you are using an?OS?X based server system, you might want to consider using alaunchd scriptinstead.

Before scheduling the task, you can verify that the background task can be successfully started by running it manually from the command line:

$php /var/www/html/testail/task.php

Background task on Unix/Linux

We usecronto trigger the background task on Unix/Linux systems periodically. Before scheduling the task, you can verify that it can be successfully started by running it manually from the command line:

$ php /var/www/testrail/task.php

The TestRail background task automatically detects if it's already running, so it's best to trigger the task in very short intervals (such as every minute) for best results. To do this, make sure cron is installed on your system and create a file/etc/cron.d/testrailwith the following content:

* * * * * www-data /usr/bin/php /var/www/testrail/task.php

The cron job needs the PHP command line interface, which might already be installed on your system. You can test this by executing thephp -vcommand. If it's not already installed, install thephp5-clipackage or equivalent with your platform's package manager.

Please note:Also make sure to add the above mentioned PHP extensions to thephp-cli's PHP.ini if it doesn't use the web server's PHP.ini file. E.g., on Ubuntu systems, also add theioncubeextension to/etc/php5/cli/php.ini.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末媳否,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子栈顷,更是在濱河造成了極大的恐慌,老刑警劉巖嵌巷,帶你破解...
    沈念sama閱讀 221,820評(píng)論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件萄凤,死亡現(xiàn)場離奇詭異,居然都是意外死亡搪哪,警方通過查閱死者的電腦和手機(jī)靡努,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,648評(píng)論 3 399
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來晓折,“玉大人惑朦,你說我怎么就攤上這事±旄牛” “怎么了漾月?”我有些...
    開封第一講書人閱讀 168,324評(píng)論 0 360
  • 文/不壞的土叔 我叫張陵,是天一觀的道長胃珍。 經(jīng)常有香客問我梁肿,道長,這世上最難降的妖魔是什么觅彰? 我笑而不...
    開封第一講書人閱讀 59,714評(píng)論 1 297
  • 正文 為了忘掉前任吩蔑,我火速辦了婚禮,結(jié)果婚禮上填抬,老公的妹妹穿的比我還像新娘烛芬。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 68,724評(píng)論 6 397
  • 文/花漫 我一把揭開白布赘娄。 她就那樣靜靜地躺著散怖,像睡著了一般吼驶。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,328評(píng)論 1 310
  • 那天蕊梧,我揣著相機(jī)與錄音,去河邊找鬼县恕。 笑死峰搪,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的个榕。 我是一名探鬼主播篡石,決...
    沈念sama閱讀 40,897評(píng)論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼西采!你這毒婦竟也來了凰萨?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,804評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤械馆,失蹤者是張志新(化名)和其女友劉穎胖眷,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體霹崎,經(jīng)...
    沈念sama閱讀 46,345評(píng)論 1 318
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡珊搀,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,431評(píng)論 3 340
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了尾菇。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片境析。...
    茶點(diǎn)故事閱讀 40,561評(píng)論 1 352
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖派诬,靈堂內(nèi)的尸體忽然破棺而出劳淆,到底是詐尸還是另有隱情,我是刑警寧澤默赂,帶...
    沈念sama閱讀 36,238評(píng)論 5 350
  • 正文 年R本政府宣布沛鸵,位于F島的核電站,受9級(jí)特大地震影響缆八,放射性物質(zhì)發(fā)生泄漏谒臼。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,928評(píng)論 3 334
  • 文/蒙蒙 一耀里、第九天 我趴在偏房一處隱蔽的房頂上張望蜈缤。 院中可真熱鬧,春花似錦冯挎、人聲如沸底哥。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,417評(píng)論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽趾徽。三九已至续滋,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間孵奶,已是汗流浹背疲酌。 一陣腳步聲響...
    開封第一講書人閱讀 33,528評(píng)論 1 272
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留了袁,地道東北人朗恳。 一個(gè)月前我還...
    沈念sama閱讀 48,983評(píng)論 3 376
  • 正文 我出身青樓,卻偏偏與公主長得像载绿,于是被迫代替她去往敵國和親粥诫。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,573評(píng)論 2 359

推薦閱讀更多精彩內(nèi)容