linux 手动源码安装lnmp(亲测)

linux 手动源码安装lnmp笔记(亲测)

先在linux 安装libiconv 源码编译安装PHP有用

#wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
#tar xvf libiconv-1.14.tar.gz
#cd libiconv-1.14
# ./configure --prefix=/usr/local/libiconv
# make
# make install
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 --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/


查看原文:http://newmiracle.cn/?p=823
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值