|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!Redmine:是一个基于web的项目办理软件,用Ruby开辟的。是基于ROR框架开辟的一套跨平台项目办理体系,是项目办理体系的后起之秀,听说是源于Basecamp的ror版而来,撑持多种数据库,除和DotProject的功效大抵相称外,另有很多本人共同的功效,比方供应wiki、旧事台、工夫跟踪、feed聚合、导出pdf等等,还能够集成其他版本办理体系和BUG跟踪体系,比方SVN、CVS、TD等等。设置功效壮大并且便利,自界说属性和更新关照也很有用。上面我们来安排redmine+svn项目办理体系(必要严厉的依照官方的装置文档装置对应的ruby包)
情况:centos-5.5redmine-1.2.0subversion-1.6.17
1、下载所必要软件包
- wgetftp://ftp.ruby-lang.org//pub/ruby/1.8/ruby-1.8.7.tar.gz
- wgethttp://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz
- wgethttp://rubyforge.org/frs/download.php/74944/redmine-1.2.0.tar.gz
- wgethttp://subversion.tigris.org/downloads/subversion-1.6.17.tar.gz
- wgethttp://subversion.tigris.org/downloads/subversion-deps-1.6.17.tar.gz
2、先设置LNMP情况
参考:CentOS5.5下装置mysql5.1.57+php5.2.17(FastCGI)+nginx1.0.1高功能Web办事器
3、redmine装置(对各软件包版本请求十分严厉,必需对应响应版本,不然会呈现不成预知的毛病)
1、ruby装置:
- tarzxvfruby-1.8.7.tar.gz
- cdruby-1.8.7
- ./configure--prefix=/usr/local/ruby
- make&&makeinstall
- cd..
- 修正~/.bash_profile,将ruby目次到场root情况变量
- 大概echo"exportPATH=$PATH:/usr/local/ruby/bin/">>/etc/profile
2、rubygems装置
装置rubygems,注重必定如果1.7.0以下的版本,否则没法一般启动利用redmine。我就是由于看了一个别人写得中文文档,装置了1.7.0版本,以是redmine一向没法一般事情,为此走了一年夜圈弯路。最初在官方文档上才找到成绩地点。上面是官网上的一些对版本请求的形貌。
Ruby1.9isnotsupportedyet.YouhavetouseRuby1.8.xasstatedabove.
RubyGems1.3.7orhigherisrequiredwithfollowinglimitations:
Rails2.3.5willfailwithRubyGems1.5.0orlater,sticktopreviousversionsofRubyGems!
Rails2.3.11willfailwithRubyGems1.7.0orlater,sticktopreviousversionsofRubyGems!
Rake0.8.7isrequired(rake0.9.xisnotsupportedbyRailsyet)
Rack1.1.xisrequired,1.1.0hasabugwithquotes(#8416).Databasemigrationwouldfailwithotherversion.
Mongrel1.1.5needsapatchattachedto#7688toworkfinewithRails2.3.11.Incaseofupgrade,anotherissuemayappearforsometimeaftermigration(#7857).
I18n0.4.2isrequiredforRedmine>=1.0.5
- tarzxvfrubygems-1.6.2.tgz
- cdrubygems-1.6.2
- rubysetup.rb
- cd..
3、装置railsracki18nmysqlpassenger
- geminstallrails-v=2.3.11
- geminstallrack-v=1.1.1
- geminstalli18n-v=0.4.2
- geminstallmysql--no-rdoc--no-ri----with-mysql-dir=/data/soft/mysql#我的mysql是编译装置在/data/soft/mysql目次下的
- geminstallpassenger
- geminstallmongrelmongrel_cluster
4、装置设置redmine
1、解压redmine
- tarzxvfredmine-1.2.0.tar.gz
- mvredmine-1.2.0/data/www/redmine
- chown-Rwww./data/www/redmine
2、创建数据库
- /data/soft/mysql/bin/mysql-uroot-p
- mysql>createdatabaseredminecharactersetutf8;
- mysql>grantallonredmine.*toredmine@localhostidentifiedbyredmine;
- mysql>flushprivileges;
3、修正redminemysql数据库设置.
- cd/data/www/redmine/config
- cpdatabase.yml.exampledatabase.yml
- vidatabase.yml
- production:
- adapter:mysql
- database:redmine
- host:localhost
- username:redmine
- password:redmine
- encoding:utf8
注重:冒号前面有一空格。。。
4、创立运转数据库:
天生会话存储密钥:
- cd/data/www/redmine
- rakegenerate_session_store
然后入手下手创立数据库表布局,在redmine的根目次下运转:
- RAILS_ENV=productionrakedb:migrate
读取默许设置数据,当碰到选择言语(Selectlanguage)时,选择zh:
- RAILS_ENV=productionrakeredmine:load_default_data
5、设置mongrel_cluster
- cd/data/www/redmine
- mongrel_railscluster::configure-eproduction-p8000-a127.0.0.1-N3
6、启用mongrel_cluster
- cd/data/www/redmine
- mongrel_railscluster::start
启动假如堕落以下:
- startingport8000
- !!!Pathtopidfilenotvalid:tmp/pids/mongrel.8000.pid
- mongrel::startreportedanerror.Usemongrel_railsmongrel::start-htogethelp.
- startingport8001
- !!!Pathtopidfilenotvalid:tmp/pids/mongrel.8001.pid
- mongrel::startreportedanerror.Usemongrel_railsmongrel::start-htogethelp.
- startingport8002
- !!!Pathtopidfilenotvalid:tmp/pids/mongrel.8002.pid
- mongrel::startreportedanerror.Usemongrel_railsmongrel::start-htogethelp.
创立/data/www/redmine/tmp/pids目次便可
- mkdir-p/data/www/redmine/tmp/pids
启动乐成以下:
- [root@CentOS5redmine]#mongrel_railscluster::start
- startingport8000
- startingport8001
- startingport8002
7、设置nginx
- vi/data/soft/nginx/conf/nginx.conf
- upstreammongrel
- {
- server127.0.0.1:8000;
- server127.0.0.1:8001;
- server127.0.0.1:8002;
- }
- server
- {
- listen80;
- server_name192.168.8.32;
- root/data/www/redmine;
- indexindex.htmlindex.htm;
- location/
- {
- proxy_passhttp://mongrel;
- proxy_redirectoff;
- proxy_set_headerHost$host;
- proxy_set_headerX-Real-IP$remote_addr;
- proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;
- }
- }
五:会见redmine测试:
间接用ruby内置webrick也可启动redmine
- /usr/local/ruby/bin/ruby/data/www/redmine/script/serverwebrick-eproduction&
启动乐成以下:
<divclass="dp-highlighter"style="margin:0pxauto;padding:0px;border:1pxsolidrgb(232,232,232);font-family:Verdana,Tahoma,LucidaGrande,Arial,sans-serif;width:693px;overflow:auto;color:rgb(0,0,0);line-height:24.0499992370605px;background:rgb(252,252,252);"><olclass="dp-j"style="margin:0px0px1px32px;padding:2px;border:0px;color:rgb(43,145,175);background:transparent;"><liclass="alt"style="border-left-width:1px;border-left-style:solid;border-left-color:rgb(209,215,220);padding-left:10px;line-height:18px;">[root@CentOS5redmine]#/usr/local/ruby/bin/ruby/data/www/redmine/script/serverwebrick-eproduction&<listyle="border-left-width:1px;border-left-style:solid;border-left-color:rgb(209,215,220);padding-left:10px;line-height:18px;">[1]3526<liclass="alt"style="border-left-width:1px;border-left-style:solid;border-left-color:rgb(209,215,220);padding-left:10px;line-height:18px;">[root@CentOS5redmine]#=>BootingWEBrick<listyle="border-left-width:1px;border-left-style:solid;border-left-color:rgb(209,215,220);padding-left:10px;line-height:18px;">=>Rails2.3.11applicationstartingonhttp://0.0.0.0:3000<liclass="alt"style="border-left-width:1px;border-left-style:solid;border-left-color:rgb(209,215,220);padding-left:10px;line-height:18px;"> |
|