CentOS6.5下testlink搭建集成jira及发送邮件

1.安装apache

安装前查询一下是否安装了apache:

rpm -qa|grep httpd

若无,安装httpd:

yum install -y httpd

加入开机自启:

chkconfig on httpd

在apache配置文件httpd.conf中加入

ServerName IP地址

启动apache

service httpd start

 

2.追加CentOS 6.5的epel及remi源

rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

 

3.使用yum list命令查看可安装的包(Packege)

yum list --enablerepo=remi --enablerepo=remi-php56 | grep php

 

4.yum源安装好后,下一步配置PHP5.6

yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-gd php-ldap php-zip php-fileinfo php-cli php-curl php-mysql

 

5.用php命令查看版本

php --version

版本为php5.6

 

6. 安装mysql

rpm -qa|grep mysql

如果没有安装,则使用yum源进行安装

yum -y install mysql

启动mysql服务:service mysqld start

mysql -u root -p 初始密码为mysql

进入设置mysql密码:set password for root@localhost=password('新密码');

 

7.将testlink1.9.14安装包放在/var/www/html目录下,解压并重命名

tar -zxvf testlink1.9.14

mv testlink1.9.14 /var/www/html/testlink

chmod -R 777 /var/www/html/testlink

进入testlink目录:

vim config.inc.php修改如下几项:

$g_repositoryPath = '/var/testlink/upload_area/'; 

$tlCfg->log_path = '/var/testlink/logs/'; 

$tlCfg->default_language = 'zh_CN'; 

$tlCfg->config_check_warning_mode = 'SILENT'; 

若上面两个路径没有改动,新建这两个路径:

mkdir /var/testlink

mkdir /var/testlink/logs

mkdir /var/testlink/upload_area

修改这两个目录的权限

chmod 777 /var/testlink

chmod 777 /var/testlink/logs

chmod 777 /var/testlink/upload_area

重新启动apache服务:service httpd restart

 

8.安装testlink

http://localhost/testlink 进入testlink安装页面,点击new installation,

设置数据库账号密码(账号root,密码默认情况为mysql)

设置操作testlink数据库的账号和密码(账号为admin,密码为admin)

 

注意:

安装过程中如果出现如下错误:

TestLink setup will now attempt to setup the database:

Creating connection to Database Server:OK!

Connecting to database `testlink`:OK!

Creating Testlink DB user `testlink`:OK! (ok - user_exists ok - grant assignment)

Processing:sql/mysql/testlink_create_tables.sql

OK!

Writing configuration file:Failed!

 

TestLink couldn't write the config file. Please copy the following into the ../config_db.inc.php file:

<?php

// Automatically Generated by TestLink Installer

define('DB_TYPE', 'mysql');

define('DB_USER', 'root');

define('DB_PASS', 'password');

define('DB_HOST', 'localhost');

define('DB_NAME', 'testlink');

define('DB_TABLE_PREFIX', '');

?>

Once that's been done, you can log into TestLink by pointing your browser at your TestLink site.

解决方式:

在testlink目录中创建config_db.inc.php文件,并拷贝config.inc.php的代码即可

 

9.安装完成后解决testlink图表乱码问题

下载 tahoma.ttf 字体;

下载好后,我们将其放置到testlink的安装目录的以下文件夹中:

/var/www/html/testlink/third_party/pchart/Fonts/

接下来,修改配置文件config.inc.php:

修改

$tlCfg->charts_font_path = TL_ABS_PATH . "third_party/pchart/Fonts/tahoma.ttf";

$tlCfg->charts_font_path = TL_ABS_PATH . "third_party/pchart/Fonts/SIMYOU.ttf";

 

10.与BUG管理工具jira集成

首先需要在BUG管理工具jira中创建项目,并填写KEY

admin账号登录testlink,配置 Issue Tracker Management

 

点击创建,配置关联并保存

<!-- Template jirasoapInterface -->

<issuetracker>

<username>username</username>

<password>password</password>

<uribase>http://IP:port/</uribase>

<uriwsdl>http://IP:port/rpc/soap/jirasoapservice-v2?wsdl</uriwsdl>

<uriview>http://IP:port/browse/</uriview>

<uricreate>http://IP:port/secure/CreateIssue!default.jspa</uricreate>

<projectkey>XXX</projectkey>

<issuetype>1</issuetype>

</issuetracker>

最后在testlink创建测试项目管理时选择上一步保存的跟踪器即可配置testlink与jira的集成

 

11.testlink发送邮件配置(公司邮箱)

进入/var/www/html/testlink目录,修改config.inc.php文件,添加以下内容:

/** [SMTP] */

// Developer Note:

// these config variable names has been choosed to maintain compatibility

// with code taken from Mantis.

// SMTP server Configuration ("localhost" is enough in the most cases)

$g_smtp_host = 'smtp.xxx.com'; #SMTP 服务必须配置,可配置你公司发送邮件服务器地址

# Configure using custom_config.inc.php

$g_tl_admin_email = 'testlink@xxx.com'; #问题错误通知,配置你公司的邮箱

$g_from_email = 'testlink@xxx.com'; #收到邮件看到的发送地址

$g_return_path_email = 'testlink@xxx.com'; #如果收到邮件的人进行回复的邮件地址

# Urgent = 1, Not Urgent = 5, Disable = 0

$g_mail_priority = 5;

# Taken from mantis for phpmailer config

define ("SMTP_SEND",2);

$g_phpMailer_method = SMTP_SEND; #使用SMTP协议进行发送

// Configure only if SMTP server requires authentication

$g_smtp_username = 'testlink@xxx.cn'; #smtp发送的用户名  

$g_smtp_password = 'password'; # 发送用户的密码

上述配置完成后,重启apache服务,即可实现功能:

service httpd restart

指派testlink测试用例执行时勾选

可实现邮件发送功能

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值