728x90
PHP 자동 설치 스크립트 (php install script )
www.php.net에서 최신의 안정 버전의 버전 정보를 확인 합니다. 그리고 아래와 같이 버전 정보를 수정합니다.
간혹 수정된 내용의 히스토리를 기억 하기 위해서 아래와 같이 릴리즈된 날짜도 같이 기입해서 설치한 버전의 이력을 관리 할 수 있도록 합니다.
VER="5.6.19" #20160325
아래 소스를 /usr/local/src/websrc 에 만들고 실행 하면 됩니다.
/usr/local/src/websrc/install_php.sh
mkdir php_src cd php_src # *************************************** echo " >> GET PHP-SRC " # *************************************** VER="5.4.0" VER="5.3.13" VER="5.4.11" #20130213 VER="5.6.19" #20160325 VER="7.6.31" #20170706 VER="7.1.8" #20170803 rm -rf php-$VER if [ ! -f php-$VER.tar.bz2 ] then echo " >> PHP Download !! " wget http://kr.php.net/get/php-$VER.tar.bz2/from/this/mirror -O php-$VER.tar.bz2 tar xvjf php-$VER.tar.bz2 else ls -al php-$VER.tar.bz2 tar xvjf php-$VER.tar.bz2 fi ## -------------------------------------------------- yum install -y re2c libxml2 libxml2-devel libcurl libcurl-devel libXpm libXpm-devel gd gd-devel pcre pcre-devel net-snmp net-snmp-devel # *************************************** echo " >> Configure PHP " # *************************************** cd php-${VER} make clean PLATFORM=`uname -i` lib_src="/usr/lib" if [ $PLATFORM = "x86_64" ] then lib_64=" --with-libdir=lib64 " lib_src="/usr/lib64" export LDFLAGS="-L/usr/lib64 -L/usr/lib" fi if [ -d "/usr/local/apache2" ] then config_apache=" --with-apxs2=/usr/local/apache2/bin/apxs "; fi if [ -f ~oracle/.bashrc ] then config_oracle=" --with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib --enable-sigchild --enable-inline-optimization " config_oracle_pdo=" --with-pdo-oci=instantclient,/usr,11.2 " fi oracle_client_chk=`find /usr/includes -name "oci.h" 2>/dev/null | wc -l` if [ $oracle_client_chk -eq 1 ] then config_oracle=" --with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib --enable-sigchild --enable-inline-optimization " config_oracle_pdo=" --with-pdo-oci=instantclient,/usr,11.2 " fi MYSQL_CONFIG="/usr/bin/mysql_config" if [ -e "$MYSQL_CONFIG" ] then MYSQL_LIB_DIR=`/usr/bin/mysql_config --variable=pkglibdir`; if [ ! -L $MYSQL_LIB_DIR/libmysqlclient.so ] then MYSQL_LD_CLNT_SO=`find $MYSQL_LIB_DIR -name "libmysqlclient.so.*" |sort|tail -1 ` MYSQL_LD_CLNT_R=`find $MYSQL_LIB_DIR -name "libmysqlclient_r.so.*" |sort|tail -1 ` if [ -f "$MYSQL_LD_CLNT_SO" ] then ln -s $MYSQL_LD_CLNT_SO ${MYSQL_LIB_DIR}/libmysqlclient.so ln -s $MYSQL_LD_CLNT_R ${MYSQL_LIB_DIR}/libmysqlclient_r.so fi echo " SHARED Obj MAKE LINK : ln -s $MYSQL_LD_CLNT_SO ${MYSQL_LIB_DIR}/libmysqlclient.so "; echo " SHARED Obj MAKE LINK : ln -s $MYSQL_LD_CLNT_R ${MYSQL_LIB_DIR}/libmysqlclient_r.so "; fi config_mysql=" --with-mysql=mysqlnd --with-mysqli=mysqlnd "; config_mysql_pdo=" --with-pdo-mysql=mysqlnd "; fi if [ -d "/usr/pgsql" ] then config_pgsql=" --with-pgsql=/usr/pgsql "; #config_pdo_pgsql=" --with-pdo-pgsql=/usr/pgsql "; fi ./configure --prefix=/usr/local --exec-prefix=/usr/local \ $config_apache $lib_64 --enable-fpm \ --enable-sockets --enable-zip --enable-shared --enable-static \ --enable-mbstring --enable-mbregex --enable-bcmath --enable-ftp --disable-debug \ --with-config-file-path=/usr/local/lib --with-curl=/usr \ --with-openssl --with-iconv \ --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf \ $config_oracle $config_oracle_pdo \ $config_mysql $config_mysql_pdo \ $config_pgsql $config_pgsqll_pdo \ --with-snmp=/usr --with-openssl-dir=/usr \ --enable-roxen-zts # --with-pdo-oci=instantclient,/usr/lib/oracle/11.2/client64/lib,11.2 \ tail -50 config.log make && make install > install_php_fpm.log & |
728x90
반응형
'DevOps' 카테고리의 다른 글
Open API platform Kong 소개 (0) | 2018.09.25 |
---|---|
[CentOS&Linux] Daemon management with systemctl (systemd를 위한 nginx 데몬 관리 스크립트) (0) | 2017.08.22 |
nginx install script ( nginx 자동 설치 스크립트) (0) | 2017.08.22 |
CheerpJ는 자바 응용 프로그램을 웹용 JavaScript로 변환? (0) | 2017.06.25 |
Reactive Programming with JDK 9 Flow API (0) | 2017.06.20 |
Java 101 : 자바 인터페이스 - 재사용 가능한 Java 인터페이스 (0) | 2017.06.20 |
Android Studio for beginners, Part 4: Advanced tools and plugins (2) (0) | 2017.06.17 |