php 5.4以上安装php-fpm方法
php 5.4以上安装php-fpm方法 如果你已经安装过PHP 也是一样 那就重新编译PHP 覆盖
1 先去PHP官网下个 php-5.6.29.tar.gz wget http://cn2.php.net/distributions/php-5.6.29.tar.gz 2 ./configure --prefix=/usr/local/php --with-iconv=/usr/local/libiconv --enable-sysvsem --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --with-openssl --with-mhash --enable-sockets --with-xmlrpc --with-zlib --enable-fpm --with-iconv=/usr/local/libiconv 这个路径就是上面安装的路径哈 正确如下 Thank you for using PHP. config.status: creating php5.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands 3 make 生成o文件 如果出现 undefined reference to `libiconv" 那就是 ./configure --prefix没设置好 make clean 后重新配置./configure ............ 4 make install 安装 正确如下 [root@iZbp11xke8lva3xk8b3qtnZ php-5.6.29]# make install Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ Installing PHP CLI binary: /usr/local/php/bin/ Installing PHP CLI man page: /usr/local/php/php/man/man1/ Installing PHP CGI binary: /usr/local/php/bin/ Installing PHP CGI man page: /usr/local/php/php/man/man1/ Installing build environment: /usr/local/php/lib/php/build/ Installing header files: /usr/local/php/include/php/ Installing helper programs: /usr/local/php/bin/ 输入 php -v [root@iZbp11xke8lva3xk8b3qtnZ ~]# php -v PHP 5.6.29 (cli) (built: Jan 5 2017 10:37:51) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
查看原文:http://newmiracle.cn/?p=858
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇: linux shell 写swoole重启脚本
- 下一篇: PHP判断数组下标有没有存在的方法