柳暗花明笔记

    linux 下安装多版本的php,多版本php并存 - 笔记

    所属分类:[ php&web ] 猫哲学家 发表于:2017-09-16 17:17 浏览:63

    我是先安装了php7,后来因为其它系统的原因要安装php5.5.38

    ./configure --prefix=/usr/local/php5.5.38 --with-curl --with-freetype-dir=/usr/local/freetype --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysql --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-xmlrpc --with-xsl --with-zlib --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --enable-zip

    make ZEND_EXTRA_LIBS='-liconv'

    make install

    cp -R ./sapi/fpm/php-fpm.conf /usr/local/php5.5.38/etc/php-fpm.conf


    vim /usr/local/php5.5.38/etc/php-fpm.conf

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

    [www]
    listen = /tmp/php5.5.38-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/php-fpm55

    cp php.ini-development /usr/local/php5.5.38/etc/php.ini

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

    /etc/init.d/php55-fpm start

    标签: linux  php 
    上一编文章 sublime text3 3143 build 注册码,激活码 下一编文章 javascript 验证是否带有特殊字符正则
    最近文章
    发表评论