[root@ser3 Desktop]# wget http://cn2.php.net/distributions/php-7.0.4.tar.gz
[root@ser3 Desktop]# rpm -qa libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 curl-devel libxslt-devel openssl-devel
[root@ser3 Desktop]# yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxslt-devel openssl-devel
[root@ser3 Desktop]# tar xf php-7.0.4.tar.gz
[root@ser3 Desktop]# cd php-7.0.4
[root@ser3 php-7.0.4]# ./configure --prefix=/usr/local/php7 --exec-prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --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 --with-zlib-dir --with-mhash --with-mcrypt --with-openssl-dir --with-jpeg-dir --enable-gd-jis-conv --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
[root@ser3 php-7.0.4]# make
[root@ser3 php-7.0.4]# make test
[root@ser3 php-7.0.4]# make install
[root@ser3 php-7.0.4]# cp php.ini-production /usr/local/php7/etc/php.ini
[root@ser3 php-7.0.4]# cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf
[root@ser3 php-7.0.4]# cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf
[root@ser3 php-7.0.4]# cp ./sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
[root@ser3 php-7.0.4]# chmod +x /etc/init.d/php-fpm
[root@ser3 php-7.0.4]# chkconfig --add php-fpm
[root@ser3 php-7.0.4]# /etc/init.d/php-fpm start
[root@ser3 php-7.0.4]# ps -ef | grep php-fpm
[root@wtj-web-01 php-7.0.4]# yum -y install curl-devel
执行成功如下
[root@wtj-web-01 php-7.0.4]# wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz
[root@wtj-web-01 php-7.0.4]# tar -zxvf libmcrypt-2.5.7.tar.gz
[root@wtj-web-01 php-7.0.4]# cd libmcrypt-2.5.7
[root@wtj-web-01 php-7.0.4]# ./configure --prefix=/usr/local/libmcrypt
[root@wtj-web-01 php-7.0.4]#make && make install