centos7 安装testlink遇到的坑(mysql、php)

安装的方法教程网上有很多,搜一搜就可以,大概都是差不多的,安装mysql然后安装php,然后把apache搞定,把testlink的包搞进去,然后按步骤安装就行。但是总有个问题就是mysql死活连接不上
can‘t connect mysql 什么的
还有一个就是php没有mysql扩展什么的
Checking PHP DB extensions Warning!
感觉可能是php版本和mysql版本的问题,网上的也没有搜到如何解决,实际上也解决不了。。只能自己尝试了
尝试过无数次的mysql版本(5.7 8)和php(testlink的需要php5.5版本+)版本的组合,发现了一种可以成功的组合
即在centos7下使用mariadb + php5.6 + testlink的组合即可
操作步骤如下

1删除系统上的php和mysql

a=`rpm -qa |  grep -e php -e mysql`
for file in $a
do
        rpm -e $file --nodeps
done

2安装mariadb和php5.6

yum -y install mariadb*
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel  php56w-intl php56w-mbstring php56w-mysql

3 配置mariadb

mysql_secure_installation
首先是设置密码,会提示先输入密码
Enter current password for root (enter for none):<–初次运行直接回车
设置密码
Set root password? [Y/n] <– 是否设置root用户密码,输入y并回车或直接回车
New password: <– 设置root用户的密码
Re-enter new password: <– 再输入一次你设置的密码
其他配置
Remove anonymous users? [Y/n] <– 是否删除匿名用户,回车
Disallow root login remotely? [Y/n] <–是否禁止root远程登录,回车,
Remove test database and access to it? [Y/n] <– 是否删除test数据库,回车
Reload privilege tables now? [Y/n] <– 是否重新加载权限表,回车
初始化MariaDB完成,接下来测试登录
mysql -u root -p
[root@localhost ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 29
Server version: 5.5.56-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
登录成功OK

4 安装后按照网上的教程走就可以了,推荐一篇

https://blog.csdn.net/fxsok244969309/article/details/54914999

5 打开网页 登录成功OK

testlink登录界面
testlink登录后界面

猜你喜欢

转载自blog.csdn.net/wq3028/article/details/80322774