Linux环境部署testlink简单教程

2018-11-19  本文已影响0人  李蕴Ronnie

1.安装xampp

1.1 下载xampp

命令:wget -c https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.2.0/xampp-linux-x64-7.2.0-0-installer.run

1.2 更改权限

命令:chmod 755 xampp-linux-x64-7.2.0-0-installer.run

1.3 启动xampp

命令:/opt/lampp/./lampp start

2.安装testlink

2.1 下载testlink

命令:wget -c https://nchc.dl.sourceforge.net/project/testlink/TestLink%201.9/TestLink%201.9.18/testlink-1.9.18.tar.gz

2.2 将Testlink解压缩到XAMPP安装目录下的htdocs文件下

命令:tar -zxvf ./testlink-1.9.18.tar.gz -C /opt/lampp/htdocs/

2.3 安装

打开浏览器,输入网址“http://{IP}/testlink-1.9.18/install/index.php”,并点击“New installation”安装Testlink

3.配置testlink

打开浏览器,输入网址“http://{IP}/testlink-1.9.18/login.php”

初始账号和密码都是admin

4.安装过程中报错处理

4.1 问题:

Checking if /var/testlink/logs/ directory exists [S] Failed!

Checking if /var/testlink/upload_area/ directory exists [S] Failed! 

解决方案:

修改testlink下的config.inc.php

命令:cd /opt/lampp/htdocs/testlink-1.9.18/

命令:vi config.inc.php

搜索log_path,并将行内容改为:

$tlCfg->log_path = '/opt/lampp/htdocs/testlink-1.9.18/logs/';

搜索repositoryPath,并将行内容改为:

$g_repositoryPath = '/opt/lampp/htdocs/testlink-1.9.18/upload_area/';

:wq保存更改,如果提示权限问题无法保存,则用sudo vi config.inc.php重新打开保存

4.2 问题:

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

<?php

// Automatically Generated by TestLink Installer - Mon, 19 Nov 18 10:33:09 +0100

define('DB_TYPE', 'mysql');

define('DB_USER', 'testlink');

define('DB_PASS', 'b5d2HqXWitpIlZTV');

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.

解决方案:

命令:cd /opt/lampp/htdocs/testlink-1.9.18

在testlink安装目录下新建config_db.inc.php文件

命令:sudo vi config_db.inc.php

将上述php代码粘贴到config_db.inc.php文件中

:wq保存文件

修改文件权限

命令:chmod 777 config_db.inc.php

4.3 问题:

bash: mysql: command not found

解决方案:

将mysql的bin路径添加到环境变量

命令:sudo vi /etc/profile

添加一行export PATH=$PATH:/opt/lampp/bin

:wq保存

命令:source /etc/profile 使配置立即生效

4.4 问题

数据库密码不能为空

解决方案

使用root登录数据库

命令:mysql -uroot -p

更改root密码

语句:set password for root@localhost = password(‘新密码’);

上一篇下一篇

猜你喜欢

热点阅读