【php】安装7.2

参考:https://www.cnblogs.com/achengmu/p/9517337.html

https://www.cnblogs.com/ywrj/p/9404394.html

centos7.2 阿里云 php7.2.3安装
cd /usr/src
wget http://cn2.php.net/distributions/php-7.2.3.tar.gz
tar -zxvf php-7.2.3.tar.gz
cd php-7.2.3/
yum install gcc
yum install libxml2
yum install libxml2-devel
yum -y install openssl
yum -y install openssl-devel
yum -y install curl
yum -y install curl-devel
yum -y install libjpeg
yum -y install libjpeg-devel
yum -y install libpng
yum -y install libpng-devel
yum -y install freetype
yum -y install freetype-devel
yum -y install pcre
yum -y install pcre-devel
yum -y install libxslt
yum -y install libxslt-devel
yum -y install bzip2
yum -y install bzip2-devel


yum -y install gcc gcc-c++ libmcrypt-devel mcrypt mhash gd-devel ncurses-devel \
libxml2-devel bzip2-devel libcurl-devel curl-devel libjpeg-devel libpng-devel freetype-devel \
  net-snmp-devel openssl-deve python-devel zlib-devel freetype libxslt* bison autoconf re2c

./configure --prefix=/usr/local/php72 \
--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-jpeg-dir \
  --with-xmlrpc \
  --with-xsl \
  --with-zlib \
  --with-bz2 \
  --with-mhash \
  --enable-fpm \
  --enable-bcmath \
  --enable-libxml \
  --enable-inline-optimization \
  --enable-mbregex \
  --enable-mbstring \
  --enable-opcache \
  --enable-pcntl \
  --enable-shmop \
  --enable-soap \
  --enable-sockets \
  --enable-sysvsem \
  --enable-sysvshm \
  --enable-xml \
   --enable-zip


   ./configure --prefix=/usr/local/php72 --with-config-file-path=/etc/php72 --enable-fpm

   --with-config-file-path:指定php.ini路径
   --prefix 主程序安装目录

   make
   make install
   /usr/local/php72/bin/php -v
   /usr/local/php72/bin/php -m
   [PHP Modules]
   Core
   ctype
   date
   dom
   fileinfo
   filter
   hash
   iconv
   json
   libxml
   pcre
   PDO
   pdo_sqlite
   Phar
   posix
   Reflection
   session
   SimpleXML
   SPL
   sqlite3
   standard
   tokenizer
   xml
   xmlreader
   xmlwriter

   [Zend Modules]
 

 

问题:Configuration file为none

php-fpm和nginx可以改为用socket通信

参考:https://www.cnblogs.com/achengmu/p/9517337.html

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值