nginx编译
2014-04-25 10:39
239 查看
执行如下的命令,编译nginx。其中add-module为添加指定的模块,其中的路径可以根据实际的情况进行修改。同样需要进行修改的还有with-openssl参数。
最后的四条命令是拷贝conf文件夹下的nginx.conf、rewrite.conf和vhost.conf三个文件到/usr/local/nginx/conf目录下,最后将服务脚本拷贝到系统目录。 可以按照实际的情况修改其中的配置。
有一点需要注意的是,由于我们在nginx中配置了mongodb的组件,因此当mongodb没有起来的时候,直接启动nginx只会启动nginx的主进程。在启动nginx之前应该先启动mongodb。
tar vzxf openssl-0.9.8q.tar.gz tar vzxf nginx-1.4.1.tar.gz tar vzxf nginx-dynamic-etags.tar.gz tar vzxf nginx-gridfs.tar.gz tar vzxf nginx_http_push_module-0.692.tar.gz cd nginx-1.4.1 ./configure --prefix=/usr/local/nginx-1.4.1/ --user=www --group=www --with-http_gzip_static_module --with-http_ssl_module --with-http_stub_status_module --without-http_ssi_module --without-http_autoindex_module --without-http_uwsgi_module --with-http_realip_module --with-openssl=/root/pec/openssl-0.9.8q --add-module=/root/pec/nginx_http_push_module-0.692 --add-module=/root/pec/nginx-gridfs/ --add-module=/root/pec/nginx-dynamic-etags make && make install cd /usr/local/ ln -s /usr/local/nginx-1.4.1/ nginx cd .. cp conf/rewrite.conf /usr/local/nginx/conf/ cp conf/nginx.conf /usr/local/nginx/conf/ cp conf/vhost.conf /usr/local/nginx/conf/ cp conf/nginx /etc/init.d/ |
有一点需要注意的是,由于我们在nginx中配置了mongodb的组件,因此当mongodb没有起来的时候,直接启动nginx只会启动nginx的主进程。在启动nginx之前应该先启动mongodb。
相关文章推荐
- (总结)Nginx配置文件nginx.conf中文详解
- nginx多server日志分割脚本分享
- nginx启动,重启,关闭命令
- Nginx的特性与核心类别及配置文件和模块详解
- nginx rtmp 流媒体
- Nginx编译安装和配置详解
- virtualenv下配置nginx uwsgi Django
- nginx均衡负载的设置
- nginx rewrite arg 带问号的地址转发参数处理?Nginx重定向的参数问题
- linux+nginx+python+django环境配置
- nginx 负载均衡的五中不同配置方式
- SUSE11安装NginxMongoSybasePHP环境
- 整理:Nginx+PHP+MySQL安装过程
- 10 个 Nginx 的安全提示
- nginx的upstream模块数据转发过程及流量控制分析
- Nginx服务器的配置,使用Lua语言在MySQL数据交互
- ecstore nginx下去掉index.php入口文件
- nginx源码分析--event事件驱动初始化
- nginx学习_内存池ngx_pool_t
- nginx 负载均衡亲测