Linux环境下Redmine的安装(一)推荐

一、软件版本Yaml 0.1.4 : http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gzRuby-1.9.3-p194: http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gzRubygems-1.8.24:http://rubygems.org/pages/downloadRedmine-2.0.3:http://rubyforge.org/frs/?group_id=1850二、安装Redmine(Apache+SVN+Passenger)1.安装Yaml[root@cent5-ADCPtest]# cd /opt/software/[root@cent5-ADCPtest software]# wgethttp://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz[root@cent5-ADCPtest software]# tar zxf yaml-0.1.4.tar.gz [root@cent5-ADCPtest software]# cd yaml-0.1.4[root@cent5-ADCPtest yaml-0.1.4]# ./configure–prefix=/opt/yaml[root@cent5-ADCPtest yaml-0.1.4]# make makeinstall2.安装Ruby[root@cent5-ADCPtest software]# tar zxfruby-1.9.3-p194.tar.gz [root@cent5-ADCPtest software]# cd ruby-1.9.3-p194[root@cent5-ADCPtest ruby-1.9.3-p194]# ./configure–prefix=/opt/ruby[root@cent5-ADCPtest ruby-1.9.3-p194]# make makeinstall注:ruby安装到自定义路径,下面的ruby,rake,gem命令都要加上Ruby安装的绝对路径,如/opt/ruby/bin/ruby /opt/ruby/bin/rake /opt/ruby/bin/gem3.安装Redmine[root@cent5-ADCPtest software]# tar zxfredmine-2.0.3.tar.gz [root@cent5-ADCPtest software]# mv redmine-2.0.3/opt/redmine4.安装Rubygems[root@cent5-ADCPtest software]# tar zxf rubygems-1.8.24.tgz [root@cent5-ADCPtest software]# cd rubygems-1.8.24[root@cent5-ADCPtest rubygems-1.8.24]# ruby setup.rb/opt/ruby/lib/ruby/1.9.1/yaml.rb:56:in ` top(required) ‘:It seems your ruby installation is missing psych (for YAMLoutput).To eliminate this warning, please install libyaml andreinstall your ruby.RubyGems 1.8.24 installed== 1.8.24 / 2012-04-27* 1 bug fix:* Install the .pem files properly. Fixes #320 * Remove OpenSSLdependency from the http code path—————————————————————————–RubyGems installed the following executables:/opt/ruby/bin/gem[root@cent5-ADCPtest rubygems-1.8.24]# /opt/ruby/bin/geminstall rails -v=3.2.6//安装rails,-v=3.2.6是版本号[root@cent5-ADCPtest rubygems-1.8.24]# /opt/ruby/bin/geminstall bundler //Redmine 1.4 版本后使用Bundler来管理gems 依赖关系,在Redmine的目录里有一个Gemfile 需要的依赖包写在里面。/opt/ruby/lib/ruby/1.9.1/yaml.rb:56:in ` top(required) ‘:It seems your ruby installation is missing psych (for YAMLoutput).To eliminate this warning, please install libyaml andreinstall your ruby.Successfully installed bundler-1.1.51 gem installedInstalling ri documentation for bundler-1.1.5…Installing RDoc documentation for bundler-1.1.5…[root@cent5-ADCPtest redmine]# vim Gemfile //由于使用的是Mysql数据库,需要将Gemfile中的配置关于PostgreSQL的安装包注释掉,如果系统没有安装PostgreSQL而不注释掉,安装时会提示错误。# Database gems#platforms :mri, :mingw do# group :postgresql# gem”pg”, ” = 0.11.0″# end# group :sqlite do# gem”sqlite3″# end#end[root@cent5-ADCPtest redmine]# bundle install –withoutdevelopment test rmagick //这一步会安装Mysql的Adapter, 如果Mysql的安装路径不是系统默认的,这一步安装时会提示安装错误,需要增加安装参数安装单独安装 Mysql2的依赖包 :gem install mysql2 -v ‘0.3.11’ —-with-mysql-config=/usr/local/mysql/bin/mysql_config然后再运行上面的命令5.创建数据库mysql create database redmine character set utf8;mysql grant all privileges on redmine.* to’redmine’@’localhost’ identified by ‘my_password’;mysql flush privileges;[root@cent5-ADCPtestredmine]# cd config[root@cent5-ADCPtest config]# cp database.yml.example database.yml[root@cent5-ADCPtest config]# vim database.yml# Default setup is given for MySQL with ruby1.8. If you’rerunning Redmine# with MySQL and ruby1.9, replace the adapter name with`mysql2`.# Examples for PostgreSQL and SQLite3 can be found at theproduction: adapter: mysql2 //将mysql修改为mysql2 database: redmine host: localhost username: redmine password: redmine encoding: utf8[root@cent5-ADCPtest config]# rake generate_secret_token //会产生config/initializers/secret_token.rb[root@cent5-ADCPtest config]# RAILS_ENV=production rakedb:migrate //创建数据库结构….== ChangeChangesPathLengthLimit: migrating ===================================– change_column(:changes, :path, :text, {:default= nil, :null= true}) – 0.0119s– change_column(:changes, :path, :text, {:null= false}) – 0.0105s– change_column(:changes, :from_path, :text)…. 人生最大的错误是不断担心会犯错

Linux环境下Redmine的安装(一)推荐

相关文章:

你感兴趣的文章:

标签云: