redhat5.5 安装 nginx1.9.2
2015-08-21 16:05
429 查看
1、安装必备工具:
?$ yum -y
install
gcc
gcc
-c++ autoconf automake
$ yum -y
install
zlib zlib-devel openssl openssl-devel pcre-devel
[/code]
说明:
pcre: 用来作地址重写的功能。
zlib:nginx 的gzip模块,传输数据打包,省流量(但消耗资源)。
openssl:提供ssl加密协议。
2、新建一个系统级用户组和匿名用户,以及下面编译时使用
?$
sudo
groupadd -r nginx
$
sudo
useradd
-s
/sbin/nologin
-g nginx -r nginx-user
3、下载Nginx:http://nginx.org/en/download.html
4、解压编译:
?$
tar
-zxvf nginx-1.9.2.
tar
.gz
[/code]
$
cd
nginx-1.9.2/
$ .
/configure--user=nginx
--group=nginx --prefix=/usr/local/nginx
--with-http_stub_status_module
--with-openssl=/usr/lib/openssl
5、查看编译结果:
6、安装:
$
make
&&
make
install
6、启动:
$/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
7、关闭:
[root@localhost ~]# ps -ef | grep nginxroot 26834 1 0 16:08 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
root 26835 26834 0 16:08 ? 00:00:00 nginx: worker process
root 26857 26687 0 16:09 pts/1 00:00:00 grep nginx
$kill -9 26834
$kill
-9 26835
相关文章推荐
- Mac安装神器-brew之安装nginx
- nginx+keepalived实现双机热备
- ubuntu14.04 安装nginx和php5.6.12
- 《深入理解Nginx》笔记之ngx_event_pipe_s结构体
- Linux 安装Nginx详细图解教程
- nginx+php-fpm 报“File not found.”
- 高性能服务器Haproxy+Nginx架构配置
- FastDFS+Nginx安装配置
- Nginx + PHP(php-fpm)遇到的502 Bad Gateway错误
- nginx限制用户下载文件速率
- Flume 收集Nginx日志到Hdfs Tail-to-hdfs sink
- ThinkPHP Nginx pathinfo rewrite 配置
- Nginx 的动态 upstreams
- Nginx 的动态 upstreams
- Nginx负载均衡深入浅出
- nginx ha lvs对比
- nginx的pass_proxy遇到的坑
- Nginx Proxy cache + Perl + ImageMagick 做Wap站图片适配 实时压缩
- 03_Nginx添加新模块
- 03_Nginx添加新模块