• centos PHP编译安装步骤


    PHP安装

    安装需要的依赖

      yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel -y
      yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel -y
    

    安装依赖libiconv

      cd /server/tools/
      wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
      tar zxf libiconv-1.16.tar.gz
      cd libiconv-1.16
      ./configure --prefix=/application/libiconv
      make
      make install
    

    检查依赖包

     # rpm -qa zlib-devel libxml2-devel libjpeg-turbo-devel libiconv-devel
    
      zlib-devel-1.2.7-18.el7.x86_64
      libxml2-devel-2.9.1-6.el7_2.3.x86_64
      libjpeg-turbo-devel-1.2.90-6.el7.x86_64
      # rpm -qa freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel
      libxslt-devel-1.1.28-5.el7.x86_64
      freetype-devel-2.8-12.el7_6.1.x86_64
      gd-devel-2.0.35-26.el7.x86_64
      libcurl-devel-7.29.0-51.el7.x86_64
      libpng-devel-1.5.13-7.el7_2.x86_64
    

    安装PHP需要的依赖服务

      yum install libmcrypt-devel -y 
      yum install mhash -y
      yum install mcrypt -y
    

    下载PHP包到 /server/tools/目录下

      tar xf php-7.3.5.tar.gz 
      cd /php-7.3.5
    

    编译 安装

    ./configure 
    --prefix=/application/php-7.3.5 
    --enable-mysqlnd  
    --with-mysqli=mysqlnd 
    --with-pdo-mysql=mysqlnd 
    --with-iconv-dir=/application/libiconv 
    --with-freetype-dir 
    --with-jpeg-dir 
    --with-png-dir 
    --with-zlib 
    --with-libxml-dir=/usr 
    --enable-xml 
    --disable-rpath 
    --enable-bcmath 
    --enable-shmop 
    --enable-sysvsem 
    --enable-inline-optimization 
    --with-curl 
    --enable-mbregex 
    --enable-fpm 
    --enable-mbstring 
    --with-gd 
    --with-openssl 
    --with-mhash 
    --enable-pcntl 
    --enable-sockets 
    --with-xmlrpc 
    --enable-soap 
    --enable-short-tags 
    --enable-static 
    --with-xsl 
    --with-fpm-user=nginx 
    --with-fpm-group=nginx 
    --enable-ftp 
    --enable-opcache=no
    make & make install
    

    安装完成

  • 相关阅读:
    制作LiveCD
    ubunt下的MinimalCD
    ArchLinux安装开源VMware Tools
    轻松搭建自己的Linux发行版本
    五个你可能闻所未闻的出色的Ubuntu替代发行版
    arch Linux not found device 错误解决
    Arch linux安装
    VM上成功安装mac os x
    VM8下安装Mac OS X 10.7
    VMwareWorkstation10安装OS_X_Mavericks10.9.2图文详细教程
  • 原文地址:https://www.cnblogs.com/jiangyatao/p/10827713.html
Copyright © 2020-2023  润新知