Linux redmine installation and deployment
Linux redmine installation and deployment
1. Install mysql
Yum install mysql-serveryum install mysqlyum install mysql-develservice mysqld start/usr/bin/mysqladmin-u root password 'root'
Add to boot:
Chkconfig-add mysqldchkconfig-level 2345 mysqld on
2. Install ruby
Yum install rubyyum install rubygemsyum install ruby-devel
3. Log in to mysql and create a redmine database
CREATE DATABASE redmine CHARACTER SET utf8
4. Download the redmine installation package
Wget http://www.redmine.org/releases/redmine-2.6.0.tar.gz
5. Extract the redmine to the / usr/local directory
Tar zxvf redmine-2.6.0.tar.gz
6. Enter the redmine directory
Cd / usr/local/redmine
7. Configure the database configuration of redmine
Enter the config directory and copy database.yml.example to database.yml
Cp database.yml.example database.yml
Modify the configuration of database.yml
Production: adapter: mysql ruby 1.8 is set to: mysql ruby 1.9: mysql2 database: redmine host: localhost username: root password: root encoding: utf8
8. Install image processing software
Yum install ImageMagick ImageMagick-devel
9. Bundler is a tool for managing Gem dependencies
Gem install bundlergem install json-v '1.8.6'gem install mysql-v' 2.8.1'gem install rmagick-v '2.16.0'
10. Redmine uses bundle to manage gems dependencies
Bundle install-without development test
11. This step generates a random key Rails. Used to encode and store session data to prevent it from tampering.
Restart all existing sessions after generating a new secret token that is invalid.
Bundle exec rake generate_secret_token
12. Load the data structure
RAILS_ENV=production bundle exec rake db:migrate
13. Load default data
RAILS_ENV=production bundle exec rake redmine:load_default_data
14. Start the service
With Redmine 2.x:
Bundle exec ruby script/rails server webrick-e production-p 80
With Redmine 3.x:
Bundle exec rails server webrick-e production-p 80
15. Visit
Http:\\ 127.0.0.1 pur3000
Account password: admin/admin
16. Configure mail, which is configured in configuration.yml under config directory
Cp configuration.yml.example configuration.yml