Home > Linux > Installing Redmine + MySQL on CentOS 5

Installing Redmine + MySQL on CentOS 5

Small guide for Redmine installation on CentOS 5.3.

Requirements:

  • Ruby 1.8.7
  • RubyGems
  • MySQL 4.1 or higher (recommended)
  • openssl + openssl-devel
  • zlib + zlib-devel

Lets install all required packages before compiling ruby.

First of all, lets add rpmforge repository to your default CentOS installation:

rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
rpm -ihv http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Now we will have the latest software that is not updated on official repos.

Installing all required software from repos:

yum install gcc-c++ mysql-server mysql-devel openssl openssl-devel zlib zlib-devel subversion

Start mysql server and change the pasword for user root in mysql (by default its empty):

service mysqld start
mysqladmin -u root password newpassword

Now we should be ready for ruby installation.

Installing Ruby:

wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz
tar zxvf ruby-1.8.7.tar.gz
cd ruby-1.8.7
./configure
make && make install

Installing RubyGems:

wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar zxvf gems-1.3.5.tgz
cd rubygems-1.3.5
ruby setup.rb

Installing Rails:

gem install rails -v=2.3.4

Installing  Redmine:

cd /opt
svn co http://redmine.rubyforge.org/svn/trunk redmine

Prepare mysql database for Redmine:

In mysql console:

create database redmine character set utf8;
create user ‘redmine’@’localhost’ identified by ‘my_password’;
grant all privileges on redmine.* to ‘redmine’@’localhost’;

Ok. Its created lets configure our database settings for  Redmine:

cd /opt/redmine
cp  config/database.yml.example config/database.yml

Edit config/database.yml and set your settings:

production:

adapter: mysql
database: redmine
host: localhost
username: redmine
password: my_password

Generate a session store secret:

cd /opt/redmine
rake config/initializers/session_store.rb

Create the database structure:

RAILS_ENV=production rake db:migrate

Insert default configuration data in database:

RAILS_ENV=production rake redmine:load_default_data

Setting up permissions:

chown -R redmine:redmine files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets

Configure email settings:

cd /opt/redmine
cp config/email.yml.example config/email.yml

Edit config/email.yml and set the right settings for SMTP server you will use:

Starting Redmine on built-in WEBrick web server:

ruby script/server webrick -p 8000 -e production

After its started you can access Redmine on the following URL:

http://your.ser.ver.ip:8000/

Use default administrator account to log in:

  • login: admin
  • password: admin

Thats it. Redmine is ready to use.

Usefull links:

Share this article
Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin