본문 바로가기
서버/LINUX

아파치 및 CURL버전 업데이트

by 죠부니 2023. 12. 6.
반응형

아파치 업데이트
CentOS Linux release 7.9.2009 (Core) 버전에서 진행

아래부터 보고 오세요

아래부분을 진행 하고나면 PHP가 왜 연결이 안될까 문제가 생길것이다

cd /etc/httpd/conf.modules.d 폴더에 들어가게되

00-mpm.conf 파일이 보일것이다

PHP돌리는 방식에 대한 내용인데 자세한건 스킵하고

이벤트 부분을 주석처리하고 prefork부분으로 설정한다.

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

#LoadModule mpm_event_module modules/mod_mpm_event.so

--

PHP상에서 CURL버전을보니 왜 그대로인가.. CitiFan으로 간다.

vi /etc/yum.repos.d/city-fan.repo
[CityFan] 
name=City Fan Repo 
baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel$releasever/$basearch/ 
enabled=1 
gpgcheck=0

yum clean all

yum install curl

=====

@기존내용

yum update
yum info httpd
2.4.6이 최신버전
yum install epel-release
--codeit으로 레포 업데이트


cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo


yum list httpd

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.kakao.com
 * epel: mirror-nrt.yuki.net.uk
 * extras: mirror.kakao.com
 * remi-php81: cdn.centos.no
 * remi-safe: cdn.centos.no
 * updates: mirror.kakao.com
CodeIT                                                                                                                                                                          | 3.0 kB  00:00:00     
CodeIT/x86_64/primary_db                                                                                                                                                        |  97 kB  00:00:01     
Installed Packages
httpd.x86_64                                                                               2.4.6-99.el7.centos.1                                                                               @updates
Available Packages
httpd.x86_64                                                                               2.4.58-1.codeit.el7                                                                                 CodeIT 

최신버전 2.4.58 사용가능

yum install httpd
yum -y install httpd

httpd -v
Server version: Apache/2.4.58 (codeit)
Server built:   Oct 19 2023 10:27:37


CURL 업데이트

$ curl --version

curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.53.1 zlib/1.2.7 libidn/1.28 libssh2/1.8.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets 


1. 컴파일 도구 설치
sudo yum install -y gcc make
2. 컴파일에 필요한 의존성 설치
sudo yum install -y openssl-devel libnghttp2-devel
3. curl 소스 코드 다운로드
cURL Download : https://curl.se/download.html

설치당시 최신버전 8.4.0

cd /usr/local/src
wget https://curl.se/download/curl-8.4.0.tar.gz
tar xfz curl-8.4.0.tar.gz
cd curl-8.4.0

4. 컴파일 및 설치
./configure --with-nghttp2 --with-ssl --prefix=/usr/local

make

make install


5. 기존 curl 대신 컴파일한 버전을 사용하도록 심볼릭 링크 설정

sudo mv /usr/bin/curl /usr/bin/curl_old
sudo ln -s /usr/local/bin/curl /usr/bin/curl

6. 버전확인

curl --version

curl 8.4.0 (x86_64-pc-linux-gnu) libcurl/8.4.0 OpenSSL/1.0.2k-fips zlib/1.2.7 nghttp2/1.58.0 OpenLDAP/2.4.44
Release-Date: 2023-10-11
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM SSL UnixSockets

======

업데이트 이유 APNS PUSH사용시 HTTP2가 필요하다

HTTP2

반응형

'서버 > LINUX' 카테고리의 다른 글

SSL 비번제거  (0) 2023.04.17
Janus 버전 업데이트  (0) 2022.11.22
php -m  (0) 2020.05.21
VMWARE + Centos7 + APM - 9  (0) 2020.04.10
VMWARE + Centos7 + APM - 8  (0) 2020.04.10