Linux环境下Redmine的安装(一)
生活随笔
收集整理的這篇文章主要介紹了
Linux环境下Redmine的安装(一)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、軟件版本 Yaml 0.1.4 : http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz Ruby-1.9.3-p194: http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz Rubygems-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]# wget http://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 && make install2.安裝Ruby [root@cent5-ADCPtest software]# tar zxf ruby-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 && make install注:ruby安裝到自定義路徑,下面的ruby,rake,gem?命令都要加上Ruby安裝的絕對路徑,如/opt/ruby/bin/ruby /opt/ruby/bin/rake /opt/ruby/bin/gem3.安裝Redmine [root@cent5-ADCPtest software]# tar zxf redmine-2.0.3.tar.gz [root@cent5-ADCPtest software]# mv redmine-2.0.3 /opt/redmine 4.安裝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 YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. RubyGems 1.8.24 installed == 1.8.24 / 2012-04-27 * 1 bug fix: * Install the .pem files properly. Fixes #320 * Remove OpenSSL dependency from the http code path ----------------------------------------------------------------------------- RubyGems installed the following executables: /opt/ruby/bin/gem [root@cent5-ADCPtest rubygems-1.8.24]# /opt/ruby/bin/gem install rails -v=3.2.6?//安裝rails,-v=3.2.6是版本號[root@cent5-ADCPtest rubygems-1.8.24]# /opt/ruby/bin/gem install 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 YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. Successfully installed bundler-1.1.5 1 gem installed Installing 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 do #??? gem "pg", ">= 0.11.0" #? end # #? group :sqlite do #??? gem "sqlite3" #? end #end[root@cent5-ADCPtest redmine]# bundle install --without development 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-ADCPtest redmine]# 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're running Redmine # with MySQL and ruby1.9, replace the adapter name with `mysql2`. # Examples for PostgreSQL and SQLite3 can be found at the end. production: 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 rake db: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)....
轉載于:https://blog.51cto.com/stuart/965622
總結
以上是生活随笔為你收集整理的Linux环境下Redmine的安装(一)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Spring MVC 实践 - Base
- 下一篇: TCP/IP入门(1) --链路层