天天看点

CentOS7下TestLink环境的部署

一、安装准备

进入root权限

二、安装yum

apt-get install yum

三、安装apache服务

(1)更新文件

yum -y update

(2)安装apache

yum install httpd

(3)修改配置信息

vim /etc/httpd/conf/httpd.conf

(1)把里面的 AllowOverride None 全部修改为 AllowOverride All

(2)顺便在 DirectoryIndex index.html 后面加上 index.htm index.php index.shtm

(3)直接修改/etc/httpd/conf/httpd.conf中修改DocumentRoot和Directory处的路径、重启即可

(4)重启apache服务

systemctl restart httpd.service #重启apache

(5)让配置立即生效

setenforce 0 #使配置立即生效

(6)根据需要开启或关闭防火墙

systemctl stop firewalld.service //关闭firewall

systemctl start firewalld.service //开启firewall

systemctl disable firewalld.service //禁止firewall开机启动

四、安装PHP

(1)安装

yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel

(2)重启apache服务

systemctl restart httpd.service

(3)写一个php文件在浏览器中运行一下:

file: vi /var/www/html/info.php

content: <?php phpinfo();?>

浏览器输入:http://192.168.1.1/info.php

五、安装MySQL

(1)安装

yum -y install mariadb*

(2)开启MySQL服务

systemctl start mariadb.service

(3)设置开机启动MySQL服务

systemctl enable mariadb.service

(4)设置root账号的密码

mysql_secure_installation

然后会出现一串东西,可以仔细读一下,如果你懒得读,就在提示出来的时候,按Enter就好了,让你设置密码的时候,你就输入你想要的密码就行,然后继续在让你选择y/n是,Enter就好了;当一切结束的时候,你可以输入mysql -uroot -p的方式,验证一下

六、将PHP和MySQL关联起来

yum search php,选择你需要的安装:yum -y install php-mysql

七、安装testlink

(1)linux下操作

#tar -zxvf testlink-1.9.14.tar.gz

#mkdir /var/testlink/logs

#mkdir /var/testlink/upload_area

#chmod 777 /var/testlink/logs

(2)浏览器配置操作

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

b)第一步,点击'new install'

CentOS7下TestLink环境的部署

c)点击'continue'

CentOS7下TestLink环境的部署

d)如果没有红色提示,点击'continue',数据库这里选择mysql,其他不做要求(橙色部分无影响)

CentOS7下TestLink环境的部署

e)数据库的应用

CentOS7下TestLink环境的部署

f)登录http://ip:port/login.php

默认用户:admin/admin