Install redmine 2.5.2 in centos

Source: Internet
Author: User
Tags redmine

Redmine is a Web-based project management software developed using Ruby. Therefore, you must first download and install Ruby, and then download the ruby Packaging System rubygems that packages Ruby components.

Step 1: Download necessary software

1. Install dependency packages

# Yum-y install zlib-devel curl-devel OpenSSL-devel httpd-devel Apr-util-devel mysql-devel

2. Download and install software

Redmine download: # wget-P ~ /Tools http://www.redmine.org/releases/redmine-2.5.2.tar.gz

Ruby download: # wget-P ~ /Tools http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz

Download rubygems: # wget-P ~ /Tools http://production.cf.rubygems.org/rubygems/rubygems-2.4.1.tgz

Step 2: Install necessary software

1. Unzip and install Ruby

# Cd ~ /Tools

# Tar zxvf ruby-2.1.2.tar.gz

# Cd ruby-2.1.2

#./Configure & make install

  Note: If the installation directory is specified during compilation. /configure -- prefix =/usr/local/Ruby. To add environment variables after installation, add the following two lines at the end of/etc/profile:

Path =/usr/local/Ruby/bin: $ path

Export path

View the installed Ruby version: # ruby-V

Ruby 2.1.2p95 (Revision 45877) [x86_64-linux]

2. decompress and install rubygems

# Cd ~ /Tools

# Tar zxvf rubygems-2.4.1.tgz

# Cd rubygems-2.4.1

# Ruby setup. Rb

View the installed rubygems version: # gem-V

Reference result: 2.4.1

3. InstallationRails

Because of the domestic network (You know), the intermittent connection of resource files stored in Amazon S3 on rubygems.org fails. So update the gem Source:

# Gem sources -- r https://rubygems.org/

# Gem sources-A https://ruby.taobao.org/

# Gem sources-l

* ** Current sources ***

Https://ruby.taobao.org

# Make sure only ruby.taobao.org is supported.

# Gem install rails

View the installed rails version: # rails-V

Reference: rails 4.1.5

Step 3: Install redmine

1. Go to MySQL and create a database.

Mysql> Create Database redmine Character Set utf8;

Mysql> create user 'redmine '@ 'localhost' identified by 'my _ password ';

Mysql> grant all privileges on redmine. * To 'redmine '@ 'localhost ';

// Note that my_password is your MySQL password.

2. decompress and copy redmine

# Cd ~ /Tools

# Tar zxvf redmine-2.5.2.tar.gz

Copy the decompressed redmine-2.5.2 to the web directory. The redmine directory mentioned later refers to the directory generated after decompression.

3. modify the configuration file in the redmine directory

# Cp config/database. yml. Example config/database. yml

# Vi config/database. yml

Production:

Adapter: mysql2

Database: redmine

HOST: localhost

Username: redmine

Password: my_password

// Note that my_password is your MySQL password.

4. Install the dependency package

# Gem install bundler

# Bundle install -- without development test rmagick

5. Generate session storage:

# Rake generate_secret_token

6. Create a database structure:

# Rails_env = production rake DB: migrate

7. Insert default data:

Rails_env = production redmine_lang = ZH rake redmine: load_default_data

8. Set File Permissions

# Mkdir-p tmp tmp/pdf public/plugin_assets

# Chown-r redmine: redmine files log TMP public/plugin_assets

# Chmod-r 755 files log TMP public/plugin_assets

Step 4: Start redmine

# Ruby script/rails server webrick-e Production

Wait until the startup is complete and access: http: // localhost: 3000 /.

Username: Admin

Password: Admin

// Note that localhost is the actual IP address of the server, and the product permission must be enabled.

Step 5: add to auto-start

Edit the Startup File.

# Vi/etc/rc. Local

Add the content to the last line or a proper position. The absolute path must be used here. Be sure to enter the actual redmine path.

/Usr/local/Ruby/bin/Ruby/www/redmine/script/rails server webrick-e Production

Install redmine 2.5.2 in centos

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.