所以我使用puTTy与ssh连接访问服务器。
我按照说明here。
我已正确安装apache / httpd和mysql / mariadb。
但是在安装php时卡住了。
输入命令后
sudo yum install php56w php56w-mysql php56w-mcrypt php56w-gd php56w-curl
它会给我这个安装结果:
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 6.3 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 3.4 kB 00:00:00
remi-safe | 2.9 kB 00:00:00
updates | 3.4 kB 00:00:00
vz-base | 951 B 00:00:00
vz-updates | 951 B 00:00:00
webtatic | 3.6 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 846 kB 00:00:00
(2/3): epel/x86_64/primary_db | 6.1 MB 00:00:01
(3/3): remi-safe/primary_db | 1.1 MB 00:00:01
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.riken.jp
* extras: ftp.iij.ad.jp
* remi-safe: mirrors.mediatemple.net
* updates: ftp.iij.ad.jp
* webtatic: sp.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php56w.x86_64 0:5.6.31-2.w7 will be installed
--> Processing Dependency: php56w-cli(x86-64) = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
--> Processing Dependency: php56w-cli = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
---> Package php56w-common.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-gd.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-mcrypt.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-mysql.x86_64 0:5.6.31-2.w7 will be installed
--> Processing Dependency: php56w-pdo(x86-64) for package: php56w-mysql-5.6.31-2.w7.x86_64
--> Running transaction check
---> Package php56w-cli.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-pdo.x86_64 0:5.6.31-2.w7 will be installed
Removing php56w-cli.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-cli-5.6.26-1.el7.remi.x86_64
Removing php56w-common.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-common-5.6.26-1.el7.remi.x86_64
Removing php56w-gd.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-gd-5.6.26-1.el7.remi.x86_64
Removing php56w-mcrypt.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-mcrypt-5.6.26-1.el7.remi.x86_64
Removing php56w-mysql.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-mysqlnd-5.6.26-1.el7.remi.x86_64
Removing php56w-pdo.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-pdo-5.6.26-1.el7.remi.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php56w-cli.x86_64 0:5.6.31-2.w7 will be installed
--> Processing Dependency: php56w-cli(x86-64) = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
--> Processing Dependency: php56w-cli = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
---> Package php56w-common.x86_64 0:5.6.31-2.w7 will be installed
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
---> Package php56w-gd.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-mcrypt.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-mysql.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-pdo.x86_64 0:5.6.31-2.w7 will be installed
--> Finished Dependency Resolution
Error: Package: php56w-5.6.31-2.w7.x86_64 (webtatic)
Requires: php56w-cli = 5.6.31-2.w7
Available: php56w-cli-5.6.31-1.w7.x86_64 (webtatic)
php56w-cli = 5.6.31-1.w7
Error: Package: php56w-5.6.31-2.w7.x86_64 (webtatic)
Requires: php56w-common(x86-64) = 5.6.31-2.w7
Available: php56w-common-5.6.31-1.w7.x86_64 (webtatic)
php56w-common(x86-64) = 5.6.31-1.w7
Error: Package: php56w-5.6.31-2.w7.x86_64 (webtatic)
Requires: php56w-cli(x86-64) = 5.6.31-2.w7
Available: php56w-cli-5.6.31-1.w7.x86_64 (webtatic)
php56w-cli(x86-64) = 5.6.31-1.w7
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
openssh-clients-6.6.1p1-25.el7_2.x86_64 has missing requires of openssh = ('0', '6.6.1p1', '25.el7_2')
可能会出现什么问题?
答案 0 :(得分:0)
问题出现是因为php56w和php包之间存在冲突,因为它们是在不同的存储库中提供的。
已经安装了来自remi存储库的php,而将安装来自webtatic的php56w。 This solution应该在这里提供帮助。答案 1 :(得分:0)
安装Yum-Utils来管理存储库
yum install yum-utils
一旦安装了EPEL,Remi和yum-utils,您现在可以通过使用yum-config-manager启用remi存储库,继续在CentOS 6发行版上安装具有所有必需模块的PHP 5.4,PHP 5.5或PHP 5.6 >
yum-config-manager --enable remi-php56
yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo
我尝试了并且成功了。谢谢