Nginx ubuntu ppa 源装的 nginx 和 passenger 编译安装的 nginx 冲突

alucardpj · June 22, 2012 · Last by fredwu replied at June 22, 2012 · 4807 hits

以前一直用 apache+passenger 的,虽然慢但是配置比较方便,现在新折腾 nginx,发现一个问题: ubuntu 12.04, 从官方源安装 nginx sudo apt-get install nginx 装好后目录是/etc/nginx,然后安装 passenger, gem install passenger 再安装 nginx module ·passenger-install-nginx-module· 因为要重新编译 nginx,所以会问我安装位置,默认是/opt/nginx 第一次安装我没管直接使用默认位置,装完以后发现会有两个 nginx,启动时会冲突。 这种情况我是不是在编译的时候设置目录为/etc/nginx 会自动覆盖源安装? 或者干脆不需要 apt-get install nginx,直接让 passenger 安装 nginx 就可以了?

安装时不是有让你选要不要编译一份 nginx 的么,选 NO 就好了。

#1 楼 @fredwu 没有啊,装 module 的时候提示由于是第三方 module,肯定要编译的,区别只是自动编译还是手动编译的问题

Nginx doesn't support loadable modules such as some other web servers do, so in order to install Nginx with Passenger support, it must be recompiled.

Do you want this installer to download, compile and install Nginx for you?

  1. Yes: download, compile and install Nginx for me. (recommended) The easiest way to get started. A stock Nginx 1.2.1 with Passenger support, but with no other additional third party modules, will be installed for you to a directory of your choice.

  2. No: I want to customize my Nginx installation. (for advanced users) Choose this if you want to compile Nginx with more third party modules besides Passenger, or if you need to pass additional options to Nginx's 'configure' script. This installer will 1) ask you for the location of the Nginx source code, 2) run the 'configure' script according to your instructions, and 3) run 'make install'.

#2 楼 @alucardpj 如果你的 nginx 只是用来和 passenger 一起用的话,把 ubuntu 自带的删掉就好了。

You need to Sign in before reply, if you don't have an account, please Sign up first.