-- Download and install turnkey linux's redmine appliance
http://www.turnkeylinux.org/redmine
-- install updates and required packages
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install aptitude
sudo aptitude install libapache2-svn libapache-dbi-perl libapache2-mod-perl2 libdbd-mysql-perl libdigest-sha1-perl
-- enable required packages in apache 2
sudo a2enmod dav
sudo a2enmod dav_svn
sudo a2enmod perl
-- copy Redmine.pm file to apache perl lib files
sudo cp /var/www/railsapp/extra/svn/Redmine.pm /usr/lib/perl5/Apache/Redmine.pm
-- create redmine config file for apache
sudo nano /etc/apache2/conf.d/redmine
# /svn location for users
PerlLoadModule Apache::Redmine
DAV svn
SVNParentPath "/srv/repos/svn"
AuthType Basic
AuthName redmine
Require valid-user
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
## for mysql
RedmineDSN "DBI:mysql:database=railsapp_production;host=localhost"
RedmineDbUser "root"
RedmineDbPass "*********"
Allow from all
-- Restart apache
sudo apache2ctl restart
-- setup permissions
sudo chown root:www-data /srv/repos/svn
-- update crontab
sudo crontab -e
*/2 * * * * ruby /var/www/railsapp/extra/svn/reposman.rb --redmine localhost --svn-dir /srv/repos/svn --owner www-data --url file:///srv/repos/svn/ >> /var/log/reposman.log
-- Turn on WS for repo
Navigate your web browser to the box
Go to « Administration -> Settings -> Repository » and check Enable WS for repository management.
-- create svn project in redmine
Go to « Administration -> project » New Project
-- connect project to svn
Go to « Projects -> [Project Name] -> settings -> Repository » and set the following settings
SMC: Subversion
url: file:///srv/repos/svn/[Project Name]
login: [Redmine admin account from DB]
password: [Redmine Password]
-- add users to redmine
Go to « Administration -> Users » add New user and assign them to a project
-- connect eclipe to svn
install svn plugin
add svn locaiton: http://[Server URL]/svn/[project name]
-- create backup script in linux
sudo nano /root/backup.sh
#!/bin/sh
rm /root/redmineBackup.sql.gz
rm /root/redmine_vtd2.svn.gz
# SQL Backup
mysqldump -uroot -p************ railsapp_production | gzip > /root/redmineBackup.sql.gz
# File Backup
svnadmin dump /srv/repos/svn/vtd2/ | gzip > /root/redmine_vtd2.svn.gz
# move redmine files and database to file server for
# offsite backup
ftp -in <
user [USER] [PASS]
bin
put /root/redmineBackup.sql.gz /redmineBackup.sql.gz
put /root/redmine_vtd2.svn.gz /redmine_vtd2.svn.gz
close
bye
EOF
-- Add backup to contab
sudo nano /etc/crontab
# Custom backup
0 22 * * * root sh /root/backup.sh