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 updatesudo apt update...
오라클 클라우드 OCI 가입 드디어 성공 했습니다 (상세 후기)
2023년 2월 16일에 ‘오라클 클라우드 지급 검증 실패 글‘을 남긴 적이 있습니다.그 때 검색을 통해 해결 방법을 찾아 보았고, 당시 성공했던 분들의...
워드프레스 홈페이지를 HTML 파일로 변환하는 방법
이전에 워드프레스 홈페이지를 HTML로 변한할 수 있는지 요청이 왔을 때 Simply Static 플러그인으로 워드프레스 홈페이지를 HTML로 변환하는 방법을 테스트한 적이 있습니다....
Ubuntu 20.04에 MySQL 5.7 설치
비씨티원 인공지능 서비스 플랫폼 BAP(Bctone AI service Platform)의 설치 환경은 공식적으로 Ubuntu 18.04와 MySQL 버전 5.7 입니다. 최근 Ubuntu...
워드프레스에서 글 수정 후 구글 검색에 반영되기까지 걸리는 시간
다음과 같이 워드프레스 글 제목이  BCT0002: LEVEL 4으로 작성된 워드프레스 글이 있습니다.위 글은 다음과 같이 구글 검색에 색인되어 있습니다.최근 워드프레스 SEO...