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 *

인기 글

Ubuntu 22.04 LTS에 Python 3.8 or 3.9 설치 방법
서버 : Vultr 클라우드OS: Ubuntu 22.04 LTS사용자 계정 생성하여 설치 진행함 1. Start with the system update sudo apt update...
오라클 클라우드 OCI 가입 드디어 성공 했습니다 (상세 후기)
2023년 2월 16일에 ‘오라클 클라우드 지급 검증 실패 글‘을 남긴 적이 있습니다. 그 때 검색을 통해 해결 방법을 찾아 보았고, 당시 성공했던 분들의 후기...
AWS 인스턴스 유형 변경 방법
AWS 인스턴스 유형을 변경하기 위한 방법에는 다음 2가지가 있습니다.   1. 첫 번째 방법 AMI 이미지 생성 후 해당 이미지를 복원하여 신규 EC2 인스턴스를 생성하는...
카페24 호스팅 사용 중 해외에서 워드프레스 홈페이지 접속이 되지 않는 경우
주말에 한 클라이언트로부터 “중국, 대만, 인도 업체에서 홈페이지 접속이 되지 않는다는 연락이 왔는데, 어떻게 된 것인지 확인을 좀 해 달라”는 긴급 연락을 받았습니다....
Ubuntu 20.04에 MySQL 5.7 설치
비씨티원 인공지능 서비스 플랫폼 BAP(Bctone AI service Platform)의 설치 환경은 공식적으로 Ubuntu 18.04와 MySQL 버전 5.7 입니다. 최근 Ubuntu...