zoukankan      html  css  js  c++  java
  • 编译安装PHP

    编译安装PHP - 7.3.16

    1 ) 安装依赖包:

    yum install -y gcc gcc-c++  make zlib zlib-devel pcre pcre-devel  libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers libzip libzip-devel libxslt libxslt-devel
    
    yum remove -y libzip
    
    wget https://nih.at/libzip/libzip-1.2.0.tar.gz
    tar -zxvf libzip-1.2.0.tar.gz
    cd libzip-1.2.0
    ./configure && make && make install
    
    cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
    #添加搜索路径到配置文件
    vim /etc/ld.so.conf 
    
    /usr/local/lib64
    /usr/local/lib
    /usr/lib
    /usr/lib64
    
    ## 保存退出:
    #然后 更新配置
    ldconfig -v
    

    2 ) 下载php-7.3.16 安装包

    wget https://www.php.net/distributions/php-7.3.16.tar.gz
    tar -zxf php-7.3.16.tar.gz
    cd php-7.3.16
    
    ./configure --prefix=/data/soft/php7 --with-pdo --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml --enable-soap --enable-calendar --with-curl --with-gd --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-jpeg --with-png --with-openssl --with-fpm-user=fmw --with-fpm-group=fmw  --with-libdir=/lib/x86_64-linux-gnu/ --enable-ftp --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm --with-iconv --with-xpm
    
    make && make install  
    
    ln -s /data/soft/php7 /data/soft/php
    cp php.ini-production /data/soft/php7/etc/php.ini 
    cd /data/soft/php7/etc;
    cp php-fpm.conf.default php-fpm.conf
    cd /data/soft/php/etc/php-fpm.d
    cp www.conf.default www.conf
    
    ## 添加环境变量:
    cd /etc/profile.d/
    vim php-fpm.sh
    PATH=$PATH:$HOME/bin:/data/soft/php/bin/;/data/soft/php/sbin
    export PATH
    
    ## 全局变量生效:
    source /etc/profile
    
    ## 添加启动文件: 
    cp /data/src/php-7.3.16/sapi/fpm/php-fpm.service /usr/lib/systemd/system/
    systemctl enable php-fpm
    systemctl restart php-fpm.service
    systemctl status php-fpm.service
    
    
    
  • 相关阅读:
    单例模式
    HashSet、LinkedHashSet、SortedSet、TreeSet
    ArrayList、LinkedList、CopyOnWriteArrayList
    HashMap、Hashtable、LinkedHashMap
    andrew ng machine learning week8 非监督学习
    andrew ng machine learning week7 支持向量机
    andrew ng machine learning week6 机器学习算法理论
    andrew ng machine learning week5 神经网络
    andrew ng machine learning week4 神经网络
    vue组件监听属性变化watch方法报[Vue warn]: Method "watch" has type "object" in the component definition. Did you reference the function correctly?
  • 原文地址:https://www.cnblogs.com/zhenxing06/p/12706890.html
Copyright © 2011-2022 走看看