Installation Of Redmine With SVN On A cPanel/CentOS 5.6 Server
Installation Of Redmine With SVN On A cPanel/CentOS 5.6 ServerThis tutorial explains how to install Redmine with SVN on a cPanel/CentOS 5.6 server. Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database. All steps are executed as ‘root’. Prior to installation check if ImageMagick is installed: # /scripts/checkimagemagick ok If it is not then install it: # /scripts/installimagemagick It will take few minutes so prepare a coffee. ;) After ImageMagick is installed let's start with mod_dav. Check if mod_dav is enabled: # httpd -M | grep dav dav_module (static) If nothing displayed then recompile Apache using: # /scripts/easyapache
Now you can have 20-30 minutes break - drink previously prepared coffee :D After it is successfully finished check again if dav is enabled now: # httpd -M | grep dav dav_module (static) Next we need to install/enable subversion. # cd /usr/local/src/ Check latest package of rpmforge repo rpm on http://pkgs.repoforge.org/rpmforge-release/ according to architecture of your system (uname -p) and download and install it: # wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm Install latest subversion from rpmforge: # yum --enablerepo=rpmforge install subversion Get sources of the same subversion release you just installed (e.g. 1.6.11): # svn --version svn, version 1.6.11 (r934486) # yum list subversion Installed Packages # wget http://subversion.tigris.org/downloads/subversion-1.6.11.tar.bz2 Check latest SQLite Amalgamation package on http://www.sqlite.org/download.html and download it (e.g.: 3.7.13): # wget http://www.sqlite.org/sqlite-amalgamation-3071300.zip Unpack everything and prepare for configuration: # tar xjf subversion-1.6.11.tar.bz2 drwxr-xr-x 26 root root 4096 Aug 11 05:36 /home/cpeasyapache/src/httpd-2.2.22/srclib/apr/ ^^^^^^^^^^^^^^ Configure, build and install subversion: # cd subversion-1.6.11 Again - take a short break... After successful installation of subversion let's configure it. Create include folder for EA3 config file: # mkdir -p /usr/local/apache/conf/userdata/std/2/[USERNAME]/[DOMAIN] Add following lines: <IfModule mod_dav_svn.c>
<Location /svn>
DAV svn
SVNPath /home/[USERNAME]/svn
AuthType Basic
AuthName "Subversion"
AuthUserFile /home/[USERNAME]/.svn.htpasswd
Require valid-user
</Location>
</IfModule>
Find the location of modules: # updatedb /usr/local/apache/modules/mod_authz_svn.so Notice the paths - will be needed for next step. # vi /etc/httpd/conf/includes/pre_main_global.conf Add following lines: LoadModule dav_svn_module /usr/local/apache/modules/mod_dav_svn.so LoadModule authz_svn_module /usr/local/apache/modules/mod_authz_svn.so Create svn repository: # cd /home/[USERNAME] Check if htpasswd is present: # locate htpasswd . # /usr/local/apache/bin/htpasswd -cm /home/[USERNAME]/.svn.htpasswd [USERNAME_FOR_SVN] You will be prompted to set up a new password. Finally do: # ln -s /home/[USERNAME]/svn /svn Set up of subversion is done, now let's make it permanent and make some adjustments... Create startup script: # vi /etc/init.d/subversion Insert following lines: #!/bin/bash
#
# /etc/rc.d/init.d/subversion
#
# Starts the Subversion Daemon
#
# chkconfig: 345 90 10
# description: Subversion Daemon
# processname: svnserve
source /etc/rc.d/init.d/functions
[ -x /usr/bin/svnserve ] || exit 1
# To pass additional options (for instace, -r root of directory to server) to
# the svnserve binary at startup, set OPTIONS here.
#
OPTIONS="-r /svn"
RETVAL=0
prog="svnserve"
desc="Subversion Daemon"
start() {
echo -n $"Starting $desc ($prog): "
daemon $prog -d $OPTIONS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
echo
}
stop() {
echo -n $"Shutting down $desc ($prog): "
killproc $prog
RETVAL=$?
[ $RETVAL -eq 0 ] && success || failure
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
RETVAL=$?
;;
condrestart)
[ -e /var/lock/subsys/$prog ] && restart
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart}"
RETVAL=1
esac
exit $RETVAL
Now check if the startup script is working: # service subversion status Usage: /etc/init.d/subversion {start|stop|restart|condrestart} Great! :) # chkconfig subversion on subversion 0:off 1:off 2:on 3:on 4:on 5:on 6:off Now check if all is configured correctly and apply changes: # /scripts/verify_vhost_includes Testing /usr/local/apache/conf/userdata/std/2/[USERNAME]/[DOMAIN]/svn.conf...ok Do NOT continue if there are errors! Examine and double check where is the mistake! # /scripts/ensure_vhost_includes --user=[USERNAME] info [safeapacherestart] Forced restart elapsed seconds: 2 # /scripts/rebuildhttpdconf Built /usr/local/apache/conf/httpd.conf OK # /scripts/restartsrv_httpd # service subversion restart Final check: Go to www.yoursite.com/svn If all is working well you should be prompted for username/password.
|



Recent comments
11 hours 50 min ago
18 hours 31 min ago
22 hours 22 min ago
1 day 45 sec ago
1 day 8 hours ago
1 day 17 hours ago
1 day 18 hours ago
1 day 22 hours ago
2 days 2 hours ago
2 days 3 hours ago