• 编译安装php7.2.21


    php 编译

    下载php源码

    https://www.php.net/distributions/php-7.2.21.tar.gz

    安装依赖

    yum -y install wget vim pcre pcre-devel openssl openssl-devel libicu-devel 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 ncurses ncurses-devel curl curl-devel krb5-devel libidn libidn-devel openldap openldap-devel nss_ldap jemalloc-devel cmake boost-devel bison automake libevent libevent-devel gd gd-devel libtool* libmcrypt libmcrypt-devel mcrypt mhash libxslt libxslt-devel readline readline-devel gmp gmp-devel libcurl libcurl-devel openjpeg-devel systemd-devel
    

    编译安装

    ./configure 
    --prefix=/usr/local/php 
    --enable-fpm 
    --enable-mysqlnd 
    --with-mysqli=mysqlnd 
    --with-pdo-mysql=mysqlnd 
    --enable-mysqlnd-compression-support 
    --with-iconv-dir 
    --with-freetype-dir 
    --with-jpeg-dir 
    --with-png-dir 
    --with-zlib 
    --with-libxml-dir 
    --enable-xml 
    --disable-rpath 
    --enable-bcmath 
    --enable-shmop 
    --enable-sysvsem 
    --enable-inline-optimization 
    --with-curl 
    --enable-mbregex 
    --enable-mbstring 
    --enable-intl 
    --with-mcrypt 
    --with-libmbfl 
    --enable-ftp 
    --with-gd 
    --enable-gd-jis-conv 
    --enable-gd-native-ttf 
    --with-openssl 
    --with-mhash 
    --enable-pcntl 
    --enable-sockets 
    --with-xmlrpc 
    --enable-zip 
    --enable-soap 
    --with-gettext 
    --disable-fileinfo 
    --enable-opcache 
    --with-pear 
    --enable-maintainer-zts 
    --with-ldap=shared 
    --without-gdbm 
    --with-fpm-systemd 
    --with-pcre-jit
    

    配置启动脚本

    cp /usr/local/src/php-7.2.21/php-fpm.service /usr/lib/systemd/system/php-fpm.service
    
    cp /usr/local/src/php-7.2.21/php.ini.development /usr/local/php/etc/php.ini
    cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
    
    systemctl start php-fpm
    

    nginx解析php脚本

     location ~ .php$ {
                root           html;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
                #include        fastcgi_params; #默认配置,但是会出错,改成下面一行即可
                include        fastcgi.conf;
            }
    
  • 相关阅读:
    剑指offer_24:二叉树中和为某一值的路径
    剑指offer_23:二叉搜索树的后序遍历序列
    Java基础类型大小
    旋转数组
    剑指offer_22:从上往下打印二叉树
    剑指offer_21:栈的压入、弹出序列
    剑指offer_20:包含min函数的栈
    剑指offer_19:顺时针打印矩阵
    剑指offer_18:二叉树的镜像
    redis jedis源码
  • 原文地址:https://www.cnblogs.com/super-lulu/p/11380739.html
Copyright © 2020-2023  润新知