Install Redmine with ruby and thin on Centos

Get the Latest Source from svn:

Download Ruby Version 1.8.7 RubyForge


Checkout Redmine from svn

svn co redmine-1.3

Install Dependencies:

yum install  gcc zlib zlib-devel openssl-devel mysql-devel

Install Ruby:

tar -zxvf<br></br>
cd ruby-1.8.7.xx<br></br>
make install<br></br>
ruby -v<br></br>
which ruby<br></br>
cd ..```

**Install Gems:**  


tar zxvf rubygems-1.4.2.tgz

cd rubygems-1.4.2

ruby setup.rb

gem -v

which gem

cd ..```

Install Rack and Rails

gem install rack -v 1.1.1<br></br>
gem install rails -v=2.3.14<br></br>
gem install thin```

**Configure Redmine Application Directory**

mv redmine-1.0.4 redmine

chmod -R a+rx /var/www/html/redmine/public/

cd /var/www/html/redmine

chmod -R 755 files log tmp```

Create Mysql User and Database

mysql> create database redmine default character set utf8;<br></br>
mysql> grant all on redmine.* to redmine@localhost identified by ‘redmine’;<br></br>
mysql> flush privileges;<br></br>
mysql> quit```

cp config/database.yml.example database.yml

**Update database.yml with your database settings.**

**Creating Database Structure , run the command under application root:**

RAILS_ENV=production rake config/initializers/session_store.rb

RAILS_ENV=production rake db:migrate```

Configure Apache:

vi /etc/httpd/conf/httpd.conf

Uncomment the line NameVirtualHost *:80

vi /etc/httpd/conf.d/redmine.conf

<VirtualHost *:80>         DocumentRoot /var/www/html/redmine/         ServerName         <Proxy balancer://redminecluster>                  BalancerMember                  BalancerMember                  BalancerMember                 ProxyPass / balancer://redminecluster/         ProxyPassReverse / balancer://redminecluster/         ErrorLog /var/log/httpd/redmine_error.log         CustomLog /var/log/httpd/redmine_access.log combined

Create thin Configuration File

thin config -C /etc/thin/redmine.yml -c /var/www/html/redmine --servers 3 -e production

Setup Redmine For Email :

vi /var/www/html/redmine/config/configuration.yml

delivery_method: :smtp<br></br>
address: ""<br></br>
port: 25<br></br>
authentication: :login<br></br>
domain: ''<br></br>
user_name: ''<br></br>
password: 'password'```

`<br></br><strong>Configure Services to start at boot, and start thin </strong>`

thin install

chkconfig –levels 235 thin on

service thin start```


Rake aborted!
no such file to load — net/https

Mysql library issue:
Install mysql-devel and reinstall ruby.

Install openssl-devel and re-install ruby
gem install mysql — –with-mysql-config=/usr/local/mysql/mysql_config

Only For Subversion

Create a Subversion repository and start the SVN deamon

svnadmin create /opt/svn/repo<br></br>
svnserve -d```

`vi /etc/httpd/conf.d/svn.conf`

LoadModule dav_svn_module modules/

LoadModule authz_svn_module modules/```

LDAPSharedCacheFile /root/LDAPSharedCacheFile<br></br>
LDAPSharedCacheSize 200000<br></br>
LDAPCacheEntries 1024<br></br>
LDAPCacheTTL 600<br></br>
LDAPOpCacheEntries 1024<br></br>
LDAPOpCacheTTL 600```

DocumentRoot /opt/svn


ErrorLog /var/log/httpd/svn_error.log<br></br>
LogLevel warn<br></br>
CustomLog /var/log/httpd/svn_access.log combined<br></br>
ServerSignature On<br></br>
AuthBasicProvider ldap<br></br>
AuthType Basic<br></br>
AuthzLDAPAuthoritative off<br></br>
AuthName "Test SVN server"<br></br>
AuthLDAPURL "ldap://,DC=test,DC=com?sAMAccountName"<br></br>
AuthLDAPBindDN "CN=ldap,CN=Users,DC=test,DC=com"<br></br>
AuthLDAPBindPassword LDAPpassword```

require valid-user

DAV svn

SVNParentPath /opt/svn

SVNListParentPath On

SVNReposName "Test SVN Repo"

SetHandler ldap-status```

# chown -R apache:apache /opt/svn/*<br></br>
# chmod -R 770 /opt/svn/*<br></br>```