我正在尝试在VPS服务器中托管Rails应用程序。服务器已经安装了Apache,所以我首先尝试安装乘客,然后是乘客-apache-module。
我已经安装了RVM作为用户,并安装了ruby 1.9.3并将其设置为默认的ruby。然后,我安装了乘客gem,版本3.0.17,因为我们正在迁移rails应用程序,旧服务器中的乘客版本是3.0.17。我能够使用命令gem install passenger -v 3.0.17
安装乘客宝石。
安装乘客后,我继续尝试使用passenger-apache-module
命令安装passenger-install-apache2-module
。我得到了这个输出:
Checking for required software...
* GNU C++ compiler... not found
* Curl development headers with SSL support... not found
* OpenSSL development headers... not found
* Zlib development headers... not found
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /home/federaltitle/.rvm/wrappers/ruby-1.9.3-p448/rake
* rack... found
* Apache 2... found at /usr/local/apache/bin/httpd
* Apache 2 development headers... found at /usr/bin/apxs
* Apache Portable Runtime (APR) development headers... found at /usr/local/apache/bin/apr-1-config
* Apache Portable Runtime Utility (APU) development headers... found at /usr/local/apache/bin/apu-1-config
Some required software is not installed.
But don't worry, this installer will tell you how to install them.
Press Enter to continue, or Ctrl-C to abort.
当我按Enter键时,我收到了这个输出:
Installation instructions for required software
* To install GNU C++ compiler:
Please run yum install gcc-c++ as root.
* To install Curl development headers with SSL support:
Please run yum install curl-devel as root.
* To install OpenSSL development headers:
Please run yum install openssl-devel as root.
* To install Zlib development headers:
Please run yum install zlib-devel as root.
If the aforementioned instructions didn't solve your problem, then please take
a look at the Users Guide:
/home/federaltitle/.rvm/gems/ruby-1.9.3-p448/gems/passenger-3.0.17/doc/Users guide Apache.html
但是,当我尝试以root用户身份安装消息(yum install gcc-c++
,yum install curl-devel
,yum install openssl-devel
,yum install zlib-devel
)中提到的库时,它会说所有库已经安装并且是最新的。
OS - CENTOS 6.4 x86_64
答案 0 :(得分:0)
我能够以root用户身份安装rvm,ruby和passenger,并解决了问题。当用户完成时,与权限有关。但是我必须为ruby部分上的用户相关活动做一些变通办法,例如bundle install
,rake assets:precompile
(必须以root用户身份执行此操作,因此为本地用户提供sudo权限以执行这些操作)。 / p>