CentOS7.9 搭建testlink

Apache安装

yum -y install httpd

sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf

sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/"

/etc/httpd/conf/httpd.conf

systemctl start httpd.service

systemctl enable httpd.service

MariaDB的安装

进入/etc/yum.repo.d下,添加CentOS-MariaDB.repo文件,其中添加内容如下:

[mariadb]

name=MariaDB

baseurl=http://yum.mariadb.org/10.3/centos7-amd64

gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

gpgcheck=1

清除Yum的缓存并重新建立数据库

yum clean all

yum makecache

安装MariaDB数据库

yum install MariaDB-client MariaDB-server MariaDB-devel -y

启动数据库并设置为开机自启

systemctl start mariadb

systemctl enable mariadb

初始化数据库,并删除测试数据库及更改权限和设置密码,一路回车,设置root密码,后面会用到:

mysql_secure_installation

设置数据库密码:

mysql -uroot -p

创建testlink数据库

CREATE DATABASE testlink;

CREATE USER 'testlinkuser'@'localhost' IDENTIFIED BY 'yourpassword';

GRANT ALL PRIVILEGES ON testlink.* TO 'testlinkuser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;

FLUSH PRIVILEGES;

EXIT;

PHP 5.6的安装

配置yum源

yum install epel-release

rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

PHP 5.6的安装

yum install php56 php56-php php56-php-mysqlnd php56-php-gd php56-php-mcrypt

php56-php-mbstring php56-php-xml php56-php-cli php56-php-ldap

修改参数

sed -i "s/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 2880/"

/opt/remi/php56/root/etc/php.ini

sed -i "s/max_execution_time = 30/max_execution_time = 120/"

/opt/remi/php56/root/etc/php.ini

验证php是否生效

通过 vim /var/www/html/info.php写一个php文件在浏览器中运行一下,看是否能访问到一个php信息页面,PHP文件内容如下:

<?php

phpinfo();

?>

通过 ip/info.php访问,如果报错则检查防火墙。

TestLink的安装

tar -zxvf testlink-1.9.17.tar.gz -C /var/www/html

mv testlink-1.9.17 testlink

cp /var/www/html/testlink/custom_config.inc.php.example

/var/www/html/testlink/custom_config.inc.php

chown -R apache:apache /var/www/html/testlink

mkdir /var/www/html/testlink

mkdir /var/www/html/upload_area

chmod 777 /var/www/html/testlink/logs

vim /var/www/html/testlink/custom_config.inc.php  :

// $tlCfg->log_path = '/var/testlink-ga-testlink-code/logs/'; /* unix example */

// $g_repositoryPath = '/var/testlink-ga-testlink-code/upload_area/';  /* unix example */

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

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

$tlCfg->config_check_warning_mode = 'SILENT';

systemctl restart httpd.service

浏览器安装配置

输入IP进行访问testlink默认页面:http://ip/testlink/

一路点下去就行。

修改上传用例集文件的大小

这里主要修改两个参数:

1、打开文件/var/www/html/testlink/config.inc.php,找到

$tlCfg->import_file_max_size_bytes = '409600';// in bytes

$tlCfg->import_max_row = '10000'; // in chars

  修改你要的大小

2、修改完上面的参数之后,还是不可以的,因为还要受到php中参数的限制,php默认上传文件的大小是2M,我们需要修改php中的参数:

  打开vim /opt/remi/php56/root/etc/php.ini,修改max_filesize为8M

; Maximum allowed size for uploaded files.

upload_max_filesize = 8M

之后重启一下apache,这样我们就可以上传大文件了

如果上传超时,则修改max_execution_time和max_input_time

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值