CentOS6.5 编译安装lnmp环境
内容摘要
网上搜来的教程如下
http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?modtime=1171868460&big_mirror=0 #下载libmcrypt
[root@localhost source ]#
http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?modtime=1171868460&big_mirror=0 #下载libmcrypt
[root@localhost source ]#
文章正文
网上搜来的教程如下
http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?modtime=1171868460&big_mirror=0 #下载libmcrypt
[root@localhost source ]# mv libmcrypt-2.5.7.tar.gz\?modtime\=1171868460\&\;big_mirror\=0 libmcrypt-2.5.7.tar.gz #重命名
tar – –zxvf libmcrypt-2.5.7.tar.gz #解压
cd libmcrypt-2.5.7 #进入解压目录
./configure --prefix=/usr/local/libmcrypt && make && make install #安装
[root@localhost source ]# mv libmcrypt-2.5.7.tar.gz\?modtime\=1171868460\&\;big_mirror\=0 libmcrypt-2.5.7.tar.gz #重命名
tar – –zxvf libmcrypt-2.5.7.tar.gz #解压
cd libmcrypt-2.5.7 #进入解压目录
./configure --prefix=/usr/local/libmcrypt && make && make install #安装
因为编译安装libmcrypt一直出错,运行rpm –q libmcrypt 查看安装的rpm包 发现失败
所以参考了另一篇安装lnmp的文章
http://nginx.org/download/nginx-1.7.8.tar.gz #最新
wget http://cn2.php.net/distributions/php-5.4.35.tar.bz2#php5.4稳定版 因为php5.5不支持mysql扩展了,暂时不用最新的
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.22.tar.gz #mysql5.6
wget http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FLibmcrypt%2F2.5.8%2F&ts=1418528625&use_mirror=tcpdiag
mv libmcrypt-2.5.8.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FLibmcrypt%2F2.5.8%2F libmcrypt-2.5.8.tar.gz #删除多余参数的文件名
wget https://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz
wget http://downloads.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmhash%2Ffiles%2Fmhash%2F0.9.9.9%2F&ts=1418530194&use_mirror=hivelocity
mv mhash-0.9.9.9.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fmhash%2Ffiles%2Fmhash%2F0.9.9.9%2F mhash-0.9.9.9.tar.gz #删除多余参数的文件名
wget http://downloads.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FMCrypt%2F2.6.8%2F&ts=1418531968&use_mirror=softlayer-dal
mv mcrypt-2.6.8.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FMCrypt%2F2.6.8%2F mcrypt-2.6.8.tar.gz #删除多余参数的文件名
wget http://ftp.gnu.org/gnu/bison/bison-3.0.tar.gz
###暂没有下载 memcache pcre eaccelerator
wget http://cn2.php.net/distributions/php-5.4.35.tar.bz2#php5.4稳定版 因为php5.5不支持mysql扩展了,暂时不用最新的
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.22.tar.gz #mysql5.6
wget http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FLibmcrypt%2F2.5.8%2F&ts=1418528625&use_mirror=tcpdiag
mv libmcrypt-2.5.8.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FLibmcrypt%2F2.5.8%2F libmcrypt-2.5.8.tar.gz #删除多余参数的文件名
wget https://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz
wget http://downloads.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmhash%2Ffiles%2Fmhash%2F0.9.9.9%2F&ts=1418530194&use_mirror=hivelocity
mv mhash-0.9.9.9.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fmhash%2Ffiles%2Fmhash%2F0.9.9.9%2F mhash-0.9.9.9.tar.gz #删除多余参数的文件名
wget http://downloads.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FMCrypt%2F2.6.8%2F&ts=1418531968&use_mirror=softlayer-dal
mv mcrypt-2.6.8.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FMCrypt%2F2.6.8%2F mcrypt-2.6.8.tar.gz #删除多余参数的文件名
wget http://ftp.gnu.org/gnu/bison/bison-3.0.tar.gz
###暂没有下载 memcache pcre eaccelerator
安装libiconv、libmcrypt、(#没安装libltdl)、mhash、(#安装make没效果mcrypt),bison
http://downloads.sourceforge.net/project/pcre/pcre/8.36/pcre-8.36.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.36%2F&ts=1418696677&use_mirror=iwebhttp://downloads.sourceforge.net/project/pcre/pcre/8.36/pcre-8.36.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.36%2F&ts=1418696677&use_mirror=iweb
mv pcre-8.36.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.36%2F pcre-8.36.tar.gz
tar zxvf pcre-8.36.tar.gz
cd pcre-8.36 && ./configure && make && make install
mv pcre-8.36.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.36%2F pcre-8.36.tar.gz
tar zxvf pcre-8.36.tar.gz
cd pcre-8.36 && ./configure && make && make install
安装zlib
http://zlib.net/zlib-1.2.8.tar.gz
tar zxvf zlib-1.2.8.tar.gz && cd zlib-1.2.8 && ./configure && make && make install
tar zxvf zlib-1.2.8.tar.gz && cd zlib-1.2.8 && ./configure && make && make install
安装ssl
http://www.openssl.org/source/openssl-1.0.1j.tar.gz
tar zxvf openssl-1.0.1j.tar.gz
tar zxvf openssl-1.0.1j.tar.gz
安装nginx
复制代码 代码如下:
mkdir /usr/local/nginx
tar zxvf nginx-1.7.8.tar.gz
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module \--pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module \--with-pcre=/usr/local/src/pcre-8.36 \--with-zlib=/usr/local/src/zlib-1.2.8 \--with-openssl=/usr/local/src/openssl-1.0.1j && make && make install
配置nginx
复制代码 代码如下:
vim /usr/local/nginx/conf/nginx.conf
启动服务器
复制代码 代码如下:
/opt/nginx/sbin/nginx
/opt/php/sbin/php-fpm。
代码注释