作者:手机用户2602935245 | 来源:互联网 | 2023-09-14 14:21
centos7.2下编译安装php7.1.3步骤教程centos7编译安装php-7.1.3的步骤在官网下载php-7.1.3的php压缩包,centos7安装php-7.1.3的
centos7.2下编译安装php7.1.3步骤教程
centos 7 编译安装 php-7.1.3的步骤
在官网下载php-7.1.3的php压缩包,centos 7 安装 php-7.1.3的步骤
下载好后解压php-7.1.3.tar.gz压缩包,并进入解压后的目录
tar -zxvf php-7.1.3.tar.gz
cd php-7.1.3
安装php7需要的一些依赖库包 libxml2和一些其他依赖的扩展库
yum -y install libxml2
yum -y install libxml2-devel
yum -y install openssl
yum -y install openssl-devel
yum -y install curl-devel
yum -y install libjpeg-devel
yum -y install libpng-devel
yum -y install freetype-devel
yum -y install bzip2-devel
yum -y install libmcrypt libmcrypt-devel
yum -y install postgresql-devel
yum -y install aspell-devel
yum -y install readline-devel
yum -y install libxslt-devel
yum -y install net-snmp-devel
yum -y install unixODBC-devel
yum -y install libicu-devel
yum -y install libc-client-devel
yum -y install libXpm-devel
yum -y install libvpx-devel
yum -y install enchant-devel
yum -y install openldap
yum -y install openldap-devel
yum -y install db4-devel
yum -y install gmp-devel
yum -y install sqlite-devel
yum -y install mysql-devel
#./configure --prefix=/usr/local/php --with-config-file-path=/etc/php \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-pdo-mysql=/usr \
--with-libxml-dir=/usr/include/libxml2 \
--enable-ssl --enable-cgi --enable-mods-shared=allable-ssl \
--enable-cgi --enable-mods-shared=all \
--enable-track-vars --enable-rewrite --enable-so
对php7进行编译和安装的操作
mkdir /etc/php
make
make install
config php
cp -f php.ini-development /etc/php/php.ini
编译成功,查看php版本
/usr/local/php/bin/php -v
运行php-fpm
/usr/local/php/sbin/php-fpm