apache服务器安装以及使用passenger插件部署rails应用,基于ubuntu 12.04 LTS

该博客详细介绍了如何在Ubuntu 12.04 LTS系统中安装Apache服务器,并使用Passenger插件部署Rails应用程序。步骤包括安装Apache,接着安装Passenger gem,然后通过passenger-install-apache2-module命令进行集成。最后,博主在配置过程中遇到的问题是默认运行环境为production,解决办法是在Apache配置中添加RailsEnv development来切换到development环境。
摘要由CSDN通过智能技术生成

小例子可以部署在rails自带的WEBrick上,逐渐往后走还得上Apache。

安装apache服务器

命令是sudo apt-get install apache2

安装passenger插件

安装完毕还不能立刻用,因为想运行rails应用的话,还要为apache服务器安装插件passenger

passenger是一个gem包,安装命令是gem install passenger

passenger集成进Apache

执行命令passenger-install-apache2-module,进入安装程序。

abbuggy@abbuggy-ubuntu:~$ passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v3.0.18.

This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.

Here's what you can expect from the installation process:

 1. The Apache 2 module will be installed for you.
 2. You'll learn how to configure Apache.
 3. You'll learn how to deploy a Ruby on Rails application.

Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.

Press Enter to continue, or Ctrl-C to abort.

回车确定之后,会进行依赖关系的检查,有部分内容不通过没有关系,回车之后会提示如何解决。

Checking for required software...

 * GNU C++ compiler... found at /usr/bin/g++
 * Curl development headers with SSL support... found
 * OpenSSL development headers... found
 * Zlib development headers... found
 * Ruby development headers... found
 * OpenSSL support for Ruby... found
 *
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值