svn搭建很简单,但是好多人遇到问题都问我,以下是我总结的svn的详细搭建过程,在此分享下!
1、安装csvn之前必须先安装jdk1.6和python2.4-2.6
jdk的安装
将下载好的jdk上传到/test下,赋予可执行权限
[root@localhost test]#chmod 777 jdk-6u27-linux-x64.bin
[root@localhost test]# ./jdk-6u27-linux-x64.bin
[root@localhost test]#mv jdk1.6.0_27/ /usr/local/
[root@localhost local]# vim /etc/profile (配置环境变量)
export JAVA_HOME=/usr/local/java
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
[root@localhost local]# source /etc/profile (使环境变量设置生效)
==================
export JAVA_HOME=/usr/local/java
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
==================
[root@localhost test]# java -version
java version "1.6.0_27" (出现此结果)
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
[root@localhost test]#
python可以用光盘自带的包安装
2、安装csvn
将软件包解压
[root@localhost test]#tar -zxvf CollabNetSubversionEdge-3.1.0_linux-x86_64.tar.gz -C /opt/
[root@localhost test]#useradd svn
[root@localhost test]#chown svn:svn -R csvn (要将csvn目录的所有者和所属组权限赋给普通用户,否则服务起不来)
[root@localhost test]#cd /opt/csvn
[root@localhost csvn]# ls
appserver bin data dist lib licenses pkg README www
[root@localhost csvn]# bin/csvn install (为了让svn随系统的启动而自动运行,执行此安装命令)
-----
[root@localhost csvn]# bin/csvn install
Detected RHEL or Fedora:
Installing the CSVN Console daemon..
Setting RUN_AS_USER to: 'root'. Please edit '../data/conf/csvn.conf' if this needs to be adjusted
Setting JAVA_HOME to: '/usr/local/jdk1.6.0_27'. Please edit '../data/conf/csvn.conf' if this needs to be adjusted.
[root@localhost csvn]#
确保data/conf/csvn.conf配置文件中JAVA_HOME路径为 /usr/local/jdk1.6.0_27
-----
[root@localhost csvn]# bin/csvn start
Starting CSVN Console......
CSVN Console started
Waiting for application to initialize (this may take a minute)..............................
CSVN Console is ready at http://localhost:3343/csvn
[root@localhost csvn]# bin/csvn console
Running CSVN Console...
CSVN Console is already running.
[root@localhost csvn]# bin/csvn start
Starting CSVN Console...CSVN Console is already running.
[root@localhost csvn]#
3、csvn的使用
启动成功后,浏览器输入http://192.168.11.10:3343 登陆
用户名:admin
密码: admin
转载于:https://blog.51cto.com/redface/1339688