Centos7) php5.3.29 source install

Nari.·2021년 7월 13일
0

Linux

목록 보기
4/5
post-thumbnail

1. 시나리오

Cento7 기반의 Linux에 PHP5.3.29를 "소스 설치"하는 과정.



2. install

2-1. 사전 필수 패키지 설치

만약 이미 설치된 패키지들이 있다면 자동으로 yum이 건너 뛰고 설치를 진행함. 돈워리~~~

$ yum -y install gcc* cpp* compat-gcc* flex* \
libjpeg* libpng* freetype* gd-* ncurses* libtermcap* \
libxml* libjpeg-devel libpng-devel libxml2-devel

$ yum -y install curl-devel libpng \
libpng-devel libjpeg libjpeg-devel libwebp \
libwebp-devel libXpm libXpm-devel openssl \
openssl-devel autoconf curl zlib zlib-devel \
freetype freetype-devel gd gd-devel \
libjpeg libjpeg-devel libmcrypt libmcrypt-devel \
libtool-ltdl-devel libzip libzip-devel \
oniguruma-devel cmake gcc-c++ gcc \
libxml2-devel libxml2 libcurl libcurl-devel \
bzip2-devel sqlite-devel gmp gmp-devel


2-2.

$ yum install perl -y
$ vi /usr/local/apache/bin/apxs

# 맨 첫번째줄만 수정해야함
#!/replace/with/path/to/perl/interpreter -w 부분 수정
#!/usr/bin/perl -w  //perl 실행 경로로 수정


$ cd /usr/local/src
$ wget http://mirror.cogentco.com/pub/php/php-5.3.29.tar.gz
$ tar -zxvf php-5.3.29.tar.gz
$ cd php-5.3.29

./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/apache/conf \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-curl \
--disable-debug \
--enable-safe-mode  \
--enable-sockets \
--enable-sysvsem=yes \
--enable-sysvshm=yes \
--enable-ftp \
--enable-magic-quotes \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-bcmath \
--with-zlib \
--with-gd \
--with-gettext \
--with-jpeg-dir=/usr \
--with-png-dir=/usr/lib \
--with-freetype-dir=/usr \
--with-libxml-dir=/usr \
--enable-exif \
--enable-sigchild \
--enable-mbstring \
--with-openssl


$ make && make install
$ cp ./php.ini-development /usr/local/apache/conf/php.ini

0개의 댓글