柳暗花明笔记

    centos在php5.3的基础上安装php7.2.2 笔记

    所属分类:[ php&web ] 猫哲学家 发表于:2018-02-09 10:39 浏览:28

    下载源码,解压,然后
    ./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --with-fpm-user=www --with-fpm-group=www --enable-fpm --enable-opcache --disable-fileinfo --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-jpeg-dir --with-iconv-dir=/usr/local --with-freetype-dir --with-png-dir --with-zlib --disable-rpath --with-libxml-dir=/usr --enable-xml --enable-bcmath --enable-shmop --enable-exif --with-curl --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-inline-optimization --enable-mbstring --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
    注意要去掉 (--with-mysql, --with-mcrypt, --enable-gd-native-ttf)
    configure: WARNING: unrecognized options: --with-mysql, --with-mcrypt, --enable-gd-native-ttf
    坑1:
    configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
    yum install libxslt-devel

    make ZEND_EXTRA_LIBS='-liconv'
    make install


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

    vim /usr/local/php7/etc/php-fpm.conf

    [global]
    pid = /usr/local/php7/var/run/php-fpm.pid
    error_log = /usr/local/php7/var/log/php-fpm.log
    log_level = notice

    [www]
    listen = /tmp/php7-cgi.sock
    listen.backlog = -1
    listen.allowed_clients = 127.0.0.1:9001
    listen.owner = www
    listen.group = www
    listen.mode = 0666
    user = www
    group = www
    pm = dynamic
    pm.max_children = 40
    pm.start_servers = 20
    pm.min_spare_servers = 20
    pm.max_spare_servers = 40
    request_terminate_timeout = 100
    request_slowlog_timeout = 0
    slowlog = var/log/slow.log

    cp -R ./sapi/fpm/init.d.php-fpm /etc/init.d/php7-fpm

    cp php.ini-development /usr/local/php7/etc/php.ini

    chmod +x /etc/init.d/php7-fpm

    /etc/init.d/php7-fpm start

    标签: php  linux  CentOS 
    上一编文章 centos下在原python2.6.6下多安装python3.6.4安装笔记 下一编文章 php7.2.2 使用 __autoload 会产生警告Deprecated: __autoload() is deprecated, use spl_autoload_register() instead
    最近文章
    发表评论