php7 安装,lamp之php7.2.9安装

php官网

http://php.net/

The PHP development team announces the immediate availability of PHP 7.2.9. This is a bugfix release.

All PHP 7.2 users are encouraged to upgrade to this version.  #官方鼓励安装这个版本

[root@s100 ~]# uname -a

Linux s100 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

安装

yum install zlib-devel libxml2-devel libjpeg-turbo-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel -y

yum install libmcrypt-devel -y

yum install mhash -y

yum install mcrypt -y

yum install gcc-c++

yum -y install libicu-devel

yum install openssl-devel -y

wget http://hk1.php.net/get/php-7.2.9.tar.gz/from/this/mirror

useradd www -s /sbin/nologin -M

tar xf php-7.2.9.tar.gz

cd php-7.2.9

./configure \

--prefix=/usr/local/php7.2.29 \

--with-mysql=mysqlnd \

--with-pdo-mysql=mysqlnd \

--with-iconv-dir=/usr/local/libiconv \

--with-pcre-regex \

--with-freetype-dir \

--with-libxml-dir=/usr \

--with-jpeg-dir \

--with-png-dir \

--with-zlib \

--with-bz2 \

--enable-xml \

--disable-rpath \

--enable-bcmath \

--enable-shmop \

--enable-sysvsem \

--enable-inline-optimization \

--with-curl \

--enable-mbregex \

--enable-mbstring \

--with-mcrypt \

--with-gd \

--enable-zip \

--enable-skip-gd-check \

--enable-gd-native-ttf \

--with-openssl \

--with-mhash \

--enable-pcntl \

--enable-sockets \

--with-xmlrpc \

--enable-soap \

--enable-short-tags \

--enable-static \

--with-xsl \

--enable-ftp

make && make install

ln -s /usr/local/php7.2.29/ /usr/local/php

vim /etc/ld.so.conf

include ld.so.conf.d/*.conf

/usr/local/php/lib

ldconfig

仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值