How to install Redmine on centos-install Redmine on CentOS

Source: Internet
Author: User
Tags create database schema curl file copy gnupg gpg readline redmine

Redmine depends on several packages.

Mysql-current 5.7.17 ruby-current 2.8.18 Redmine-3.3.2 1. How to install and setup MySQL if MySQL exist, remove and upgrade it. Rpm-qa | grep MySQL rpm-e mysql-5.7.xxx--nodeps create MySQL group and user groupadd MySQL useradd-r-g MySQL  mysql (R bec Ause MySQL is a system user, not a login user install MySQL wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7 .17-linux-glibc2.5-x86_64.tar (Download MySQL tar.gz for the bit generic Linux from) cd/usr/local TAR-XVF mysql-5.7.17-l Inux-glibc2.5-x86_64.tar TAR-ZXVF mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz MV mysql-5.7.17-linux-glibc2.5-x86_64 MySQL chown-r mysql:mysql mysql cd mysql bin/mysql_install_db--user=mysql--basedir=/usr/local/mysql/--datadir=/usr/ Local/mysql/data/cp-a./SUPPORT-FILES/MY-DEFAULT.CNF  /etc/my.cnf   (if dir changes, please update content in M Y.CNF) cp-a./supoort-files/mysql.server/etc/init.d/mysqld cd/bin./mysqld_safe--user=mysql &/etc/init.d/mysqld Restart  , after this, MySQL database initialized successfully. Chkconfig--level mysqld on, Setup startup automatically cat/root/.mysql_secret./mysql-uroot-p   (input pwd lis T above mysql > SET PASSWORD = PASSWORD (' Your_password '); mysql > Flush privileges;  mysql > use MySQL; Add remote access permission.  mysql > update user set  host = '% ' where user = ' root '; MySQL > select host, user from user; /etc/init.d/mysqld Restart Modify CharSet.  VIM/ETC/MY.CNF character-set-server=utf8/etc/init.d/mysqld Restart Uninstall mysql/etc/init.d/mysqld stop Chkconfig mysqld off chkconfig--del mysqld rm-rf/usr/local/mysql rm-f/etc/my.cnf rm-r/etc/inid.d/mysqld rm-r/root /.mysql_secret userdel-r MySQL 2. How to install ruby 2.1.8 install deps  yum install gcc-c++ patch readline readline-devel zlib zlib-devel  yum I Nstall libyaml-devel libffi-devel openssl-devel make  yum install bzip2 autoconf automake libtool Bison iconv-develSqlite-devel Install and Setup RVM curl-l Get.rvm.io | Bash-s stable (if key or cert error, gpg2--keyserver hkp://keys.gnupg.net--recv-keys 409b6b1796c275462a1703113804bb82d3 9DC0E3, then curl again)
source/etc/profile.d/rvm.sh
Install and Setup RVM manually if Rvm.io website is blocked mkdir RVM cd RVM gpg--keyserver hkp://keys.gnupg.net--recv- Keys 409b6b1796c275462a1703113804bb82d39dc0e3
Curl-o Https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer
Curl-o HTTPS://RAW.GITHUBUSERCONTENT.COM/RVM/RVM/MASTER/BINSCRIPTS/RVM-INSTALLER.ASC
GPG--verify RVM-INSTALLER.ASC
Bash Rvm-installer Stable
Install and setup Ruby 2.1.8 RVM install 2.1.8 RVM use 2.1.8--default Ruby--version 3. How to install Redmine wget http://www.redmine.org/releases/redmine-3.3.2.tar.gz (http://www.redmine.org/projects/ Redmine/wiki/download) Unzip redmine-3.3.2.tar.gz create Redmine DB user. CREATE DATABASE redmine CHARACTER SET UTF8; CREATE USER ' redmine ' @ ' localhost ' identified by ' My_password '; GRANT all privileges in redmine.* to ' redmine ' @ ' localhost ';
Edit db config file Copy config/database.yml.example to config/database.yml and edit this file in order to configure your Database settings for "production" environment

Production:
  adapter:mysql2
  database:redmine
  host:localhost
  username:redmine
  password:my_ Password

Install bundle gem Install Bundler
Bundle install--without Development Test Rmagick (under Redmine Project root folder)
Generate Secret token bundle exec rake Generate_secret_token
Create database schema Object Rails_env=production bundle exec Rake db:migrate
Startup Redmine nohup Bundle exec Rails server-p 3000-b 192.168.0.96-e production > Nohup.log 2>&1 &

4. How to Backup and move Redmine
Just backup database ' Redmine ', and plugins, files, and yml files. Backup database for redmine/usr/local/mysql/bin/mysqldump-uroot-p redmine > Redmine.sql backup files tar-czvf files . Tar.gz/opt/redmine/redmine3.3.1/files (Images, XLS and all docs are stored) backup YML files CP redmine3.3.1/confi G/configuration.yml and redmine3.31/config/database.yml back Plugins tar plugins folder, if error occurs, please refers to Redmine3.3.1/log/production.log, and maybe you should rake migrate:plugins restore install Ruby, MySQL, and redmine on th E new OS, following all the steps listed above. Unzip plugins, files, and yml files/usr/local/mysql/bin/mysql-uroot-p Redmine < Redmine.sql
---------------------available plugins for 3.x:1. Redmine_checklists 2. Clipboard_image_paste 3. Redmine_agile 4. Redmine_vote 5. Xml-task-importer MS Project

How to install Agile plugin-redmine_agile 1. Unzip Redmine Agile Package, and copy Redmine_agile to "Plugins\" 2. Bundle install--without Development Test--no-deployment 3. Bundle EXEC Rake Redmine:plugins name=redmine_agile rails_env=production 4. Restart
If SSL error occurs when bundle install, just modify source URL from HTTPS to HTTP in Gemfile

Tobe continued.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.