Configure Ruby on Rails in CentOS and deploy Redmine

Source: Internet
Author: User

Configure Ruby on Rails in CentOS and deploy Redmine

Configure Ruby on Rails in CentOS and deploy Redmine

Install the preparation component

1. gcc compiling environment:

Yum-y install gcc

2. Other components:

Yum install flex autoconf zlib curl zlib-devel curl-devel bzip2 bzip2-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel gcc + gcc-c + libxml2 libxml2-devel libxslt-devel

Install libyaml

1. Install libyaml-0.1.4

Wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz

Tar xzvf yaml-0.1.4.tar.gz

Cd yaml-0.1.4

./Configure -- prefix =/usr/local

Make

Make install

2. Install libyaml-devel

Installation Source

// 32-bit System

Su-c 'rpm-Uvh http://download.fedoraproject.org/pub/epel/6/ I #/epel-release-6-8.noarch.rpm'

// 64-bit System

Su-C' rpm-Uvh restart'

Install libyaml-devel

Yum install libyaml-devel

Install MySQL

1. Install

Yum install mysql-server mysql-devel

// Start mysql

Service mysqld start/stop/restart

// Modify the mysql password

Mysqladmin-uroot password 'new-password'

// Log on to the CLI

Mysql-uroot-p

2. Create a database

Create database redmine character set utf8;

Install Ruby 1.9.3

1. Install

Wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p547.tar.gz

Tar zxvf ruby-1.9.3-p547.tar.gz

Cd ruby-1.9.3-p547

./Configure -- prefix =/usr/local/ruby -- enable-shared -- disable-install-doc -- with-opt-dir =/usr/local/lib -- with-openssl

Make

Make install

2. Test

Ruby-v

Ruby 1.9.3p547 () [x86_64-linux]

Gem -- version

1.8.23.2

3. Environment

Vim/etc/profile

// Add at the end

RUBY_HOME =/usr/local/ruby

PATH = $ PATH: $ RUBY_HOME/bin

Export RUBY_HOME PATH

// Save and exit. Operation: ESC->: wq

// Confirm the result. source/etc/profile

4. ROOT Environment

Alternatives -- install/usr/bin/ruby/usr/local/ruby/bin/ruby 300

Alternatives -- install/usr/bin/gem/usr/local/ruby/bin/gem 300

Install Rails

1. Install the specified version

Gem install rails-v "3.2.17"-V

Install Bundler

1. Install

Gem install bundler-V

2. Configuration

Alternatives -- install/usr/bin/bundle/usr/local/ruby/bin/bundling 300

Install Redmine

1. Installation preparation

Yum install ImageMagick-devel

2. Download

Wget http://www.redmine.org/releases/redmine-2.5.1.tar.gz

Tar zxvf redmine-2.5.1.tar.gz

Music redmine-2.5.1 redmine

Cd redmine/config

3. Modify the Database Configuration File

// Modify the configuration file

Cp database. yml. example database. yml

// Enter modify

Vim database. yml

4. Modify the file content as follows:

Production:

Adapter: mysql2

Database: redmine

Host: localhost

Username: redmine

Password: my_password

Port: 3306

Development:

Adapter: mysql2

Database: redmine

Host: localhost

Username: redmine

Password: my_password

Port: 3306

5. Install ruby Components

// Enter the redmine root directory. Do not use the root permission for bundle execution.

Bundle install -- without development test

6. Generate a key

Rake generate_secret_token

7. initialize the database (if the database structure already exists, ignore this part)

RAILS_ENV = production rake db: migrate

RAILS_ENV = production rake redmine: load_default_data

8. Build the file structure and permissions

Mkdir-p tmp/pdf public/plugin_assets

Sudo chown-R redmine: redmine files log tmp public/plugin_assets

Sudo chmod-R 755 files log tmp public/plugin_assets

9. Run

Admin, admin by default

10. Account Password

Ruby script/rails server webrick-e production-p 3000

// Open the browser http: // localhost: 3000

Reference

1. http://www.redmine.org/projects/redmine/wiki/RedmineInstall/

The most simplified Redmine deployment method in Ubuntu 10.04

Precautions for installing Redmine on Ubuntu 10.04 by default

Install and configure Redmine in CentOS 5

Set up PostgreSQL-based Redmine in Ubuntu 9.10

Install the open-source project management software Redmine in Ubuntu

How to upgrade the Turnkey Redmine VM from Redmine 1.0.5 to 1.2

Set up the Redmine environment, mail service configuration, and LDAP configuration in CentOS5

Redmine details: click here
Redmine: click here

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.