Centos7 install redmine3 and upgrade redmine1.8 to 3
1. Install mysql
Wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpmrpm-ivh mysql-community-release-el7-5.noarch.rpmyum install mysql-serverservice mysql start
two。 Install dependency packages
Yum install mysql-develyum install libcurl-develyum install ImageMagick-devel
3. Install ruby2.4
Gpg-- keyserver hkp://keys.gnupg.net-- recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDBcurl-sSL https://get.rvm.io | bash-s stable-- rubymv / usr/bin/ruby / usr/bin/ruby2.0ln-s / usr/local/rvm/rubies/ruby-2.4.1/bin/ruby / usr/bin/
4. Install Redmine3
Wget http://www.redmine.org/releases/redmine-3.4.2.tar.gztar-zxvf redmine-3.4.2.tar.gz-C / opt/gem install bundlerbundle install-- with development test rmagickRAILS_ENV=production REDMINE_LANG=zh bundle exec rake redmine:load_default_data
5. Modify the configuration file
Cp database.yml.example database.ymlvi database.yml
Modify Production
Production: adapter: mysql2 database: redmine host: localhost username: root password: "123456" encoding: utf8
Modify and generate sercet.yml
Generate key
Rake secret
Write the key generated by the above command to secrets.yml
Production: secret_key_base:xxxxxx
6. Upgrade redmine
After exporting the database from redmine1
And then import it into redmine3's database.
Mysql-- default-character-set=utf8 redmine3 < redmine1.sql# upgrade database bundle exec rake db:migrate RAILS_ENV=production# upgrade plug-in database bundle exec rake redmine:plugins:migrate RAILS_ENV=production# clears old sessionbundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
7. Configure redmine to run in nginx
Install passenger for nginx
Gem install passengerpassenger-install-nginx# needs to choose the source code path of nginx, and then the program automatically compiles nginx
Modify nginx.conf
Http {... Passenger_root / usr/local/rvm/gems/ruby-2.4.1/gems/passenger-5.1.10; passenger_ruby / usr/local/rvm/gems/ruby-2.4.1/wrappers/ruby;..
Add server:
Server {server_name redmine.abc.com; charset utf8; index index.html index.htm index.php; root / opt/redmine-3.4.2/public/; passenger_enabled on;}