设为首页 收藏本站
查看: 1233|回复: 0

[经验分享] 安装 Redmine 1.4 ,用Ubuntu Server 11.10

[复制链接]

尚未签到

发表于 2018-10-17 07:01:05 | 显示全部楼层 |阅读模式
  Redmine是用Ruby开发的基于web的项目管理软件,当前版本是1.4,发布于2012-4-20。类似的系统有JIRA,BUGZILLA 等。
  

  
   最初尝试Redmine 1.3时,用的Centos,但是Centos下的 gem insall 实在蛋疼,后在Ubuntu Server中安装配置成功。Redmine 1.4 的安装方式改进了,使用gembundler辅助,过程更加舒适,嘿嘿,但是不要高兴的太早,准备工作要做足。
  

  
   本文摘录整理自 http://www.redmine.org/projects/redmine/wiki/RedmineInstall ,随着时间推移,此页面可能会更新,原始内容我会另外翻译一份。
  

  
Redmine 1.4 依赖的ruby软件包版本:

ruby
1.8.7 / 1.9.2 / 1.9.3 / jruby-1.6.7
Rails
2.3.14
RubyGems
create database redminedb character set utf8;
  
mysql> create user 'redmineuser'@'%'>  
mysql> grant all privileges on redminedb.* to 'redmineuser'@'%';
  3、下载redmine 1.4
  
本段内容摘录整理自 http://www.redmine.org/projects/redmine/wiki/Download
  

  
直接下载:
  
http://rubyforge.org/frs/download.php/76033/redmine-1.4.1.tar.gz
  

  
如果已经安装了svn,可以在命令行执行:
  


cares@ubuntu:~$ svn co http://redmine.rubyforge.org/svn/branches/1.4-stable redmine-1.4  
Checked out revision 9530.
  

  
cares@ubuntu:~$ ls -l
  
total 8
  
-rwxr-xr-x  1 cares cares  178 2012-04-26 16:08 pre.sh
  
drwxrwxr-x 16 cares cares 4096 2012-04-26 10:42 redmine-1.4
  
二、配置redmine
  1、把redmine复制到运行目录,我选择 /opt

cares@ubuntu:~$ sudo cp -r redmine-1.4 /opt  
cares@ubuntu:~$ cd /opt/redmine-1.4
  
cares@ubuntu:/opt/redmine-1.4$ ll
  
total 84
  
drwxr-xr-x 16 root root 4096 2012-04-26 11:46 ./
  
drwxr-xr-x  3 root root 4096 2012-04-26 11:46 ../
  
drwxr-xr-x  8 root root 4096 2012-04-26 11:46 app/
  
drwxr-xr-x  6 root root 4096 2012-04-26 11:46 config/
  
drwxr-xr-x  4 root root 4096 2012-04-26 11:46 db/
  
drwxr-xr-x  3 root root 4096 2012-04-26 11:46 doc/
  
drwxr-xr-x  6 root root 4096 2012-04-26 11:46 extra/
  
drwxr-xr-x  3 root root 4096 2012-04-26 11:46 files/
  
-rw-r--r--  1 root root 1898 2012-04-26 11:46 Gemfile
  
-rw-r--r--  1 root root  531 2012-04-26 11:46 .gitignore
  
-rw-r--r--  1 root root  530 2012-04-26 11:46 .hgignore
  
drwxr-xr-x  8 root root 4096 2012-04-26 11:46 lib/
  
drwxr-xr-x  3 root root 4096 2012-04-26 11:46 log/
  
drwxr-xr-x  8 root root 4096 2012-04-26 11:46 public/
  
-rw-r--r--  1 root root  360 2012-04-26 11:46 Rakefile
  
-rw-r--r--  1 root root  205 2012-04-26 11:46 README.rdoc
  
drwxr-xr-x  5 root root 4096 2012-04-26 11:46 script/
  
drwxr-xr-x  6 root root 4096 2012-04-26 11:46 .svn/
  
drwxr-xr-x  9 root root 4096 2012-04-26 11:46 test/
  
drwxr-xr-x  7 root root 4096 2012-04-26 11:46 tmp/
  
drwxr-xr-x  4 root root 4096 2012-04-26 11:46 vendor/
  
2、安装redmine需要的gem,可以用类似以下指令:
  
bundle install --without development test
  
