testlink简单部署
CentOS+LAMP+testlink
环境
系统
CentOS6.5
软件
testlink-1.9.14
IP
192.168.0.158
部署
LAMP环境搭建
remi配置
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi.repo
cp remi.repo /etc/yum.repos.d/
wget http://repo.mysql.com//mysql57-community-release-el6-8.noarch.rpm
rpm -ivh mysql57-community-release-el6-8.noarch.rpm
httpd
yum -y install httpd httpd-devel httpd-tools httpd-manual libmicrohttpd-doc libmicrohttpd libmicrohttpd-devel mod_dav_svn mod_dnssd mod_auth_mellon mod_lookup_identity mod_ssl php56-php-xcache php56-xcache-admin
chkconfig httpd on
mysql
yum -y install mysq mod_auth_mysql MySQL-python mysql-connector-java mysql-connector-odbc mysql-devel mysql-embedded mysql-embedded-devel mysql-libs mysql-server perl-DBD-MySQL
chkconfig mysqld on
php56
yum -y install php56-php-bcmath php56-php-dba php56-php-dbg php56-php-devel php56-php-embedded php56-php-enchant php56-php-fpm php56-php-gd php56-php-intl php56-php-ldap php56-php-libvirt php56-php-litespeed php56-php-mbstring php56-php-mysqlnd php56-php-oci8 php56-php-odbc php56-php-pdo php56-php-pear
testlink安装
testlink解压
tar xzf testlink-1.9.14.tar.gz
cp -r testlink-1.9.14 /var/www/html/testlink
cd /var/www/html/testlink/
mysql配置
修改root密码
mysqladmin -uroot password 'limugen@uce.cn'
mysql -uroot -p'limugen@uce.cn
CREATE DATABASE testlink CHARACTER SET utf8 COLLATE utf8_general_ci
导入sql数据
mysql -uroot -p'limugen@uce.cn' testlink < install/sql/mysql/testlink_create_tables.sql
mysql -uroot -p'limugen@uce.cn' testlink < install/sql/mysql/testlink_create_default_data.sql
php配置
vim /opt/remi/php56/root/etc/php.ini
max_execution_time = 120
建立文件目录及修改权限
mkdir -p /var/testlink/upload_area/
mkdir -p /var/testlink/logs/
chmod 777 /var/www/html/testlink/gui/templates_c
chmod 777 /var/testlink/upload_area/
chmod 777 /var/testlink/logs/
testlink配置
vim config_db.inc.php
<?php // Automatically Generated by TestLink Installer
define('DB_TYPE', 'mysql');
define('DB_USER', 'root');
define('DB_PASS', 'limugen@uce.cn');
define('DB_HOST', 'localhost');
define('DB_NAME', 'testlink');
?>
数据自动备份
脚本
vim /home/gat/backup/db_backup.sh
#!/bin/sh
# Script for backup TestLink service
# create filenames
mydate=`date +%y%m%d`
backup_folder="/home/gat/backup"
upload_folder="/home/gat/web/testlink/upload_area/"
filename1="$backup_folder/testlink_db_$mydate.bck.sql"
filename2="$backup_folder/testlink_upload_$mydate.bck.tgz"
# dump data
mysqldump -uroot -pyour_password testlink_17 > $filename1
# compress
gzip -f9 $filename1
# backup attachments
tar -cvzf $filename2 $upload_folder
# save to backuped area on server titan
# mount titan:/export/gat /home/gat/backup/titan/ -o
soft,nosuid,rw,noauto,user,noexec
#cp $filename.gz /home/gat/backup/titan/
chmod u+x /home/gat/backup/db_backup.sh
定时任务
15 2 * * * su - gat -c /home/gat/backup/db_backup.sh >/dev/null 2>&1
登陆
http://192.168.0.158/testlink
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何打造一个高并发系统?
· .NET Core GC压缩(compact_phase)底层原理浅谈
· 现代计算机视觉入门之:什么是图片特征编码
· .NET 9 new features-C#13新的锁类型和语义
· Linux系统下SQL Server数据库镜像配置全流程详解
· Sdcb Chats 技术博客:数据库 ID 选型的曲折之路 - 从 Guid 到自增 ID,再到
· Winform-耗时操作导致界面渲染滞后
· Phi小模型开发教程:C#使用本地模型Phi视觉模型分析图像,实现图片分类、搜索等功能
· 语音处理 开源项目 EchoSharp
· drools 规则引擎和 solon-flow 哪个好?solon-flow 简明教程