CentOS7.0にPHP5.6.30をインストールする

1.phpのダウンロード
# wget http://au1.php.net/get/php-5.6.30.tar.gz/from/this/mirror
#mv mirror php-5.6.30.tar.gz
#tar zxvf php-5.6.30.tar.gz
#cd php-5.6.30
#./configure –prefix=/usr/local/php –with-curl –with-freetype-dir –with-gd –with-gettext –with-iconv-dir –with-kerberos –with-libdir=lib64 –with-libxml-dir –with-MySQL –with-mysqli –with-openssl –with-pcre-regex –with-pdo-mysql –with-pdo-sqlite –with-pear –with-png-dir –with-xmlrpc –with-xsl –with-zlib –enable-fpm –enable-bcmath –enable-libxml –enable-inline-optimization –enable-gd-native-ttf –enable-mbregex –enable-mbstring –enable-opcache –enable-pcntl –enable-shmop –enable-soap –enable-sockets –enable-sysvsem –enable-xml –enable-zip

2.libxml2のインストール
#yum install libxml2
#yum install libxml2-devel -y

3.curlのインストール
#yum install curl curl-devel

4.libpngのインストール
#yum install libpng
#yum install libpng-devel

5.freetypeのインストール
#yum install freetype-devel

#yum install libxslt-devel

6.phpのインストール
#make && make install

7.php.iniのコピー
# cp php.ini-development /usr/local/php/lib/php.ini

#cp -R ./sapi/fpm/php-fpm.conf /usr/local/php/etc/php-fpm.conf
#cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm

8.php-fpmを操作
#service php-fpm start
#service php-fpm stop
#service php-fpm restart
#service php-fpm reload

Comments are closed.