1.安裝以前確認你已經安裝好了mysqlhtml
2.鏈接mysql建立數據庫mysql
mysql -u root –pweb
CREATE DATABASE redmine CHARACTER SET utf8; CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
3.下載(http://www.redmine.org/ )解壓下載後的redmine文件sql
cd /opt wget http://www.redmine.org/releases/redmine-2.5.3.tar.gz tar -zxvf redmine-2.5.3.tar.gz mv redmine-2.5.3 redmine chmod -R 775 redmine cd redmine/
4.修改數據庫鏈接文件數據庫
cd config/ cp database.yml.example database.yml vim database.yml
5.打開redmine主目錄,並執行vim
rake generate_secret_token(此命令出現的問題見後面的會出現各類問題(主要是切換成ruby的淘寶源))ruby
6.建立數據庫結構測試
RAILS_ENV=production rake db:migrate
7.初始化數據this
RAILS_ENV=production rake redmine:load_default_data
運行的過程當中選擇語言,我輸入的是zh
8.測試安裝是否成功spa
ruby script/rails server webrick -e production
測試經過
9.登陸系統
使用管理員admin/admin登陸系統
問題(主要是缺什麼裝什麼 換國內源就能夠了)
1.rake generate_secret_token
Could not find gem 'rails (= 3.2.19) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決:執行bundle install如還不行,則sudo apt-get install rails後解決 ,最終經過修改配置文件中的版本號解決
2.An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.16'` succeeds before bundling.
解決:sudo gem install mysql2 -v '0.3.16',若是還不行,則
sudo apt-get install libmysqlclient-dev,安裝後再運行上邊的命令
3.Could not find gem 'selenium-webdriver (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決:sudo gem install selenium-webdriver
4.Could not find gem 'rack-openid (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決:sudo gem install rack-openid
5.Could not find gem 'fastercsv (~> 1.5.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決:sudo gem install fastercsv
6.Could not find gem 'shoulda (~> 3.3.2) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決: sudo gem install shoulda
7.Could not find gem 'net-ldap (~> 0.3.1) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決:sudo gem install net-ldap
8.Could not find gem 'ruby-openid (~> 2.3.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決:sudo gem install ruby-openid
9.Could not find gem 'mocha (~> 1.0.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決:sudo gem install mocha
10.Could not find gem 'rmagick (>= 2.0.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決:sudo gem install rmagick
出現Can't install RMagick 2.13.2. Can't find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin時
解決:
sudo apt-get install imagemagick libmagickwand-dev
11.Could not find gem 'redcarpet (~> 2.3.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決: sudo gem install redcarpet -v 2.3.0
12.Could not find gem 'capybara (~> 2.1.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
解決:sudo gem install capybara -v 2.1.0
13.Could not find gem 'yard (>= 0) ruby' in the gems available on this machine.Run `bundle install` to install missing gems.解決:sudo gem install yard