Install Redmine with ruby and thin on Centos
Get the Latest Source from svn:
Download Ruby Version 1.8.7 RubyForge
wget http://ftp.ruby-lang.org/pub/ruby/ruby-1.8.7-p357.tar.gz<br></br>
Checkout Redmine from svn
svn co http://redmine.rubyforge.org/svn/branches/1.3-stable redmine-1.3
Install Dependencies:
yum install gcc zlib zlib-devel openssl-devel mysql-devel
Install Ruby:
tar -zxvf ruby-1.8.7.xxx<br></br>
cd ruby-1.8.7.xx<br></br>
./configure<br></br>
make<br></br>
make install<br></br>
ruby -v<br></br>
which ruby<br></br>
cd ..```
**Install Gems:**
wget http://production.cf.rubygems.org/rubygems/rubygems-1.4.2.tgz
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
<br></br>
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 redmine.test.com <Proxy balancer://redminecluster> BalancerMember http://127.0.0.1:3000 BalancerMember http://127.0.0.1:3001 BalancerMember http://127.0.0.1:3002 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
production:<br></br>
email_delivery:<br></br>
delivery_method: :smtp<br></br>
smtp_settings:<br></br>
address: "smtp.domain.com"<br></br>
port: 25<br></br>
authentication: :login<br></br>
domain: 'domain.com'<br></br>
user_name: 'redmine@domain.com'<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```
Troubleshooting:
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
Also,
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/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so```
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
ServerName svn.test.com```
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://ldap.test.com/CN=Users,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>```