CentOS6.x下升级httpd2.4.3到httpd2.4.10
首先下载需要的包:
apr-1.5.1.tar.bz2
apr-util-1.5.3.tar.bz2
distcache-1.4.5-23.src.rpm
freetds-devel-0.82-6.el6.x86_64.rpm
freetds-0.82-6.el6.x86_64.rpm
lua-devel-5.1.4-4.1.el6.x86_64.rpm
httpd-2.4.10.tar.bz2
安装下载的现成rpm包:
# cd ~/httpd-2.4.10
安装下载的现成rpm包:
# cd ~/httpd-2.4.10
这个是系统源的mysql-devel包:
# rpm -ivh –nodeps /systemiso/rhel6.2/Packages/mysql-devel-5.1.52-1.el6_0.1.x86_64.rpm
# rpm -ivh freetds-0.82-6.el6.x86_64.rpm
# rpm -ivh freetds-devel-0.82-6.el6.x86_64.rpm
# rpm -ivh lua-devel-5.1.4-4.1.el6.x86_64.rpm
编译建立新的安装包:
# rpmbuild -tb apr-1.5.1.tar.bz2
# rpmbuild -tb apr-util-1.5.3.tar.bz2
# rpmbuild –rebuild distcache-1.4.5-23.src.rpm
# rpmbuild -tb httpd-2.4.10.tar.bz2
删除系统原有安装包:
# cd /root/rpmbuild/RPMS/x86_64
# service httpd stop
# yum remove apr
# yum remove apr-devel
# yum remove apr-util
# yum remove apr-util-ldap
# rpm -ivh –nodeps /systemiso/rhel6.2/Packages/mysql-devel-5.1.52-1.el6_0.1.x86_64.rpm
# rpm -ivh freetds-0.82-6.el6.x86_64.rpm
# rpm -ivh freetds-devel-0.82-6.el6.x86_64.rpm
# rpm -ivh lua-devel-5.1.4-4.1.el6.x86_64.rpm
编译建立新的安装包:
# rpmbuild -tb apr-1.5.1.tar.bz2
# rpmbuild -tb apr-util-1.5.3.tar.bz2
# rpmbuild –rebuild distcache-1.4.5-23.src.rpm
# rpmbuild -tb httpd-2.4.10.tar.bz2
删除系统原有安装包:
# cd /root/rpmbuild/RPMS/x86_64
# service httpd stop
# yum remove apr
# yum remove apr-devel
# yum remove apr-util
# yum remove apr-util-ldap
备份httpd配置目录:
# cp -r /etc/httpd /etc/httpd.bak
# yum remove httpd
# rpm -e –nodeps httpd
# cp -r /etc/httpd /etc/httpd.bak
# yum remove httpd
# rpm -e –nodeps httpd
再安装新编译的安装包:
# rpm -Uvh apr-1.5.1-1.x86_64.rpm
# rpm -Uvh apr-devel-1.5.1-1.x86_64.rpm
# rpm -Uvh apr-util-1.5.3-1.x86_64.rpm
# rpm -Uvh apr-util-devel-1.5.3-1.x86_64.rpm
# rpm -Uvh distcache-1.4.5-23.x86_64.rpm
# rpm -Uvh distcache-devel-1.4.5-23.x86_64.rpm
# rpm -Uvh httpd-tools-2.4.10-1.x86_64.rpm
# rpm -Uvh httpd-2.4.10-1.x86_64.rpm
恢复httpd配置目录:
# cp -r /etc/httpd /etc/httpd.new
# cp -r /etc/httpd.bak /etc/httpd
# service httpd start