一、下载svn安装包
链接:https://pan.baidu.com/s/1gkS0tef2kQP6nvXOS64hUw
提取码:cyuw
二、SVN安装部署
通过sftp将文件拉取到目的主机路径:/usr/package
跳转文件路径: cd /usr/package
执行解压命令:tar -zxvf subversion-1.14.2.tar.gz
执行文件路径变更: mv subversion-1.14.2 /usr/local/svn
2. 安装apr
1.下载:wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
2.解压:tar -zxvf apr-1.4.5.tar.gz
3.创建:mkdir /usr/local/apr
4.移动:mv apr-1.4.5 /usr/local/apr/apr-1.4.5
5.打开:cd /usr/local/apr/apr-1.4.5
6.配置:/usr/local/apr/apr-1.4.5/configure --prefix=/usr/local/apr
7.安装:make && make install
安装apr-utilcd /opt/package
1.下载:wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
2.解压:tar -zxvf apr-util-1.3.12.tar.gz
3.创建:mkdir /usr/local/apr-util
4.移动:mv apr-util-1.3.12 /usr/local/apr-util/apr-util-1.3.12
5.打开:cd /usr/local/apr-util/apr-util-1.3.12
6.配置:/usr/local/apr-util/apr-util-1.3.12/configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
7.安装:make && make install
安装apr-utilcd /opt/package
wget -c http://www.sqlite.org/2015/sqlite-autoconf-3080800.tar.gz
tar -zxvf sqlite-autoconf-3080800.tar.gz
mkdir /usr/local/sqlite
mv sqlite-autoconf-3080800 /usr/local/sqlite/sqlite-autoconf-3080800
cd /usr/local/sqlite/sqlite-autoconf-3080800
/usr/local/sqlite/sqlite-autoconf-3080800/configure --prefix=/usr/local/sqlite/sqlite-autoconf-3080800
make && make install
跳转svn路径cd /usr/local/svn
执行SVN安装命令/usr/local/svn/configure --prefix=/usr/local/svn --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-sqlite=/usr/local/sqlite/sqlite-autoconf-3080800 --with-utf8proc=internal --with-lz4=internal
执行svn安装
make && make install
建立软连接ln -s /usr/local/svn/bin/svn /usr/local/bin
ln -s /usr/local/svn/bin/svnserve /usr/local/bin
ln -s /usr/local/svn/bin/svnadmin /usr/local/bin
三、验证SVN是否安装成功
如下证明svn安装成功
四、配置SVN
创建版本库
svnadmin create /usr/local/svn/svndata
修改svnserve.conf
vim /usr/local/svn/svndata/conf/svnserve.conf
添加如下配置
# 以下配置添加到 [general] 下
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
realm = /usr/local/svn/svndata
设置用户密码
vim /usr/local/svn/svndata/conf/passwd
# 在最下方添加账号密码,可自定义,user为账号,passwd为密码
user1 = passwd1
user2 = passwd2
user3 = passwd3
user4 = passwd4
配置用户权限
vim /usr/local/svn/svndata/conf/authz
# 配置用户的读写权限,admin配置的可读可写,developer配置的可读权限
admin = user1,user2
developer = user3,user4
[/]
@admin = rw
@developer =r
执行svn启动命令
svnserve -d -r /usr/local/svn/svndata/
五、验证是否SVN是否启动成功
执行进程查询命令 : ps -ef|grep svnserve
如下则SVN安装并挂载成功
六、开放端口号
开放3690端口: firewall-cmd --add-port=3690/tcp --permanent
重启防火墙: systemctl restart firewalld