问题1:
Cannot find ldap.h
解决办法:
yum install openldap
yum install openldap-devel
问题2:
Cannot find ldap libraries in /usr/lib
解决办法:
cp -frp /usr/lib64/libldap* /usr/lib/
问题3:
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解决办法:
yum install libxslt-devel
下载php7.0.tar.gz
./configure --prefix=/usr/local/php/v7 --with-config-file-path=/usr/local/php/v7/etc --with-mysqli=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql --with-iconv-dir=/usr/local/ --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-zlib-dir --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-sysvshm --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap=/usr/ --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --enable-opcache --enable-ftp --enable-calendar --with-xsl --with-gettext --enable-session --enable-ctype --with-kerberos --with-libdir=/lib/ --with-pcre-regex --enable-exif --with-bz2
完成配置,开始编译安装
make ZEND_EXTRA_LIBS='-liconv'
make install
注册服务
cp php.ini-production /usr/local/php/v7/etc/php.ini
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm7
chmod 755 /etc/init.d/php-fpm7
chkconfig --add php-fpm7
chkconfig php-fpm7 on