http://fish119.javaeye.com/blog/212270
- 安装运行环境ruby on rails
- 下载ruby在windows下的一步安装包 http://www.ruby-lang.org/zh_CN/downloads/
- 安装时检查一定勾选 rubygems
- 进入cmd命令行,执行命令 “ruby -v”,检测是否安装成功
- 进入cmd命令行,执行命令 “gem -v”,检测是否安装成功
- 进入cmd 命令行,执行命令 “gem install rails -r” ,在线安装rails
- 进入cmd命令行,执行命令 “rails -v”,检测是否安装成功
- 官方安装手册
- redmine的基本安装运行在WEBrick上面
http://www.redmine.org/wiki/redmine/RedmineInstall
- 将Redmine部署到Apache
- 官方安装手册 cgi方式运行redmine
http://www.redmine.org/wiki/1/HowTo_configure_Apache_to_run_Redmine - fastcgi方式运行redmine
http://harryxu.cn/blog/redmine-on-apache-fastcgi
http://plungeintomac.com/blog/redmine-on-apache/
http://www.cnblogs.com/zealic/archive/2008/05/17/1201574.html
http://blog.sharpplus.com/node/105
帖子更新 2009/08/22
成功部署:Windows XP, Apache 2.2 , Ruby 1.8.6- OneClickInstaller , mod_fcgid
参考贴:
- http://www.cnblogs.com/zealic/archive/2008/05/17/1201574.html
- http://wiki.rubyonrails.org/zh/getting-started/installation/windows
- http://hi.baidu.com/%B0%A6%EA%C7/blog/item/1c40c039f025daf53a87cedb.html
- http://rubyforge.org/frs/shownotes.php?release_id=28426
It includes RubyGems 1.3.1 which is needed to successfully use latest version of Rails.
Also, Latest Hpricot binaries to avoid issues when doing gem update.
总结:装了一个下午终于安装成功。原因是各个组件的版本升级情况不一样,不同版本的整合有很多问题。 例如我遇到的问题就是,我安装的ruby1.8.6-26,结果rails升级了!执行gem install rails 总是不成功。后来看官网,1.8.6-27的说明,该新版本解决了这个问题。
装上 1.8.6-27后按照上面的手顺做,就没问题了。
新的问题
- 按照上面的参考贴1中的设置,只能将url设置成 http://yourdomain.com/redmine/。 可是我想配置到链接根目录。http://yourdomain.com/
- 按照参考贴1的配置,redmine中的svn不能正常显示,报错 “访问版本库时发生错误:No such file or directory – svn list –xml “http://svn.orrz.net/”@HEAD –username xxxx –password xxxx”。
上面问题1 需要修改http.conf中的Rewrite设置
上面问题2是配置中没有将svn.exe的目录放入PATH中。
下面给出解决上面的两个问题的配置文件
LoadModule fcgid_module modules/mod_fcgid.so
<VirtualHost *:80>
ServerName redmine.orrz.net
ServerAdmin 0124020@gmail.com
DocumentRoot ../htdocs/redmine-0.8.4/public/
ErrorLog logs/redmine_error_logDefaultInitEnv RAILS_ENV production
# 设置以下环境变量以保证 DNS 解析正确
# 如果不设置,则会报 getaddrinfo: no address associated with hostname.
DefaultInitEnv PATH “C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;C:/Program Files/Subversion/bin;”
DefaultInitEnv SystemRoot “C:/Windows”
DefaultInitEnv SystemDrive “C:”
DefaultInitEnv TEMP “C:/WINDOWS/TEMP”
DefaultInitEnv TMP “C:/WINDOWS/TEMP”
DefaultInitEnv windir “C:/WINDOWS”Alias “/” “E:/PHPnow-1.5.3/htdocs/redmine-0.8.4/public/”
<Directory “E:/PHPnow-1.5.3/htdocs/redmine-0.8.4/public”>
Options Indexes ExecCGI FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from All
</Directory><Location />
AddHandler fcgid-script .fcgi
FCGIWrapper “C:/ruby/bin/ruby.exe E:/PHPnow-1.5.3/htdocs/redmine-0.8.4/public/dispatch.fcgi” .fcgi
RewriteEngine on
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi?$1 [QSA,L]
</Location>
</VirtualHost>
到这里,终于redmine安装及配置,告一段落。原来的cgi模式运行,那速度真是不能忍受。用ruby的webrick,速度还行,但是有”Ruby WEBrick远程目录遍历和信息泄漏漏洞”。
用上Fastcgi,速度真不错。
标签:apache, fastcgi, redmine, Windows
顶一下
redmine安装,终于fastcgi,成功。