1. 설치
yum -y install subversion
2. 데몬설정
- yum으로 설치한 경우 /etc/sysconfig/subversion, /etc/init.d/subverion 화일이 없다.
- 아래의 내용으로 만들도록 한다.
- svn repository의 위치는 OPTIONS 항목에서 변경하면 된다.
vi /etc/sysconfig/subversion
# Configuration file for the Subversion service
#
# To pass additional options (for instace, -r root of directory to # server) to the svnserve binary at startup, set OPTIONS here.
#
OPTIONS="--threads --root /home/svn/repos.d"
#
# To pass additional options (for instace, -r root of directory to # server) to the svnserve binary at startup, set OPTIONS here.
#
OPTIONS="--threads --root /home/svn/repos.d"
vi /etc/init.d/subversion
#!/bin/bash
#
# /etc/rc.d/init.d/subversion
#
# Starts the Subversion Daemon
#
# chkconfig: 2345 90 10
# description: Subversion Daemon
# processname: svnserve
source /etc/rc.d/init.d/functions
[ -x /usr/bin/svnserve ] || exit 1
### Default variables
SYSCONFIG="/etc/sysconfig/subversion"
### Read configuration
[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
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
#
# /etc/rc.d/init.d/subversion
#
# Starts the Subversion Daemon
#
# chkconfig: 2345 90 10
# description: Subversion Daemon
# processname: svnserve
source /etc/rc.d/init.d/functions
[ -x /usr/bin/svnserve ] || exit 1
### Default variables
SYSCONFIG="/etc/sysconfig/subversion"
### Read configuration
[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
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
3. 부팅시 시작 서비스로 등록
chmod 755 /etc/init.d/subversion
chkconfig --add subversion
chkconfig --level 345 subversion on
service subversion start
4. .bash_profile 수정
vi ~/.bash_profile
export SVN_EDITOR=/usr/bin/vim
'개발 > Linux' 카테고리의 다른 글
[LINUX] 마스크레이딩과 포트포워딩. (0) | 2011.02.10 |
---|---|
[LINUX] hostname 변경 (0) | 2011.02.07 |
[LINUX] CentOS 5.5에 CMake 설치 (0) | 2010.12.20 |
[LINUX] FIND AND REPLACE with SED (0) | 2010.12.13 |
[LINUX] NFS 설치 및 설정 (0) | 2010.11.11 |