tjw823 发表于 2007-12-26 16:13:23

紧急啊!testlink安装出现以下错误提示该怎么解决

Checking PHP DB extensions Warning!: Your PHP installation don't have the mysql extension - without it is IMPOSSIBLE to use Testlink.Failed!

fishy 发表于 2007-12-27 17:41:38

Linux下安装testlink-开源测试管理工具
1 安装mysql
找出Redhat EL4中关于mysql的所有rpm包并安装
rpm -qa|grep mysql //检查已安装的mysql包
mkdir -p /tmp/test
find ./ -name "*mysql*.rpm" | xargs -i cp -rf () /tmp/test
scp /tmp/test/* 172.16.100.182:/tmp/test/
rpm -ihv --force --nodeps *.rpm
/etc/init.d/mysqld restart

mysql -uroot -hlocalhost mysql //连接mysql
grant all privileges on *.* to test@'%' identified by 'test'; //创建一个test用户,并且赋予root权限给test用户,新建用户之后可以用windows的Mysql-Front连接到mysql数据库.
flush privileges; //清空缓存
--------------------------------------------------------------------------------------------------
另外一些有用的sql语句:
update user set Password=OLD_PASSWORD('cacti') where user='cacti';
descr user;
select * from user;
show tables;
grant all on cacti.* to cactiuser@'%' identified by 'cacti';
grant all privilege on cacti.*to root@'%'
create database cacti;
show databases;
GRANT ALL PRIVILEGES ON *.* TO username@localhost IDENTIFIED BY 'password' WITH GRANT OPTION; //mysql添加一个用户
GRANT ALL PRIVILEGES ON *.* TO username@"%" IDENTIFIED BY 'password' WITH GRANT OPTION;//添加一个远程用户,名为username密码为password

flush privileges; //添加完用户后要重新启动mysql服务,或是执行如下语句更新

grant all privileges on *.* to 'datauser'@'IP/%' identified by 'password';//给来自"ip或全部"的用户datause分配可对所有数据库的所有表进行所有操作的权限,并设定口令为password。
--------------------------------------------------------------------------------------------------

2 安装apache
找出Redhat EL4中关于apache的所有rpm包并安装
rpm -qa|grep http
mkdir -p /tmp/test
find ./ -name "*http*.rpm" | xargs -i cp -rf () /tmp/test
scp /tmp/test/* 172.16.100.182:/tmp/test/
rpm -ihv --force --nodeps *.rpm
/etc/init.d/httpd restart

apache的发布缺省目录是/var/www/html

3 源码安装php5
a) 拷贝测试页面的configure command到一个sh文件中。开头写上#!/bin/bash
b) make
c) make install
d) 配置apache的httpd.conf文件/etc/httpd/conf/httpd.conf
<Directory "/var/www/html">    //定义apache的发布目录
LoadModule php5_module      /usr/lib/httpd/modules/libphp5.so//apache加载php5的库文件
AddType application/x-httpd-php .php//定义php文件由php5去解释
e)配置/etc/httpd/conf.d/php.conf文件, 把加载php4的库文件去掉
#LoadModule php4_module modules/libphp4.so
f)配置/etc/php.ini文件,使其使用最新的php5的库文件:
extension_dir = /usr/lib/php4


4 安装testlink
a)拷贝testlink文件到/var/www/html目录下,修改testlink的目录可以让apache用户可写的权限;chmod -Rf777 ./testlink
b)运行testlink的install脚本,完成testlink的安装;
c)删除install目录
d)登陆testlink,修改admin密码;


5 安装中遇到的常见问题

a)./configure --help //可以查看那些configure的函数。可以直接编辑这个configure文件。也可以查看这些参数都是什么意思。
b)安装testlink中碰到的两个错误:
Checking PHP DB extensions Warning!: Your PHP installation don't have the MySQL extension - without it is IMPOSSIBLE to use Testlink.Failed! //mysql.so文件没有拷贝到php4中。
Checking if ../gui/templates_c directory is writable: Failed! //因为/var/www/html的目录不可写.修改权限就可以了
c) 安装过程中,遇到没有的包,去linux安装盘中找相应的包,然后安装。
d) make命令:
make
make test
make clean
make install
e) php测试页面:<? phpinfo() ?>
f)make install过程中,生成的库文件.so文件会被安装脚本程序拷贝到其他地方如/lib中,可是所有生成的.so文件都可以在目录中找到.
f)which httpd //察看shell命令的完整路径

6 Testlink的备份
a)mysqldump -uroot --database testlink >./testlink.sql //备份mysql db
b)备份testlink中上传的文件。确实的文件目录是/<testlink>/upload_area.



7 常用的一些命令
setup //可以启动或关闭系统的一些服务。如本系统中用到的httpd和mysqld
chkconfig --list httpd
chkconfig --add
chkconfig --del
chkconfig --level
service httpd start/stop/restart命令来重起服务
/etc/rc.d/rc.local //在此文件中添加service httpd restart和service mysqld restart也可实现系统自动启动

mysqldump -uroot --database testlink >./testlink.sql //备份mysql db
mysql -hlocalhost -uroot <./testlink.sql //还原数据库

/etc/my.cnf //mysql的配置文件.
/var/log///linux系统的err-log目录

//////////////////////////////////////////////////////////////////////////////////

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
   

user=mysql
basedir=/var/lib


err-log=/var/log/mysqld.log//
pid-file=/var/run/mysqld/mysqld.pid
//////////////////////////////////////////////////////////////////////////////////

fishy 发表于 2007-12-27 17:42:12

希望上面那篇文章对你有帮助。。。。偶么有用过。。也不是很懂。。这个是百度找到的。。

tjw823 发表于 2007-12-28 14:59:30

还是不行啊!不过还是感谢你的热心帮助:)

感谢中,继续求解决方法

skynothing 发表于 2011-7-13 13:33:43

没有安装PHP关于mysql的extension,
可以参照俺的帖子http://bbs.51testing.com/viewthread.php?tid=473467&highlight=
重新安装一遍PHP即可(没有必要卸载PHP啊),最好再重启Apache服务
页: [1]
查看完整版本: 紧急啊!testlink安装出现以下错误提示该怎么解决