花了点时间在自己的VPS上配置了PHP环境,并配置了phpmyadmin来管理mysql数据库。
之前的写了几篇linux下apache,jdk,tomcat,svn,vsftpd,yum的配置。apache已经与tomcat,svn整合好。
要用phpmyadmin来管理mysql数据库,那就必须配置php环境,我还是用yum来安装php。
我的CentOS yum里的php版本的有两个,一个是5.2的,另一个5.3,我安装了5.3的版本。
[root@ certs]# yum install php53 [root@ certs]# yum install php53-gd [root@ certs]# yum install php53-mysql
在安装php53-mysql(用于php连接mysql数据库) 的时候出现问题了:
我MySQL安装是从mysql网站上下载的两个rpm包安装的:
MySQL-server-community-5.1.61-1.rhel5.i386.rpm
MySQL-client-community-5.1.61-1.rhel5.i386.rpm
当用yum安装php53-mysql时总是报如下错误:
[root@ certs]# yum install php53-mysql Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirror.facebook.net * extras: mirrors.ecvps.com * updates: mirror.web-ster.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package php53-mysql.i386 0:5.3.3-7.el5_8 set to be updated --> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: php53-mysql --> Processing Dependency: libmysqlclient.so.15 for package: php53-mysql --> Running transaction check ---> Package mysql.i386 0:5.0.95-1.el5_7.1 set to be updated --> Processing Conflict: mysql conflicts MySQL --> Finished Dependency Resolution mysql-5.0.95-1.el5_7.1.i386 from updates has depsolving problems --> mysql conflicts with MySQL-server-community Error: mysql conflicts with MySQL-server-community You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest The program package-cleanup is found in the yum-utils package.
Error: mysql conflicts with MySQL-server-community mysql与MySQL-server-community发生冲突。
我也试过用上面提示的 --skip-broken 参数来跳过,但还是无效。
后来在一个英文网站上找到解决方案:
首选要下载MySQL的一个rpm包:MySQL-shared-compat-5.1.63-1.rhel5.i386.rpm
然后按照下面的方法安装:
[root@ certs]# rpm -ivh /home/resource/MySQL-shared-compat-5.1.63-1.rhel5.i386.rpm Preparing... ########################################### [100%] 1:MySQL-shared-compat ########################################### [100%] [root@ certs]# rpm2cpio /home/resource/MySQL-shared-compat-5.1.63-1.rhel5.i386.rpm | cpio -t | grep libmysqlclient 14550 blocks ./usr/lib/libmysqlclient.so ./usr/lib/libmysqlclient.so.10 ./usr/lib/libmysqlclient.so.10.0.0 ./usr/lib/libmysqlclient.so.12 ./usr/lib/libmysqlclient.so.12.0.0 ./usr/lib/libmysqlclient.so.14 ./usr/lib/libmysqlclient.so.14.0.0 ./usr/lib/libmysqlclient.so.15 ./usr/lib/libmysqlclient.so.15.0.0 ./usr/lib/libmysqlclient_r.so ./usr/lib/libmysqlclient_r.so.10 ./usr/lib/libmysqlclient_r.so.10.0.0 ./usr/lib/libmysqlclient_r.so.12 ./usr/lib/libmysqlclient_r.so.12.0.0 ./usr/lib/libmysqlclient_r.so.14 ./usr/lib/libmysqlclient_r.so.14.0.0 ./usr/lib/libmysqlclient_r.so.15 ./usr/lib/libmysqlclient_r.so.15.0.0 [root@ certs]# rpm2cpio /home/resource/MySQL-shared-compat-5.1.63-1.rhel5.i386.rpm | cpio -ivd ./usr/lib/libmysqlclient_r.so.15 ./usr/lib/libmysqlclient_r.so.15 14550 blocks [root@ certs]# rpm2cpio /home/resource/MySQL-shared-compat-5.1.63-1.rhel5.i386.rpm | cpio -ivd ./usr/lib/libmysqlclient_r.so.15.0.0 ./usr/lib/libmysqlclient_r.so.15.0.0 14550 blocks [root@ certs]# rpm2cpio /home/resource/MySQL-shared-compat-5.1.63-1.rhel5.i386.rpm | cpio -ivd ./usr/lib/libmysqlclientr.so.15.0.0 14550 blocks [root@ certs]# rpm2cpio /home/resource/MySQL-shared-compat-5.1.63-1.rhel5.i386.rpm | cpio -ivd ./usr/lib/libmysqlclientr.so.15 14550 blocks [root@ certs]#