zoukankan      html  css  js  c++  java
  • 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

     cd php-7.2.7

    【注】安装前要依赖的库

    yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurse ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers gmp gmp-devel ibmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel

    2.【安装PHP】

    #设置配置文件路径
     ./configure    --prefix=/datas/soft/php72/etc --with-config-file-path=/datas/soft/php72/lib --enable-fpm --with-fpm-user=nginx   --with-fpm-group=nginx   --enable-inline-optimization   --disable-debug   --disable-rpath   --enable-shared   --enable-soap   --with-xmlrpc   --with-openssl   --with-mcrypt   --with-pcre-regex   --with-sqlite3   --with-zlib   --enable-bcmath   --with-iconv   --with-bz2   --enable-calendar   --with-cdb   --enable-dom   --enable-exif   --enable-fileinfo   --enable-filter   --with-pcre-dir   --enable-ftp   --with-gd   --with-openssl-dir   --with-jpeg-dir   --with-png-dir   --with-freetype-dir   --enable-gd-native-ttf   --enable-gd-jis-conv   --with-gettext   --with-gmp   --with-mhash   --enable-json   --enable-mbstring   --enable-mbregex   --enable-mbregex-backtrack   --with-libmbfl   --with-onig   --enable-pdo   --with-mysqli=mysqlnd   --with-pdo-mysql=mysqlnd   --with-zlib-dir   --with-pdo-sqlite   --with-readline   --enable-session   --enable-shmop   --enable-simplexml   --enable-sockets   --enable-sysvmsg   --enable-sysvsem   --enable-sysvshm   --enable-wddx   --with-libxml-dir   --with-xsl   --enable-zip   --enable-mysqlnd-compression-support   --with-pear   --enable-opcache   --with-curl  


    #编译安装
    make clean && make -j 4 && make install

    3.【版本】

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

    [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

    您的资助是我最大的动力!
    金额随意,欢迎来赏!

    如果,您认为阅读这篇博客让您有些收获,不妨点击一下右下角的推荐按钮。
    如果,您希望更容易地发现我的新博客,不妨点击一下绿色通道的关注我

    如果,想给予我更多的鼓励,求打

    因为,我的写作热情也离不开您的肯定支持,感谢您的阅读!

  • 相关阅读:
    javamail 利用qq邮箱做邮箱服务器,简单小demo
    apache tiles 页面模板的使用
    PHP中Cookie与Session的异同以及使用
    PHP二维数组--去除指定列含有重复项的数组
    PHP实现简单的双色球机选号码
    PHP常用的数学函数和字符串函数
    PHP日期函数
    PHP的操作符与控制结构
    PHP的变量作用域-常亮-全局变量-表单提交变量
    PHP四种输出语句
  • 原文地址:https://www.cnblogs.com/GreenForestQuan/p/9437420.html
Copyright © 2011-2022 走看看