zoukankan      html  css  js  c++  java
  • centos系统编译安装php7.2

    先安装如下依赖包

    $ yum install -y gcc gcc-c++  make zlib zlib-devel pcre pcre-devel  libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

    下载PHP7.2.0安装包

    解压php-7.2.0.tar.gz  然后进入目录,编译。命令如下:

    $ tar -zxvf php-7.2.0.tar.gz

    $ cd php-7.2.0

    $ ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --enable-mbstring --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pear --enable-sockets --with-freetype-dir=/usr --with-zlib --with-libxml-dir=/usr --with-xmlrpc --enable-zip --enable-fpm --enable-xml --enable-sockets --with-gd --with-zlib --with-iconv --enable-zip --with-freetype-dir=/usr/lib/ --enable-soap --enable-pcntl --enable-cli --with-curl

    编译完成之后,执行安装命令:

    $ make && make install

    在之前编译的源码包中,找到 php.ini-production,复制到/usr/local/php下,并改名为php.ini:

    $ cp php.ini-production /usr/local/php/php.ini

    复制启动脚本:

    $ cp ./sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

    $ chmod +x /etc/init.d/php-fpm

    修改php-fpm配置文件:

    $ cd /usr/local/php/etc

    $ cp php-fpm.conf.default php-fpm.conf

    $ vim php-fpm.conf

    去掉 pid = run/php-fpm.pid 前面的分号

     

    $ cd php-fpm.d

    $ cp www.conf.default www.conf

    $ vim www.conf

    修改user和group的用户

    将php-fpm服务加入chkconfig管理列表:

    chkconfig --add /etc/init.d/php-fpm

    最后设置开机自动启动

    chkconfig php-fpm on

    查看开机启动项

    chkconfig --list

    加完这个之后,就可以使用service对php-fpm进行启动,重启等操作了。

    service php-fpm start
    service php-fpm stop
    service php-fpm restart

  • 相关阅读:
    soundtouch 变速算法matlab实现
    resample matlab实现
    hrtf virtual surround matlab实现
    hrtf 旋转音效matlab实现
    audio mixer
    schroeder reverb matlab实现
    HTML DOCTYPE文档类型举例说明
    window 连接双网
    linux 命令
    sqlserver 时间戳
  • 原文地址:https://www.cnblogs.com/liuboswu/p/9305688.html
Copyright © 2011-2022 走看看