随风飞世 发表于 2015-8-21 14:24:52

CentOS搭建LNMP环境


[*]安装开发工具包:


yum groupinstall -y "Development Tools*"

  50多个,安装了好久……

[*]下载Nginx:


http://nginx.org/en/download.html
Development version #开发版本,有不稳定因素
stable version #稳定版本
Legacy versions #一些老版本



wget http://nginx.org/download/nginx-1.6.2.tar.gz
tar -xvf nginx-1.6.2.tar.gz 


cd nginx-1.6.2#进入解压目录
./configure#运行configure进行编译


#编译出现如下错误:./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the ……
#解决办法
yum -y install pcre-devel openssl openssl-devel


然后再进入nginx目录编译
make 
[*]安装Nginx:


make install#进行安装
[*]运行Nginx服务器:


#Nginx默认目录在 /usr/local/nginx/
cd/usr/local/nginx/sbin
./nginx#运行Nginx服务器

  

页: [1]
查看完整版本: CentOS搭建LNMP环境