--without 参数后面填入要排除的gem,最好打开 Gemfile,看看哪些是不需要的。我这里只用MYSQL,需要排除的是postgresql,sqlite,rmagick(用于将甘特图导出为png,因为安装失败,我也排除了)。另一方面,后续的操作需要 RDoc 2.4.2以上,所以没有排除development。
  

  
添加其他需要的gem,可以编辑一个文件来指定,我选了mongrel,这样就不需要apache了。

cares@ubuntu:/opt/redmine-1.4$ sudo vi Gemfile.local  
gem "mongrel"
  

  
我的安装指令:
  cares@ubuntu:/opt/redmine-1.4$ sudo bundle install --without test postgresql sqlite rmagick
  Fetching gem metadata from http://rubygems.org/.......
  
Installing rake (0.9.2.2)
  
Installing activesupport (2.3.14)
  
Installing rack (1.1.3)
  
Installing actionpack (2.3.14)
  
Installing actionmailer (2.3.14)
  
Installing activerecord (2.3.14)
  
Installing activeresource (2.3.14)
  
Installing coderay (1.0.6)
  
Installing fastercsv (1.5.4)
  
Installing i18n (0.4.2)
  
Installing json (1.6.6) with native extensions
  
Installing mongrel (1.1.5) with native extensions
  
Installing mysql (2.8.1) with native extensions
  
Installing net-ldap (0.3.1)
  
Installing rails (2.3.14)
  
Installing rdoc (3.12)
  
Installing ruby-openid (2.1.8)
  
Installing tzinfo (0.3.33)
  
Using bundler (1.1.3)
  
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
  
Post-install message from rdoc:
  
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
  

  
= 1.9.2 : nothing to do! Yay!
  最后的提示可以忽略。
  

  
3、配置数据库参数
  
在redmine目录,复制 config/database.yml.example 为 config/database.yml 并编辑,填上数据库参数。
  
如果ruby版本为1.9,则 adapter: mysql2
  
如果mysql端口不是默认的,则 port: [your_mysql_port]
  

  
如下:

cares@ubuntu:/opt/redmine-1.4$ sudo cp config/database.yml.example config/database.yml  
cares@ubuntu:/opt/redmine-1.4$ sudo vi config/database.yml
  
production:
  
  adapter: mysql
  
  database: redminedb
  
  host: 192.168.0.100
  
  port: 3306
  
  username: redmineuser
  
  password: 12345678
  
  encoding: utf8
  
4、生成 session store secret

cares@ubuntu:/opt/redmine-1.4$ sudo rake generate_session_store  
5、创建数据库结构

cares@ubuntu:/opt/redmine-1.4$ sudo RAILS_ENV=production rake db:migrate  
[一大堆结果]
  
6、向库中插入默认配置数据,非必须,但高度推荐这么做。选择语言时,一定要用en,否则呢,,,,嘿嘿嘿,我就不告诉你会有乱码 DSC0000.png

cares@ubuntu:/opt/redmine-1.4$ sudo RAILS_ENV=production rake redmine:load_default_data  


  
Select  language: ar, bg, bs, ca, cs, da, de, el, en, en-GB, es, et, eu, fa,  fi, fr, gl, he, hr, hu,>  
====================================
  
Default configuration data loaded.
  
7、设置目录权限(public/plugin_assets 目录在运行了RAILS_ENV=production rake db:migrate 之后会自动创建。

cares@ubuntu:/opt/redmine-1.4$ sudo chown -R cares:cares files log tmp public/plugin_assets  
cares@ubuntu:/opt/redmine-1.4$ sudo chmod -R 755 files log tmp public/plugin_assets
  
8、用mongrel 运行 redmine

cares@ubuntu:/opt/redmine-1.4$ ruby /opt/redmine-1.4/script/server mongrel -e production  
=> Booting Mongrel
  
=> Rails 2.3.14 application starting on http://0.0.0.0:3000
  
=> Call with -d to detach
  
=> Ctrl-C to shutdown server
  这时,用浏览器访问 http://192.168.0.99:3000 ,默认用户名admin,密码admin

  9、为了开机自动运行,将以下指令加入到 /etc/rc.local,别忘了里面还有个 -d,
  ruby /opt/redmine-1.4/script/server mongrel -d -e production
  
exit 0
  Now, reboot and good Luck.
  

  

  

  

  




运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-622477-1-1.html 上篇帖子: 安裝 SQL Server 2008 R2容錯轉移叢集心得筆記 – 第 1 篇 下篇帖子: win2003 server服务自动停止
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表