【问题标题】:Where is mod_passenger.so, installed with yum?用 yum 安装的 mod_passenger.so 在哪里?
【发布时间】:2016-03-02 21:18:46
【问题描述】:

我有一个 Centos 6-Apache-Passenger-Ruby 的组合。按照说明here 进行安装。我也有 whm,这意味着必须通过单击来更改 httpd.conf。在尝试包含/etc/httpd/conf.d/*.conf 时,告诉我有一个错误,因为:Cannot load /usr/local/apache/modules/mod_passenger.so into server.

问题是/etc/httpd/conf.d/passenger.conf 的这一行:

LoadModule passenger_module modules/mod_passenger.so

句子的最后部分应该指向实际的mod_passenger.so,那不在/etc/httpd/modules里面...问题是它在哪里?

我是通过yum安装的,意思是:

sudo yum install -y epel-release pygpgme curl
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
sudo yum install -y mod_passenger

当我运行sudo /usr/bin/passenger-config validate-install 时,安装哪个 apache(已经全部运行)并不重要,如下所示:

   You did not specify 'LoadModule passenger_module' in any of your
   Apache configuration files. This means that Phusion Passenger
   for Apache is not installed or not active. Please run the
   Phusion Passenger Apache module installer:

      /usr/bin/ruby /usr/bin/passenger-install-apache2-module --apxs2=/usr/bin/apxs

我运行安装程序,说一切正常,但始终无法运行...

我知道我必须像这样指定位置的位置:

LoadModule passenger_module /path/to/the/module

但我找不到它。定位 mod_passenger.so 不起作用。而且我不能去 .rvm 位置,因为不在那里。乘客不是作为 gem 安装,而是通过 yum...

有什么技巧可以找到乘客在哪里找到mod_passenger.so?谢谢。

【问题讨论】:

  • 我找到了解决方案 find / -type f -name mod_passenger.so... 感谢serverfault.com/questions/139790/…
  • find 很好也很彻底,但它比我在下面展示的rpm 解决方案消耗更多的 I/O、CPU 和时钟时间。

标签: ruby-on-rails linux apache passenger


【解决方案1】:

rpm 将为您提供任何已安装软件包的文件列表,如下所示:

rpm -ql mod_passenger

这可以通过greping 进一步完善您的文件:

rpm -ql mod_passenger | grep 'so$'

具有不同 apache 模块包的完整示例是:

$ rpm -ql mod_ssl
/etc/httpd/conf.d/ssl.conf
/etc/httpd/conf.modules.d/00-ssl.conf
/usr/lib64/httpd/modules/mod_ssl.so
/usr/libexec/httpd-ssl-pass-dialog
/var/cache/httpd/ssl
$ rpm -ql mod_ssl | grep 'so$'
/usr/lib64/httpd/modules/mod_ssl.so

【讨论】:

    猜你喜欢
    • 2016-10-11
    • 1970-01-01
    • 2013-01-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多