Notes on installing and configuring rails 2.3.11 + redmine 1.2.1 in centos 6.0

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. 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 httpd-devel openssl-devel\
zlib-devel gcc gcc-c++ curl-devel subversion -y
1. Install MySQL database
  • Install MySQL and set it to boot automatically.
   1: # yum install mysql 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

Change to the original Taobao image. http: // 110.75.120.11/

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 a vmwavevm File Repository at http://bitnami.org/stack/redminehere. The overall installation package for win is also available.

Source: http://wuchang.cnblogs.com

Refer:
Http://www.redmine.org/projects/redmine/wiki/RedmineInstall
Http://www.bilot.com /? P = 917
Http://endo.homeunix.net /~ Endo/mywiki/index. php? Centos6.0 % E3 % 81% a7redmine

Notes on installing and configuring rails 2.3.11 + redmine 1.2.1 in centos 6.0

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.