php rpm 安装顺序 和 依赖关系

php rpm install in el5.x86_64

在el5 x86_64上 rpm安装php 5.1.6,在http://rpm.pbone.net/寻找下载php-5.1.6-27.el5.x86_64.rpm
wget ftp://mirror.switch.ch/pool/3/mirror/centos/5.5/os/x86_64/CentOS/php-5.1.6-27.el5.x86_64.rpm

rpm -ivh php-5.1.6-27.el5.x86_64.rpm
warning: php-5.1.6-27.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
httpd-mmn = 20051115 is needed by php-5.1.6-27.el5.x86_64
php-cli = 5.1.6-27.el5 is needed by php-5.1.6-27.el5.x86_64
php-common = 5.1.6-27.el5 is needed by php-5.1.6-27.el5.x86_64

提示需要依赖安装httpd,php-cli和php-common   

分别下载httpd,php-cli和php-common的rpm包
wget ftp://mirror.switch.ch/pool/1/mirror/scientificlinux/5rolling/x86_64/SL/php-cli-5.1.6-27.el5.x86_64.rpm
wget ftp://mirror.switch.ch/pool/1/mirror/scientificlinux/5rolling/x86_64/SL/php-common-5.1.6-27.el5.x86_64.rpm
wget ftp://mirror.switch.ch/pool/3/mirror/centos/5.5/updates/x86_64/RPMS/httpd-2.2.3-43.el5.centos.3.x86_64.rpm

rpm -ivh php-common-5.1.6-27.el5.x86_64.rpm
rpm -ivh httpd-2.2.3-43.el5.centos.3.x86_64.rpm
rpm -ivh php-cli-5.1.6-27.el5.x86_64.rpm

最后
rpm -ivh php-5.1.6-27.el5.x86_64.rpm
即可,这时候运行:
whereis php
php -v
显示
PHP 5.1.6 (cli) (built: Mar 31 2010 12:01:51)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
即表明安装成功。

P.S.:
在找httpd包的时候下了一个src.rpm包:
wget ftp://ftp.is.co.za/mirror/smeserver/releases/testing/8.0beta6/smeupdates-testing/SRPMS/httpd-2.2.3-43.el5.centos.3.src.rpm
在安装rpm -ivh httpd-2.2.3-43.el5.centos.3.src.rpm时提示
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root,
在网上找原因,见链接http://huangbao.blog.51cto.com/725279/152656
原因:
It's because you are installing a source rpm that was originally built using mock.
The source rpm contains all the binary packages, spec files etc. and from this package the standard rpm's are built.
You need to use the standard SDL_image-1.2.5-4.fc6.386.rpm or x86_64
意思是:需要下载一个已经编译好的标准rpm包。非src的源码package。src的源码package需要rpmbuild。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值