csvn链接:https://pan.baidu.com/s/1YPA8X6UOHtNyScqp0H4gZA
提取码:rfvs
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# ls
CollabNetSubversionEdge-5.1.4_linux-x86_64.tar.gz jdk-8u91-linux-x64.gz
新建文件夹命名为java
[root@localhost src]# sudo mkdir /usr/local/java
将文件拷贝到/usr/local/java下
[root@localhost src]# cp jdk-8u91-linux-x64.gz /usr/local/java/
进入该目录进行查看
[root@localhost src]# cd /usr/local/java/
[root@localhost java]# ls
jdk-8u91-linux-x64.gz
解压
[root@localhost java]# sudo tar zxvf jdk-8u91-linux-x64.gz
设置环境变量(随便一行或者末行)
[root@localhost java]# vim /etc/profile
export JAVA_HOME=/usr/local/java/jdk1.8.0_91/
export CLASSPATH=.:
J
A
V
A
H
O
M
E
/
l
i
b
/
d
t
.
j
a
r
:
JAVA_HOME/lib/dt.jar:
JAVAHOME/lib/dt.jar:JAVA_HOME/lib/tools.jar
export PATH=
J
A
V
A
H
O
M
E
/
b
i
n
:
JAVA_HOME/bin:
JAVAHOME/bin:PATH
环境变量生效
[root@localhost java]# source /etc/profile
检查
[root@localhost java]# java -version
java version “1.8.0_91”
Java™ SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot™ 64-Bit Server VM (build 25.91-b14, mixed mode)
搭建csvn(需要上传从CSVN压缩包)
创建用户和密码
[root@localhost java]# cd
[root@localhost ~]# useradd -M csvn
[root@localhost ~]# passwd csvn
Changing password for user csvn.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
创建数据库
[root@localhost ~]# mkdir /data
解压到数据库
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# tar xf CollabNetSubversionEdge-5.1.4_linux-x86_64.tar.gz -C /data/
进入数据库
[root@localhost src]# cd /data/
给属主和属组权限
[root@localhost data]# chown -R csvn.csvn csvn
设置csvn目录的组权限为读写执行
[root@localhost data]# chmod +w /etc/sudoers
进入配置文件
[root@localhost data]# vim /etc/sudoers
root ALL=(ALL) ALL
csvn ALL=(ALL) ALL
进入CSVN用户
root@localhost data]# su csvn
[csvn@localhost data]$ sudo -E /data/csvn/bin/csvn install
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for csvn:密码自己输入
Detected RHEL or Fedora:
Installing the CSVN Console daemon…
Setting RUN_AS_USER to: ‘csvn’. Please edit ‘…/data/conf/csvn.conf’ if this needs to be adjusted
Setting JAVA_HOME to: ‘/usr/local/java/jdk1.8.0_91/’. Please edit ‘…/data/conf/csvn.conf’ if this needs to be adjusted.
启动
[csvn@localhost data]$ csvn/bin/csvn start
Starting CSVN Console…
…
CSVN Console started
Initializing CSVN Console at http://localhost:3343/csvn. Please wait a moment for server to become available.
进入root用户,关闭防火墙,降低沙盒
[csvn@localhost data]$ su root
Password:
[root@localhost data]# iptables -F
[root@localhost data]# setenforce 0
访问网页
在网址访问:192.168.1.10:3343/csvn
虚拟机IP :端口号 /CSVN
用户名:admin
密码:admin