分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

linux + centos 安装php7.2.7 + swoole 4.0.3

发布时间:2023-09-06 02:14责任编辑:林大明关键词:暂无标签

【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

 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 -j 4 && make install

3.【版本】

[root@localhost soft]# php -vPHP 7.2.7 (cli) (built: Sep 12 2018 02:27:48) ( NTS )Copyright (c) 1997-2018 The PHP GroupZend 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

[root@localhost 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

 ?cd swoole-src-4.0.3
 make clean ?/datas/soft/php72/bin/phpize ??./configure --enable-async-redis --with-php-config=/datas/soft/php72/bin/php-config ??make ?make install ?php -m

Finish

linux + centos 安装php7.2.7 + swoole 4.0.3

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

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved