first, the installation of Redmine premise requirements
1. Installing the Redmine Ruby Environment version requires:
Redmine version |
supported Ruby versions |
Rails version used |
3.3, current trunk |
Ruby 1.9.3, 2.0.0, 2.1, 2.2, 2.3 |
Rails 4.2 |
3.2, 3.1 |
Ruby 1.9.3, 2.0.0, 2.1, 2.2 |
Rails 4.2 |
2. Can enter the server, and have administrator rights
ii. Start installation of Redmine
1. Configuring the Environment
Note: Before installing the software, check to see if the server already has this software.
Yum-y Install patch make GCC gcc-c++ gcc-g77 flex* Bison file
yum-y install Libtool libtool-libs libtool-ltdl-devel* autoconf kernel-devel automake libmcrypt*
yum-y install libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10- Devel GD gd-devel
yum-y install freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel
yum-y Install glib 2 glib2-devel bzip2 bzip2-devel libevent libevent-devel
yum-y install ncurses ncurses-devel Curl Curl-devel e2fsprogs
yum-y Install e2fsprogs-devel krb5 krb5-devel libidn libidn-devel
yum-y install OpenSSL openssl-devel Vim-minim Al Nano sendmail
yum-y install Fonts-chinese gettext gettext-devel
yum-y install gmp-devel pspell-devel
Yum -y install readline* libxslt* pcre* net-snmp* gmp* libtidy* yum-y
install imagemagick* subversion*
yum-y Inst All wget
2. Install MySQL (do not need to install if it already exists) Rpm-qa |grep MySQL
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
RPM-IVH mysql-community-release-el7-5.noarch.rpm
Yum Install mysql-community-server mysql-community-devel
Rpm-qa | grep MySQL #检查安装
3. Install RVM rvm-v
Curl-ssl Https://get.rvm.io | Bash
SOURCE/ETC/PROFILE/USR/LOCAL/RVM/BIN/RVM Reload
rvm-v #: The version number does not appear please reload
4. Install ruby Gem-v
RVM list known #查看可安装列表
rvm install ruby-2.1.8 #官方只支持1.9~2.2 version
gem-v #如果未显示版本, reinstall Ruby
5. Update the GEM source
Gem source-l
gem source-r https://rubygems.org/ #: The default URL address must have "/", otherwise it will not be deleted.
gem source-a https://ruby.taobao.org/
gem source-l #: Confirm only https://ruby.taobao.org/
6. Installing the Gem component
Gem Install rails
gem install rake
gem install MYSQL2
7. Configure MySQL
Service mysqld start
mysql-u root-p
mysql> CREATE database redmine default character set UTF8;
Grant all on redmine.* to root;
Grant all on redmine.* to Root@localhost;
Grant all on redmine.* to Redmineuser;
Grant all on redmine.* to Redmineuser @localhost;
Set password for Redmine@localhost=password (' redmin ');
Flush privileges;
Exit
8. Installing Redmine
Cd/home/xhy
wget http://www.redmine.org/releases/redmine-3.1.1.tar.gz
sudo tar-zxvf redmine-3.1.1.tar.gz
sudo mv redmine-3.1.1 redmine
cd/home/xhy/redmine/
9. Configure the Redmine data file
sudo cp config/configuration.yml.example config/configuration.yml
sudo cp config/database.yml.example config/ Database.yml
sudo vim/config/database.yml
production:
adapter:mysql2
database:redmine // MySQL created database
host:localhost
username:redmine//mysql user name
password:redmine //mysql username
Encoding:utf8
port:8035 //ports needed to open
10. Install the tool that manages Ruby's package dependencies bundler
Cd/home/xhy/redmine
gem install bundler #注意是在网站根目录下执行
Bundle Install
If the download is slow you can modify ' sudo vim/usr/ Local/redmine/gemfile ' change ' source ' https://rubygems.org ' to ' source ' https://ruby.taobao.org/'
11. Initialize Redmine
Bundle EXEC Rake Generate_secret_token
rails_env=production bundle exec rake db:migrate
rails_env= Production bundle EXEC Rake Redmine:load_default_data #初始化数据选择zh
12. Change Permissions
mkdir-p tmp tmp/pdf public/plugin_assets
sudo chmod-r 755 files log tmp public/plugin_assets
13. Turn on the service
Bundle EXEC Rails server-p 8035 webrick-e production-b 0.0.0.0-d
14. Close the service
PS aux | grep Ruby
sudo kill-9 PID
Redmine Post-installation follow-up work
Open Redmine
Enter the IP address plus port number of the server, such as 192.168.1.xxx:8035 switch Ruby version number
RVM use 2.2.3--default Open Server port number
sudo firewall-cmd–add-port=9200/tcp–permanent
sudo systemctl restart Firewalld redmine mail configuration scheme
Open the Redmine configuration file, sudo vim config/configuration.yml, and then change the content to the following format:
Delivery_method:: Async_smtp
async_smtp_settings:
Address: "smtp.mxhichina.com"
port:465
SSL: True
authentication:: Login
domain: ' touchair.cn '
user_name: ' xx.xiao@touxxx.cn ' //email account
Password: "xxxxx" //email password
Redmine A slow solution to access a page
Redmine when editing a task in the default configuration is blocked waiting for notification messages to be sent, you can modify it asynchronously: Modify the Delivery_method in the configuration file as: ASYNC_SMTP, and modify Smtp_settings to Async_smtp_ Settings, and then restart, is not much faster. redmine Data Migration
1. First machine: Mysqldump-u root-p redmine > File.sql
Copy the File.sql file to the computer that you want to migrate, and then execute the following statement
2. Second machine: Mysql-u root-p redmine < File.sql
After data migration, the original picture may be time-lapse, copy the Files folder of the first machine to the Files folder of the new computer, special note the version number
1, ruby:2.2.6
2, gem:2.6.12
3, rvm:1.29.2
4, bundler:1.15.3
5, rails:4.2.4
6, redmine-3.1.1