1. curl 설치
※ Centos7 환경에서 진행하였습니다.
최신버전은 curl 홈페이지에서 다운로드 가능합니다.
curl 홈페이지 : https://curl.haxx.se/download.html
기존에 설치되어있는 curl을 backup으로 돌린뒤에 진행하였습니다.
# mv /usr/bin/curl /usr/bin/curl_bak
# mv /usr/include/curl /usr/include/curl_bak
현재 설치된 curl 버전
# curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.34 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
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
# cd /usr/local/src
# wget https://curl.haxx.se/download/curl-7.61.1.tar.gz
# tar xvfz curl-7.61.1.tar.gz
# cd curl-7.61.1
# ./configure --prefix=/usr/local/curl
# make && make install
# ln -s /usr/local/curl/bin/curl /usr/bin/curl
# ll /usr/bin/curl
lrwxrwxrwx 1 root root 24 Oct 31 12:06 /usr/bin/curl -> /usr/local/curl/bin/curl
설치된 버전 확인
# curl -V
curl 7.61.1 (x86_64-pc-linux-gnu) libcurl/7.61.1 OpenSSL/1.0.2k zlib/1.2.7
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets HTTPS-proxy
2. php 확장 설치
php 소스 설치 경로로 간 뒤에, ext 경로에서 curl 디렉토리로 이동합니다.
# /usr/local/php/bin/phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config \
--enable-curl --with-curl=/usr/local/curl
# make && make install
# vi /usr/local/apache/conf/php.ini
[extension]
extension_dir=/usr/local/php/lib/php/extensions/no-debug-zts-20090626
extension=curl.so
# /etc/init.d/apachectl restart
# /usr/local/php/bin/php -m | grep curl
curl
'LINUX > BASIC' 카테고리의 다른 글
Ubuntu VNCserver 구축 (0) | 2019.06.01 |
---|---|
Openssl 소스설치 (0) | 2019.06.01 |
iperf 사용법 (0) | 2019.06.01 |
SSH 에러 (1) | 2019.06.01 |
Quota (0) | 2019.06.01 |