• 编译安装php7


    yum install libxml2-devel curl-devel openjpeg openjpeg-devel openjpeg-libs libjpeg libpng freetype libjpeg libpng-devel freetype-devel  mcrypt php-mcrypt libmcrypt libmcrypt-devel

    1.创建php用户和用户组:

     groupadd -r php && useradd -r -g php -s /bin/flase -M /usr/local/php7   

    2.编译安装(以php-fpm 方式安装):

    ./configure --prefix=/usr/local/php7 --exec-prefix=/usr/local/php7 --bindir=/usr/local/php7/bin --sbindir=/usr/local/php7/sbin --includedir=/usr/local/php7/include --libdir=/usr/local/php7/lib/php --mandir=/usr/local/php7/php/man --with-config-file-path=/usr/local/php7/etc --with-mysql-sock=/var/run/mysql/mysql.sock  --with-mcrypt=/usr/include --with-mhash --with-openssl --with-zlib --enable-zip --enable-mysqlnd --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd --with-gd --with-iconv --with-zlib --enable-zip --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbregex --enable-mbstring --enable-ftp --enable-gd-native-ttf --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --without-pear --with-gettext --enable-session --with-curl --with-jpeg-dir --with-freetype-dir --enable-opcache --enable-fpm  --with-fpm-user=apache --with-fpm-group=apache --without-gdbm --disable-fileinfo --with-bz2 --enable-maintainer-zts

    3.配置文件的服务控制脚本

      配置文件:

      cp /php.7/php.ini-production  /usr/local/php7/etc/php.ini

      cp /usr/local/php7/etc/php-fpm.conf.default  /usr/local/php7/etc/php-fpm.conf

      服务控制脚本:

      cp /php.7/sapi/fpm/init.d.php-fpm  /etc/rc.d/init.d/php-fpm && chown +x php-fpm

    4.设置php日志文件目录和运行ID文件目录,修改session目录配置

      mkdir -p /var/log/php-fpm/ && mkdir -p /var/run/php-fpm && cd /var/run/ && chown -R apache:apache php-fpm

      mkdir -p /var/lib/php/session

      chown -R apache:apache /var/lib/php

     5.加入环境变量

       vim /etc/profile.d/php7.sh

      export PATH=/usr/local/php7/bin:/usr/local/php7/sbin:$PATH

  • 相关阅读:
    汇编 if else
    汇编  cdecl 函数调用约定,stdcall 函数调用约定
    汇编 push ,pop指令
    汇编 EBP ,ESP 寄存器
    汇编 sub减法指令 比较指令CMP JZ条件跳转指令
    thrift使用案例
    基于hiredis,redis C客户端封装
    golang 3des/ecb/cbc/pkcs5 加解密
    ortp 发送RTP实例
    go:基于时间轮定时器方案
  • 原文地址:https://www.cnblogs.com/yangxiaolan/p/4991119.html
Copyright © 2020-2023  润新知