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

    安装完成

  • 相关阅读:
    临时表和表变量
    北航发生一场悲剧:计算机学子复习过程中突然倒地
    2w+长文带你剖析ConcurrentHashMap~!
    2020年最新ZooKeeper面试题(附答案)
    MQ消息中间件,面试能问些什么?
    设计模式之初体验
    IIS7 下使用ExtJs出现Ext未定义的问题
    修改apache+php上传文件大小限制
    memcache support requires ZLIB解决办法
    Windows下Memcache的安装方法
  • 原文地址:https://www.cnblogs.com/jiangyatao/p/10827713.html
Copyright © 2011-2022 走看看