Redmine+Apache+SVN+Postfix配置(3)

作者:iifksp 来源:蓝色理想 时间:2010-07-05 11:20:00 

代码:

ruby script/server webrick -e production

默认的管理员用户名和密码都是admin,进入系统后就可以开始熟悉下了。可以为每个人定义语言环境。下图是管理页面。

在apache上部署

其自带的webrick可能不能满足使用需求,那么就把它配置到apache上。

apache运行ROR有多种方式,这里使用passenger。

代码:


apt-get install build-essential
apt-get install apache2-prefork-dev libaprutil1-dev libapr1-dev ruby1.8-dev



然后安装 passenger

代码:

gem install passenger
passenger-install-apache2-module

如果报passenger-install-apache2-module这条命令找不到的话,那么通过下面的命令查看执行路径:

代码:

gem environment

代码:


RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
  - INSTALLATION DIRECTORY: /var/lib/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /var/lib/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:

     - http://gems.rubyforge.org/

其中,EXECUTABLE DIRECTORY就是命令的全路径,所以对于我例子里的情况执行

代码:

/var/lib/gems/1.8/bin/passenger-install-apache2-module

根据提示安装和部署。

passenger会在本机编译并成为apache的一个模块。安装过程中会遇到下面的提示信息(根据版本的不同,信息也会稍有变化):

代码:


Welcome to the Phusion Passenger Apache 2 module installer, v2.2.13.
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.



代码:


The Apache 2 module was successfully installed.
Please edit your Apache configuration file, and add these lines:
   LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.13/ext/apache2/mod_passenger.so
   PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.13
   PassengerRuby /usr/bin/ruby1.8
After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!



代码:

Deploying a Ruby on Rails application: an example
Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:
   <VirtualHost *:80>
      ServerName www.yourhost.com
      DocumentRoot /somewhere/public    # <-- be sure to point to 'public'!
      <Directory /somewhere/public>
         AllowOverride all              # <-- relax Apache security settings
         Options -MultiViews            # <-- MultiViews must be turned off
      </Directory>
   </VirtualHost>
And that's it! You may also want to check the Users Guide for security and
optimization tips, troubleshooting and other useful information:
  /var/lib/gems/1.8/gems/passenger-2.2.13/doc/Users guide Apache.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
http://www.modrails.com/
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui

.

根据提示信息部署,我这里的步骤稍有不同。

标签:Redmine,Apache,SVN,Postfix,配置
0
投稿

猜你喜欢

  • 寻找人生的升华点 程序员的5000元大关

    2009-08-29 09:31:00
  • 关于技术架构师的一些看法

    2008-09-10 12:20:00
  • Godaddy 如何变更主机方案

    2010-04-20 12:46:00
  • 深度分析 谷歌搜索引擎蜘蛛等级那些事儿

    2008-12-12 14:08:00
  • 导致网站的搜索引擎优化失败的七个大方面

    2009-02-17 12:58:00
  • apache虚拟主机中设置泛域名解析的方法

    2023-07-28 23:58:23
  • kali下对Docker的详细安装教程

    2022-10-05 09:28:21
  • 博客评论不仅仅是用来获取流量的

    2008-05-06 11:24:00
  • 用六个办法加快百度搜索引擎对新站的收录

    2008-12-03 07:42:00
  • WordPress2.6.2升级方法

    2008-09-10 12:50:00
  • 如何将日志导入到UCenter Home

    2009-12-01 12:33:00
  • 淘宝客新手防骗全攻略

    2009-04-17 15:29:00
  • vmware Workstation安装教程

    2022-03-16 22:45:22
  • Linux Nginx VPS下简单解决CC攻击

    2023-07-11 10:02:39
  • 用Windows Server 2003搭建安全文件服务器(3)

    2007-09-28 13:45:00
  • apache中封IP的实现方法

    2023-10-05 12:00:08
  • Apache Server 负载能力测试

    2010-05-09 18:18:00
  • 聊聊Docker中容器的创建与启停问题

    2022-03-17 17:12:21
  • 在Linux系统下配置WU-FTP服务器

    2008-09-26 17:24:00
  • 解决Linux程序编译链接动态库版本的相关问题

    2023-11-02 19:21:45
  • asp之家 网站运营 m.aspxhome.com