Catatan Yang Mungkin Terlupakan

Redmine Instalation On Centos 5 to 6

After more than a week and more than 100 times tried to install and configure redmine with centos 5.2, and almost stuck with it. Today my installation is finish and my redmine server is running fine. Below here I will tried to explain how I install redmine.
First :

  • Find tutorial, methode, userguide and problem in internet.
  • Download the depedency
  • Prepare the server
  • Let’s cook

Step 1

Find tutorial, methode, userguide and problem in internet. With google I found a lot tutorial but only a few of them that I used so, below here is my user guide:

  1. http://www.redmine.org/projects/redmine/wiki/HowTo_install_Redmine_on_CentOS_5
  2. http://iyank4.blogspot.com/2011/11/install-redmine-121-di-centos-57-dengan.html
  3. http://www.systmbx.com/redmine/how-to-install-redmine-on-centos-5-5
  4. http://blog.b2netsolutions.com/server-administration-guides/installing-redmine-on-centos-5/
  5. http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

I combine the first 3 tutorial that make my redmine work.

Step 2

I download the main depency frist is:

  1. ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz
  2. http://rubyforge.org/frs/?group_id=126&release_id=45715
  3. http://rubyforge.org/frs/?group_id=1850

 

the first is ruby, then rubygem then the last is redmine. It doesn’t matter which version that you used but my suggestion is the leatest stable is perfect.

Step 3

Install the centos 5.2 on server and upload the main depency.  But I work in or you can downloaded as this tutorial.

