CentOS6.0 installation configuration rails2.3.11 + redmine1.2.1 notes

Source: Internet
Author: User
Tags i18n redmine
I did not expect the installation process to be so tortuous that the download during gem installation is often unsuccessful, so I had to handle it. the gem file is downloaded and then installed locally. In addition, radmine1.2.1 is also very picky about the versions of each component, and many detours have taken place in the middle. After two days, I finally figured out the path. By the way, the installer...

 

I did not expect the installation process to be so tortuous that the download during gem installation is often unsuccessful, so I had to handle it. download the gem file and install it locally. In addition, radmine 1.2.1 is also very picky about the versions of each component. it took a lot of detours and took two days to find out the path. By the way, record the installation method.

 

0. install related software packages

1: # yum install httpd-devel openssl-devel \ zlib-devel gcc-c ++ curl-devel subversion-y

1. install MySql database

Install MySQL and set it to boot automatically.

1: # yum install mysql-devel mysql-server 2: # chkconfig -- levels 235 mysqld on 3: #/etc/init. d/mysqld start

Create a Redmine database, run mysql-u root-p to log on to mysql, and enter the following SQL code in mysql> command line:

1: create database redmine character set utf8 COLLATE utf8_general_ci; 2: create user 'redmine '@ 'localhost' identified by 'redmine'; 3: grant all on redmine. * TO 'redmine '@ 'localhost ';

Add a database readmine and create a user to log on to redmine. the password is the same as the user name, and the user is authorized to access the redmine database.

 

Note: After mysql is installed, the root user does not set the password by default. to change the root password, run usr/bin/mysqladmin-u root password 'new-password.

 

2. install Ruby 1.8.7

Download Ruby1.8.7 source code compilation and installation, and create a temporary directory to store the files to be downloaded during the installation process

 

1: # mkdir ~ /Rails_install 2: # cd ~ /Redmine_install 3: # wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p352.tar.gz 4: # tar zxvf ruby-1.8.7-p352.tar.gz 5: # cd ruby-1.8.7-p352 6: #./configure 7: # make 8: # make install

After the installation is successful, run ruby-v to view the ruby version information, such:

Ruby 1.8.7 (patchlevel 352) [i686-linux]

 

3. install RubyGems

This is more picky, mentioned in redmine Installation Guide (http://www.redmine.org/projects/redmine/wiki/RedmineInstall) there are requirements, to be in 1.3.7 ~ Between 1.7.0, I chose version 1.6.2. Download the source code for installation.

 

1: # cd ~ /Rails_install 2: # wget http://rubyforge.org/frs/download.php/74445/rubygems-1.6.2.tgz 3: # tar zxvf rubygems-1.6.2.tgz 4: # cd rubygems-1.6.2 5: # ruby setup. rb

After the installation is successful, run gem-v to view the version information.

 

4. install Rails and related gems

If you directly use the gem install xxx installation tool, the installation fails. I do not know whether it is my network problem or other reasons, so I have to download all the files used and then install them locally.

 

1: # cd ~ /Rails_install 2: # wget http://rubygems.org/downloads/rake-0.8.3.gem 3: # wget http://rubygems.org/downloads/rack-1.1.0.gem 4: # wget http://rubygems.org/downloads/rails-2.3.11.gem 5: # wget http://rubygems.org/downloads/activesupport-2.3.11.gem 6: # wget http://rubygems.org/downloads/activerecord-2.3.11.gem 7: # wget http://rubygems.org/downloads/actionpack-2.3.11.gem 8: # wget http://rubygems.org/downloads/actionmailer-2.3.11.gem 9: # wget http://rubygems.org/downloads/activeresource-2.3.11.gem 10: 11: # wget http://rubygems.org/downloads/i18n-0.4.2.gem 12: # wget http://rubygems.org/downloads/mysql-2.8.1.gem 13: # wget http://rubygems.org/downloads/cgi_multipart_eof_fix-2.5.0.gem 14: # wget http://rubygems.org/downloads/coderay-1.0.0.gem 15: 16: # gem install -- local rake-0.8.3.gem 17: # gem install -- local rack-1.1.0.gem 18: # gem install -- local rails-2.3.11.gem 19: # gem install -- local mysql-2.8.1.gem 20: # gem install -- local i18n-0.4.2.gem 21: # gem install -- local cgi_multipart_eof_fix-2.5.0.gem 22: # gem install -- local coderay-1.0.0.gem

After successful installation, run rails to view the corresponding version information.

 

5. install Redmine 1.2.1

Use svn to download the Redmine 1.2 source code to the/var/www Directory

1: # svn co http://redmine.rubyforge.org/svn/branches/1.2-stable/var/www/redmine1.2

Redmine database configuration, copy the database configuration template under the config Directory

1: # cd/var/www/redmine1.2/2: # cp config/database. yml. example config/database. yml 3: # nano config/database. yml

Open the copied database. yml file and configure the mysql logon information of the production node.

 

1: production: 2: adapter: mysql 3: database: redmine 4: host: localhost 5: username: redmine 6: password: redmine

Generate sessions to store encryption information and databases

 

1: # cd/var/www/redmine1.2 2: # rake config/initializers/session_store.rb 3: # RAILS_ENV = production rake db: migrate 4: # RAILS_ENV = production rake redmine: load_default_data

When you execute the last line of command, you will be prompted to select the language type. enter zh and press Enter. if you press enter directly, the default value is English.

 

Run redmine

 

1: # cd/var/www/redmine1.2 2: # ruby script/server webrick-p 8000-e production

You can enter http: // [server IP address]: 8000 in the browser to access redmine. the default logon user name and password are admin. The interface is as follows:

 

Note that centos enables the iptables service by default. Therefore, you must add a permit rule in iptables for remote access.

# Nano/etc/sysconfig/iptables

Before-a input-j REJECT, add

 

1:-a input-m state -- state NEW-m tcp-p tcp -- dport 8000-j ACCEPT

Restart the iptables service to make the modification take effect.

# Service iptables restart

 

This allows remote access.

 

PS:

 

If you want to save trouble, you can download the vmwavevm file repository at http://bitnami.org/stack/redminehere. you can also download the overall installation package for win.

From: impermanence blog

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.