搞这东西竟然用了近1天,主要还是php7编译安装的问题,不了解啊,看了不少资料才勉强弄好,差一点就放弃了,最后不经意间弄好了,信心瞬间恢复,嘿嘿加油
原理啥的并不是很懂,就先操作好了。下面是教程:
在安装php前先安装一些依赖
yum install openssl openssl-devel
yum -y install curl-devel
yum install -y libxslt libxslt-devel libxml2 libxml2-devel
下载php7.0.8到/opt
cd /opt
wget http://php.net/downloads.php/php-7.0.8.tar.gz
解压
tar -zxvf php-7.0.8.tar.gz
编译安装:
./configure --prefix=/opt/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 \
--w