Redmine是基于Apache、MySQL、以及Ruby on Rails开发的一套缺陷管理系统。BitNami Redmine Stack是BitNami组织开发维护的Stack系列中的一员,可以简化Redmine的安装配置。
【安装步骤】
1.从 http://bitnami.org/stack/redmine 下载 BitNami Redmine
wget http://bitnami.org/files/stacks/redmine/1.2.0-0/bitnami-redmine-1.2.0-0-linux-installer.bin
wget http://bitnami.org/files/stacks/redmine/1.2.0-0/bitnami-redmine-1.2.0-0-linux-installer.bin
2.安装BitNami
Redmine(假设安装目录为/mnt/data/redmine-1.2.0-0)
./bitnami-redmine-1.2.0-0-linux-installer.bin
3.启动redmine
[root@svn_server /]# cd
/mnt/data/redmine-1.2.0-0
[root@svn_server redmine-1.2.0-0]# ./ctlscript.sh
start
[root@svn_server redmine-1.2.0-0]# ./ctlscript.sh
status
subversion already running
apache already running
redmine already running
mysql already running
subversion already running
apache already running
redmine already running
mysql already running
5.安装ezFAQ插件
1). Copy the plugin directory(ezfaq_plugin) into the
/mnt/data/redmine-1.2.0-0/apps/redmine/vendor/plugins
directory
NOTE: The plugin directory must be ezfaq_plugin
2). Migrate plugin: rake db:migrate_plugins
[root@svn_server redmine-1.2.0-0]# ./use_redmine
bash-3.2# export PATH=/mnt/data/redmine-1.2.0-0/ruby/bin:$PATH # 要重启后生效,需要加到/etc/profile中
bash-3.2# pwd
/mnt/data/redmine-1.2.0-0
bash-3.2# cd apps/redmine
bash-3.2# rake db:migrate_plugins RAILS_ENV=production
3). Start Redmine
[root@svn_server redmine-1.2.0-0]# ./ctlscript.sh restart
/mnt/data/redmine-1.2.0-0/subversion/scripts/ctl.sh : subversion stopped
Syntax OK
/mnt/data/redmine-1.2.0-0/apache2/scripts/ctl.sh : httpd stopped
stopping port 3001
stopping port 3002
/mnt/data/redmine-1.2.0-0/mysql/scripts/ctl.sh : mysql stopped
110616 08:25:22 mysqld_safe Logging to '/mnt/data/redmine-1.2.0-0/mysql/data/mysqld.log'.
110616 08:25:22 mysqld_safe Starting mysqld.bin daemon with databases from /mnt/data/redmine-1.2.0-0/mysql/data
/mnt/data/redmine-1.2.0-0/mysql/scripts/ctl.sh : mysql started at port 3306
starting port 3001
starting port 3002
Syntax OK
/mnt/data/redmine-1.2.0-0/apache2/scripts/ctl.sh : httpd started at port 8080
/mnt/data/redmine-1.2.0-0/subversion/scripts/ctl.sh : subversion started at port 3690
NOTE: The plugin directory must be ezfaq_plugin
2). Migrate plugin: rake db:migrate_plugins
[root@svn_server redmine-1.2.0-0]# ./use_redmine
bash-3.2# export PATH=/mnt/data/redmine-1.2.0-0/ruby/bin:$PATH # 要重启后生效,需要加到/etc/profile中
bash-3.2# pwd
/mnt/data/redmine-1.2.0-0
bash-3.2# cd apps/redmine
bash-3.2# rake db:migrate_plugins RAILS_ENV=production
3). Start Redmine
[root@svn_server redmine-1.2.0-0]# ./ctlscript.sh restart
/mnt/data/redmine-1.2.0-0/subversion/scripts/ctl.sh : subversion stopped
Syntax OK
/mnt/data/redmine-1.2.0-0/apache2/scripts/ctl.sh : httpd stopped
stopping port 3001
stopping port 3002
/mnt/data/redmine-1.2.0-0/mysql/scripts/ctl.sh : mysql stopped
110616 08:25:22 mysqld_safe Logging to '/mnt/data/redmine-1.2.0-0/mysql/data/mysqld.log'.
110616 08:25:22 mysqld_safe Starting mysqld.bin daemon with databases from /mnt/data/redmine-1.2.0-0/mysql/data
/mnt/data/redmine-1.2.0-0/mysql/scripts/ctl.sh : mysql started at port 3306
starting port 3001
starting port 3002
Syntax OK
/mnt/data/redmine-1.2.0-0/apache2/scripts/ctl.sh : httpd started at port 8080
/mnt/data/redmine-1.2.0-0/subversion/scripts/ctl.sh : subversion started at port 3690
4). In your project in Redmine, go to "Project settings" : On the
"Modules" tab, enable the module by checking "Ezfaq".
----------------------------------------
【安装过程中的问题】
[root@svn_server redmine-1.2.0-0]# rake db:migrate_plugins
-bash: rake: command not found
-bash: rake: command not found
原因:找不到rake命令,redmine自带ruby,rake等相关命令,在安装目录的ruby/bin下
解决:将/mnt/data/redmine-1.2.0-0/ruby/bin加到PATH环境变量的前头,要启动生效还需要加在/etc/profile文件中
[root@svn_server bin]# export
PATH=/mnt/data/redmine-1.2.0-0/ruby/bin:$PATH
[root@svn_server bin]# ruby --version
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]
[root@svn_server bin]# ruby --version
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]
[root@svn_server redmine-1.2.0-0]# rake db:migrate_plugins
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/mnt/data/redmine-1.2.0-0/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile'
(See full trace by running task with --trace)
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/mnt/data/redmine-1.2.0-0/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile'
(See full trace by running task with --trace)
原因:未在/mnt/data/redmine-1.2.0-0/apps/redmine目录下执行
解决:切换当前目录到/mnt/data/redmine-1.2.0-0/apps/redmine,再执行
[root@svn_server apps]# cd
/mnt/data/redmine-1.2.0-0/apps/redmine
[root@svn_server redmine]# rake
db:migrate_plugins
(in /mnt/data/redmine-1.2.0-0/apps/redmine)
rake aborted!
Access denied for user 'bitnami'@'localhost' to database 'redmine_development'
(See full trace by running task with --trace)
(in /mnt/data/redmine-1.2.0-0/apps/redmine)
rake aborted!
Access denied for user 'bitnami'@'localhost' to database 'redmine_development'
(See full trace by running task with --trace)
原因:not run it in production mode
解决:
[root@svn_server redmine-1.2.0-0]#
./use_redmine
bash-3.2# export PATH=/mnt/data/redmine-1.2.0-0/ruby/bin:$PATH
bash-3.2# pwd
/mnt/data/redmine-1.2.0-0
bash-3.2# cd apps/redmine
bash-3.2# rake db:migrate_plugins RAILS_ENV=production
bash-3.2# export PATH=/mnt/data/redmine-1.2.0-0/ruby/bin:$PATH
bash-3.2# pwd
/mnt/data/redmine-1.2.0-0
bash-3.2# cd apps/redmine
bash-3.2# rake db:migrate_plugins RAILS_ENV=production