lmgsanm

每天学习一点,每天进步一点点…… Tomorrow is another beatifull day

导航

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

posted on 2016-04-27 17:07  lmgsanm  阅读(461)  评论(0编辑  收藏  举报