编译式安装PHP
yum install -y curl curl-devel libxslt-devel*
--prefix是编译安装后的目录 --enable-fpm是为了支持nginx
/configure --prefix=/usr/local/php7 \ --with-curl \ --with-freetype-dir \ --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-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 \
--enable-fpm
表示安装成功
vim /etc/profile
在末尾加入
PATH=$PATH:/usr/local/php/bin
export PATH
可能需要安装的
http://blog.csdn.net/21aspnet/article/details/47708763
http://www.tuicool.com/articles/BR7Bza