[root@redmine ~]# ls -l
_[00mtotal 15336
-rw------- 1 root root    1314 Nov 11 13:57 anaconda-ks.cfg
-rw-r--r-- 1 root root   12232 Aug 13  2010 epel-release-5-4.noarch.rpm
-rw-r--r-- 1 root root   18222 Nov 11 13:57 install.log
-rw-r--r-- 1 root root    3952 Nov 11 13:57 install.log.syslog
-rw-r--r-- 1 root root  417792 Nov 11 14:26 install_redmine.txt
-rw-r--r-- 1 root root 9633744 Jul 11 18:54 redmine-1.2.1.tar.gz
-rw-r--r-- 1 root root    4974 May  1  2010 remi-release-5.rpm
-rw-r--r-- 1 root root   12680 Nov 13  2010 mrpmforge-release-0.5.2-2.el5.rf.i386.rpm
-rw-r--r-- 1 root root  430197 Nov  4 01:07 rubygems-1.8.11.tgz
-rw-r--r-- 1 root root 5102726 Nov  9 08:58 stable-snapshot.tar.gz
[root@redmine ~]#

Step 4

Let’s Cook’s…

  1. update system with
[root@redmine ~]# yum -y update
  1. instal the redmine rest depedency
[root@redmine ~]# yum install openssl-devel zlib-devel gcc gcc-c++ automake auto conf readline-devel curl-devel expat-devel gettext-devel patch mysql mysql-server mysql-devel httpd httpd-devel apr-devel apr-util-devel libtool apr openssl zlib subversion
Installed: curl-devel.i386 0:7.15.5-9.el5_7.4 gcc-c++.i386 0:4.1.2-51.el5 gettext-devel.i386 0:0.17-1.el5 httpd-devel.i386 0:2.2.3-53.el5.centos.3 libtool.i386 0:1.5.22-7.el5_4 mysql-devel.i386 0:5.0.77-4.el5_6.6 mysql-server.i386 0:5.0.77-4.el5_6.6 readline-devel.i386 0:5.1-3.el5 subversion.i386 0:1.6.11-7.el5_6.4
Dependency Installed: apr-devel.i386 0:1.2.7-11.el5_6.5 apr-util-devel.i386 0:1.2.7-11.el5_5.2 autoconf.noarch 0:2.59-12 automake.noarch 0:1.9.6-2.3.el5 cpp.i386 0:4.1.2-51.el5 cvs.i386 0:1.11.22-7.el5 cyrus-sasl-devel.i386 0:2.1.22-5.el5_4.3 db4-devel.i386 0:4.3.29-10.el5_5.2 e2fsprogs-devel.i386 0:1.39-33.el5 expat-devel.i386 0:1.95.8-8.3.el5_5.3 gcc.i386 0:4.1.2-51.el5 glibc-devel.i386 0:2.5-65 glibc-headers.i386 0:2.5-65 imake.i386 0:1.0.2-3 kernel-headers.i386 0:2.6.18-274.7.1.el5 keyutils-libs-devel.i386 0:1.2-1.el5 krb5-devel.i386 0:1.6.1-62.el5 libgomp.i386 0:4.4.4-13.el5 libidn-devel.i386 0:0.6.5-1.1 libselinux-devel.i386 0:1.33.4-5.7.el5 libsepol-devel.i386 0:1.15.2-3.el5 libstdc++-devel.i386 0:4.1.2-51.el5 libtermcap-devel.i386 0:2.0.8-46.1 openldap-devel.i386 0:2.3.43-12.el5_7.9 openssl-devel.i386 0:0.9.8e-20.el5 perl-DBD-MySQL.i386 0:3.0007-2.el5 zlib-devel.i386 0:1.2.3-4.el5
Updated: apr.i386 0:1.2.7-11.el5_6.5 apr-util.i386 0:1.2.7-11.el5_5.2 curl.i386 0:7.15.5-9.el5_7.4 cyrus-sasl-lib.i386 0:2.1.22-5.el5_4.3 db4.i386 0:4.3.29-10.el5_5.2 e2fsprogs-libs.i386 0:1.39-33.el5 expat.i386 0:1.95.8-8.3.el5_5.3 gettext.i386 0:0.17-1.el5 glibc.i686 0:2.5-65 glibc-common.i386 0:2.5-65 httpd.i386 0:2.2.3-53.el5.centos.3 krb5-libs.i386 0:1.6.1-62.el5 libgcc.i386 0:4.1.2-51.el5 libselinux.i386 0:1.33.4-5.7.el5 libsepol.i386 0:1.15.2-3.el5 libstdc++.i386 0:4.1.2-51.el5 mysql.i386 0:5.0.77-4.el5_6.6 neon.i386 0:0.25.5-10.el5_4.1 openldap.i386 0:2.3.43-12.el5_7.9 openssl.i686 0:0.9.8e-20.el5 patch.i386 0:2.5.4-31.el5 readline.i386 0:5.1-3.el5 zlib.i386 0:1.2.3-4.el5
Dependency Updated: cyrus-sasl.i386 0:2.1.22-5.el5_4.3 cyrus-sasl-plain.i386 0:2.1.22-5.el5_4.3 e2fsprogs.i386 0:1.39-33.el5 httpd-manual.i386 0:2.2.3-53.el5.centos.3 krb5-workstation.i386 0:1.6.1-62.el5 libselinux-python.i386 0:1.33.4-5.7.el5 mod_ssl.i386 1:2.2.3-53.el5.centos.3
Complete!
[root@redmine ~]#
  1. Download Ruby and install ruby
[root@redmine ~]# wget ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz
[root@redmine ~]# tar -zxvf stable-snapshot.tar.gz
[root@redmine ~]# cd ruby
[root@redmine ruby]# ./configure
[root@redmine ruby]# make
[root@redmine ruby]# make install
[root@redmine ruby]# ruby -v
ruby 1.8.8dev (2011-11-02) [i686-linux]
[root@redmine ruby]# which ruby
/usr/local/bin/ruby

Ruby installer properly
  1. Download and install rubygem
[root@redmine ~]# wget http://rubyforge.org/frs/download.php/75475/rubygems-1.8.11.tgz
[root@redmine ~]# tar -zxvf rubygems-1.8.11.tgz
[root@redmine ~]# cd rubygems-1.8.11
[root@redmine rubygems-1.8.11]# ruby setup.rb
RubyGems 1.8.11 installed
== 1.8.11 / 2011-10-03
* Bug fix:
* Deprecate was moved to Gem::Deprecate to stop polluting the top-level
namespace.

------------------------------------------------------------------------------
RubyGems installed the following executables:
/usr/local/bin/gem

Gem installed properly
  1. install passenger
[root@redmine redmine]# gem install passenger
No definition for rb_queue_marshal_dump
Installing RDoc documentation for daemon_controller-0.2.6...
Installing RDoc documentation for passenger-3.0.9...
  1. install passanger for apache.
[root@redmine redmine]# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer,
	Please edit your Apache configuration file, and add these lines:

   	LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
	/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.9
	/usr/local/bin/ruby_[0m_[37m_[40m

	After you restart Apache, you are ready to deploy any number of Ruby on Rails
	applications on Apache, without any further Ruby on Rails-specific
	configuration!

Edit file /etc/httpd/conf/httpd.conf
In the httpd.conf add the line above. Remember each installation had a different path make sure that you read this article and read the installation result.
  1. Now the best part will begin.
  2. Download redmine
[root@redmine ~]# http://rubyforge.org/frs/download.php/75518/redmine-1.2.2.tar.gz
  1. Extract the redmine file in folder /opt the folder is up to you where the redmine you will be put.
[root@redmine ~]# tar -zxvf_ re_dmine-1.2.1.tar.gz  -c /opt/
  1. Create a system link of the folder to Apache document root directory:
[root@redmine opt]# ln -s /opt/redmine/public /var/www/html/redmine
  1. Create the Redmine MySQL database
[root@redmine redmine]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database redmine character set utf8;
Query OK, 1 row affected (0.01 sec)
mysql> grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
  1. Configure the redmine database configuration in file  database.yml
cp config/database.yml.example config/database.yml
nano config/database.yml
production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: my_password
  1. Install Bundler
[root@redmine redmine]# gem install bundler
  1. Create the Gemfile and register these gems in it
[root@redmine redmine]# touch Gemfile
[root@redmine redmine]# nano Gemfile
Add this line
source "http://rubygems.org"
gem "rake", "0.8.3"
gem "rack", "1.1.0"
gem "i18n", "0.4.2"
gem "rubytree", "0.5.2", :require => "tree"
gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay
gem "mysql"
gem "coderay", "~>0.9.7"
  1. Install Gemfile
[root@redmine redmine]# bundle install
  1. Set the production environment (optional)
Uncomment the following line in file redmine/config/environment.rb:
ENV['RAILS_ENV'] ||= 'production'

Generate the session store
RAILS_ENV=production bundle exec rake generate_session_store

Migrate the database models
RAILS_ENV=production bundle exec rake db:migrate

Load default data (optional)
RAILS_ENV=production bundle exec rake redmine:load_default_data

will be show error but you can ignore it.
  1.  Setup permission:
# chown -R apache:apache /opt/redmine
# find /opt/redmine -type d -exec chown -R apache {} \;
# find /opt/redmine -type f -exec chown -R apache {} \;
# find /opt/redmine -type d -exec chgrp -R apache {} \;
# find /opt/redmine -type f -exec chgrp -R apache {} \;
# find /opt/redmine -type d -exec chmod 755 {} \;
# find /opt/redmine -type f -exec chmod 644 {} \;
  1. Configure Apache:
# vi /etc/httpd/conf.d/redmine.conf
Insert:

RailsBaseURI /redmine
<Directory /var/www/html/redmine>
    Options -MultiViews
</Directory>
Restart Apache:
# /etc/init.d/httpd restart
  1. Go to URL:
http://127.0.0.1/redmine
Login:

Username: admin
Password: admin
  1.  Finish.

Leave a Reply