1,下载安装包到你安装的位置
1 |
cd /user/dev/<br><br>wget http: //nginx.org/download/nginx-1.5.10.tar.gz |
2,安装编译软件
1
2 |
yum install gcc-c++<br> yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel |
3,执行安装
1
2
3
4
5
6
7
8
9
10
11 |
tar -zxv -f nginx-1.5.10.tar.gz mv nginx-1.5.10 ngTemp cd ./ngTemp ./configure --prefix=/user/dev/nginx make make install |
4,启动
1
2
3
4
5 |
cd /user/dev/nginx cd ./sbin ./nginx |
5,测试运行
1 |
http: //ip:80/ |
原文:http://www.cnblogs.com/spnt/p/3573885.html