php7.0.8安装
php所需yum环境
yum -y install gd libxml2-devel libjpeg-devel libpng-devel net-snmp-devel curl-devel libxslt-devel pcre-devel libjpeg libpng libxml2 libcurl4-openssl-dev libcurl-devel libcurl libmysqlclient freetype-config freetype libxslt freetype-devel unixODBC
php编译安装
tar zxf php-7.0.8.tar.gz
cd php-7.0.8
./configure --prefix=/usr/local/php7 --with-curl --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-freetype-dir --with-jpeg-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
make && make install
复制php配置文件
cp php.ini-development /usr/local/php7/lib/php.ini
cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf
cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf
cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm
/etc/init.d/php-fpm 启动php服务
killall php-fpm 关闭php服务