您的位置:首页 > 运维架构 > Linux

centos升级php-xml(php-dom)

2012-08-21 14:56 197 查看
rpm -q centos-release

php -v

yum list installed | grep php | cut -d' ' -f1

yum search php53 | cut -d' ' -f1 | grep php

chkconfig httpd on //设置apache为自启动

chkconfig mysqld on //mysqld服务

service httpd start //自启动 httpd 服务

service mysqld start //自启动mysqld服务

rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy
wget -P /etc/yum.repos.d/ http://repo.webtatic.com/yum/webtatic.repo
yum --enablerepo=webtatic -- update -y php

yum --enablerepo=webtatic -- install -y php-xml php-dom php-mcrypt php-gd php-mbstring php-mhash

yum --enablerepo=webtatic -- upgrade -y php-xml php-dom php-mcrypt php-gd php-mbstring php-mhash

service httpd restart

php –v
http://chrisjean.com/2011/06/24/upgrade-php-5-1-or-5-2-to-5-3-on-centos/ http://hi.baidu.com/zdczdc/item/c963c7f46786d3d743c36a6f
-------------------------------------------------------------

[root@localhost Server]# rpm -ivh vsftpd-2.0.5-12.el5.i386.rpm

[root@localhost Server]# chkconfig vsftpd on

[root@localhost pub]# rm -f *.html

在RHEL 5中每个目录下的repodata目录下都有一个repomd.xml,该文件中就记录了rpm包的依赖关系,还有一个comps-rhel5-*.xml文件,这个文件主要记录分组情况,建立yum仓库时,需要先重建该文件.
[root@localhost pub]# createrepo -g /var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml /var/ftp/pub/Server/1336/2223 - jakarta-commons-collections-testframework-javadoc-3.2-2jpp.3.i386.rp2223/2223 - pcmciautils-014-5.i386.rpm

[root@localhost pub]# createrepo -g /var/ftp/pub/VT/repodata/comps-rhel5-vt.xml /var/ftp/pub/VT/

32/32 - Virtualization-it-IT-5.2-9.noarch.rpm

[root@localhost pub]# service vsftpd restart

修改配置文件

[root@localhost ~]# vi /etc/yum.repos.d/rhel-debuginfo.repo

[rhel-debuginfo]

name=Red Hat Enterprise Linux $releasever - $basearch - Debug

baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[Server]

name=Server

baseurl=ftp://192.168.0.253/pub/Server

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[VT]

name=VT

baseurl=ftp://192.168.0.253/pub/VT

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[Cluster]

name=Cluster

baseurl=ftp://192.168.0.253/pub/Cluster

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[ClusterStorage]

name=ClusterStorage

baseurl=ftp://192.168.0.253/pub/ClusterStorage

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
配置完成最好要重新导入GPGKEY 的存放地址,我们需要用下面的命令导入这个签名。才能使用这项功能,有时不做这步,没有办法安装软件。
[root@localhost ~]# rpm -import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
安装结束!! http://blog.csdn.net/dingyan954/article/details/7084959
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: