지난 글에 이어 이번 글에서는 Apache 2.4로 업그레이드, 이후 PHP 7 업그레이드 방법을 알아 보겠습니다.
방법 2. Httpd 2.4로 업그레이드, PHP 7으로 업그레이드
(1) Httpd 업그레이드
패키지 다운로드
# wget https://archive.apache.org/dist/apr/apr-1.5.1.tar.bz2
# wget https://archive.apache.org/dist/apr/apr-util-1.5.3.tar.bz2
# wget http://epel.unix.website/archive/fedora/linux/releases/18/Fedora/source/SRPMS/d/distcache-1.4.5-23.src.rpm
# wget http://download.mostlylinux.com/6.4/x86_64/os/Packages/freetds-0.82-6.el6.x86_64.rpm
# wget http://download.mostlylinux.com/6.4/x86_64/os/Packages/freetds-devel-0.82-6.el6.x86_64.rpm
# wget https://archive.apache.org/dist/httpd/httpd-2.4.10.tar.bz2
Build and Install Apache Portable Runtime RPMs
# rpmbuild -tb apr-1.5.1.tar.bz2
# rpm -Uvh /root/rpmbuild/RPMS/x86_64/apr-1.5.1-1.x86_64.rpm /root/rpmbuild/RPMS/x86_64/apr-devel-1.5.1-1.x86_64.rpm
# rpmbuild -tb apr-util-1.5.3.tar.bz2
[에러] freetds-devel is needed by apr-util-1.5.3-1.x86_64
# rpm -Uvh freetds-0.82-6.el6.x86_64.rpm freetds-devel-0.82-6.el6.x86_64.rpm
# cd /root/rpmbuild/RPMS/x86_64
# rpm -Uvh apr-util-*
distcache 설치하기
# cd
# rpmbuild –rebuild distcache-1.4.5-23.src.rpm
# cd /root/rpmbuild/RPMS/x86_64
# rpm -Uvh distcache*.rpm
apache 빌드하기
# cd
# rpmbuild -tb httpd-2.4.10.tar.bz2
[에러] lua-devel is needed by httpd-2.4.6-1.x86_64
# wget http://ftp.stu.edu.tw/Linux/CentOS/6/os/x86_64/Packages/lua-devel-5.1.4-4.1.el6.x86_64.rpm
# rpm -Uvh lua-devel-5.1.4-4.1.el6.x86_64.rpm
# rpmbuild -tb httpd-2.4.10.tar.bz2
# cd /root/rpmbuild/RPMS/x86_64
# rpm -Uvh httpd*.rpm
[에러] httpd-mmn = 20051115 is needed by (installed) php-5.3.3-49.el6.x86_64
# rpm remove php-common
# rpm -Uvh httpd*.rpm
만약 service httpd stop 안되면 reboot
(2) Php 업그레이드 : remi repository 활용
# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
# wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
# rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm
# cd /etc/yum.repos.d
# vi remi-php70.repo
enabled=0 -> enabled=1
# yum update
설치 후 php 버전 확인 및 Apache restart합니다.
# php –version
# service httpd restart
그리고 http://example.com/index.php 해서 Php 7 버전으로 업그레이드 되었는지 확인합니다.