Nginx的安装
2015-09-17 21:00
597 查看
本文主要介绍Nginx的安装流程,不包含配置。
1.配置安装环境
2.新建运行账号:
./configure --help | less
4.编译安装:
/usr/local/nginx/sbin/nginx
7.关闭nginx:
killall nginx
8.服务脚本设置:
本文出自 “学无止境” 博客,请务必保留此出处http://chickengg.blog.51cto.com/10402610/1695828
1.配置安装环境
yum groupinstall "Development Tools""Server Platform " yum install pcre-devel openssl -devel
2.新建运行账号:
groupadd -r nginx useradd -r -g nginx nginx3.查看帮助文件:
./configure --help | less
4.编译安装:
#./configure --prefix=/usr/local/nginx --conf-path=/etc/nginx/nginx.conf --user=nginx --group=nginx --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_flv_module --with-http_mp4_module --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi # make && make install5.查看安装状态:
/usr/local/nginx/sbin/nginx -t6. 启动nginx(未配置服务脚本之前):
/usr/local/nginx/sbin/nginx
7.关闭nginx:
killall nginx
8.服务脚本设置:
Vim /etc/rc.d/init.d/nginx 服务脚本,可根据提供文档设置 chmod +x /etc/rc.d/init.d/nginx chkconfig --add nginx chkconfig --list nginx service nginx start9.启动服务,运行正常页面显示如下:
本文出自 “学无止境” 博客,请务必保留此出处http://chickengg.blog.51cto.com/10402610/1695828
相关文章推荐
- nginx location语法
- nginx location语法
- nginx优化 突破十万并发
- nginx配置详细说明
- nginx 配置多个目录
- 分析nginx access log日志的命令
- linux nginx,php,mysql日志文件所在位置
- 服务器环境搭建 1 ---NGINX+TOMACT+MYSQL
- Nginx配置性能优化的方法
- Nginx+Keepalived搭建高可用负载均衡集群
- centos 6u5 搭建nginx+php+mysql环境。
- Nginx源码分析系列2:系统错误提示信息汇总
- Nginx配置文件
- Windows下Nginx的启动、停止等命令
- nginx支持静态文件post
- nginx启动脚本
- nginx启动脚本
- nginx 配置 (参照)
- nginx解析配置文件代码备忘
- Nginx 负载均衡-加权轮询策略剖析