2018년 August 15일
  1. 클라우드
  2. RHEL 6.7 에서 Httpd / PHP 업그레이드 방법...

RHEL 6.7 에서 Httpd / PHP 업그레이드 방법 (1)

이 방법은 RHEL(RedHat Enterprise Linux) 6.7 환경에서 패키지 기본 설치된 Httpd 2.2.x / Php 5.3 을 Httpd 2.4.x / Php 7 버전으로 업그레이드 하는 방법을 설명합니다.

결론: 이 방법은 PHP 설치 파일 경로가 Httpd 2.4 버전이 설치된 환경이 아닌 패키지 기본인 Httpd 2.1.5 버전을 참고하므로 패키지 업그레이드는 되나 설정 문제가 있어서 추천하지 않는 방법이다.


1. 기존 설치된 PHP 제거

# rpm -qa |egrep “^(epel|remi)”
# rpm remove -y yum list installed | cut -d " " -f 1 | grep php

or

# rpm -e ***.rpm


2. httpd 업그레이드

(1) epel httpd 24 repository 이용

# cd /etc/yum.repos.d/
# curl -O https://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo
# cat epel-httpd24.repo 
# yum search httpd24
# yum install httpd24
# ls -l /opt/rh/httpd24/root/etc/httpd
# ls -l /opt/rh/httpd24/root/usr/sbin/
# /opt/rh/httpd24/root/usr/sbin/httpd -V
# ls -l /etc/init.d/httpd*
# chkconfig –list | grep httpd
# cat /etc/logrotate.d/httpd24-httpd
# /etc/init.d/httpd stop
# /etc/init.d/httpd24-httpd start
# /etc/init.d/httpd24-httpd status

참고: 
– https://developers.redhat.com/blog/2013/10/24/apache-httpd-2-4-on-red-hat-enterprise-linux-6/
– https://www.lesstif.com/pages/viewpage.action?pageId=26084187
– https://www.rootlinks.net/2016/10/07/install-apache-2-4-on-centos-6-with-yum/


3. PHP 업그레이드

# 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

참고
– https://techglimpse.com/upgrade-php-53-7-yum-linux/ 

# cd /etc/yum.repo.d
# vi remi-php70.repo
enabled=0 -> enabled=1

# yum update

# php –version


4. Apache-Php 연동

apache 설치하고 php 설치할 경우
phpinfo() 출력되지 않을 경우
apache restart해 줌

만약, Permission deny server access 에러 발생 시
setenforce 체크
/etc/selinux/config


Leave a Reply

Your email address will not be published. Required fields are marked *

연관 글
BCT NEWS
인기 글
AI 트레이닝 센터
워드프레스 유지보수
BCT AI Chatbot
워드프레스 유지보수