码迷,mamicode.com
首页 > 其他好文 > 详细

(一)ubuntu 12.04 安装nginx1.6

时间:2014-09-29 18:06:41      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:ubuntu   nginx   

1、创建用户

/usr/sbin/groupadd www

/usr/sbin/useradd -r www -g www

2、安装依赖包

apt-get install make gcc g++ libpcre3-dev libssl-dev -y

3、解压编译

tar zxvf nginx-1.6.0.tar.gz -C /home/tbt/src/

cd /home/tbt/src/nginx-1.6.0

sed -i "s/CFLAGS=\"\$CFLAGS -g\"/#CFLAGS=\"\$CFLAGS -g\"/" auto/cc/gcc 

实现nginx的最小化安装,不采取debug模式安装 


./configure --prefix=/home/tbt/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module

make

make install

4、启动关闭nginx

/home/tbt/nginx/sbin/nginx

/home/tbt/nginx/sbin/nginx -s stop


本文出自 “星之殇洋” 博客,请务必保留此出处http://5430078.blog.51cto.com/5420078/1559403

(一)ubuntu 12.04 安装nginx1.6

标签:ubuntu   nginx   

原文地址:http://5430078.blog.51cto.com/5420078/1559403

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!