天天看點

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