linux php7.2.3安装,linux + centos 安装php7.2.7 + swoole 4.0.3

【Php】

下载地址:http://php.net/get/php-7.2.7.tar.gz.asc/from/a/mirror

【Ready】

用户:root

1.【解压】

tar -zxvf php-7.2.7.tar.gz

09505b1bf4830a0bfb45be293e92d6c2.png

cd php-7.2.7

2.【安装PHP】

#设置安装路径

./configure --prefix=/datas/soft/php72

#设置配置文件路径

--with-config-file-path=/datas/soft/php72/etc

--with-curl \

--with-gd \

--with-gettext \

--with-iconv-dir \

--with-kerberos \

--with-libdir=lib64 \

--with-libxml-dir \

--with-openssl \

--with-pcre-regex \

--with-pdo-sqlite \

--with-pear \

--with-xmlrpc \

--with-xsl \

--with-zlib \

--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-xml \

--enable-zip \

--enable-static \

--with-mysqli=mysqlnd \

--with-pdo-mysql=mysqlnd \

--with-freetype-dir \

--with-jpeg-dir \

--with-png-dir \

--disable-debug \

--disable-fileinfo \

--enable-maintainer-z

#编译安装

make clean && make -j4 && make install

3.【版本】

[[email protected] soft]# php -v

PHP7.2.7 (cli) (built: Sep 12 2018 02:27:48) ( NTS )

Copyright (c)1997-2018The PHP Group

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

4.【配置PHP.ini】

cp /datas/soft/php72/php.ini-production /datas/soft/php72/etc/php.ini

[[email protected] soft]# php -i | grep dir

Scan this dir for additional .ini files => (none)

extension_dir => /datas/soft/php72/lib/php/extensions/no-debug-non-zts-20170718 => /datas/soft/php72/lib/php/extensions/no-debug-non-zts-20170718

vi /datas/soft/php72/etc/php.ini

#找到extension_dir

设置extension_dir = "/datas/soft/php72/lib/php/extensions/no-debug-non-zts-20170718"

5.【下载swoole】

https://github.com/swoole/swoole-src/releases

2455030440a97786701f9314a225369b.png

cd swoole-src-4.0.3

makeclean/datas/soft/php72/bin/phpize./configure --enable-async-redis --with-php-config=/datas/soft/php72/bin/php-configmake

make install

php -m

a02e3a55548fe64d9343b520c3cfb72f.png

Finish

原文:https://www.cnblogs.com/GreenForestQuan/p/9437420.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值