7

Centos搭建SVN相关操作

 3 years ago
source link: https://xushanxiang.com/2019/07/centos-builds-svn-related-operations.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Centos搭建SVN相关操作

作者: xusx 分类: Linux 发布时间: 2019-07-31 15:14

1、安装

yum install subversion

2、查看版本

subversion -v
svnserve --version

3、建立SVN库

mkdir /opt/svn/repos
svnadmin create /opt/svn/repos

4、配置(略)

snvserv.conf、passwd、authz

5、启动SVN

svnserve -d -r /opt/svn/repos(对于单个代码仓库)

svnserve -d -r /opt/svn/(对于多个代码仓库)

如果已经有svn在运行,可以换一个端口运行

svnserve -d -r /opt/svn/repos –listen-port 3391

svn 默认端口是 3690(netstat -ntlp看3690端口是否正常开放)

6、测试状态(略)

svn info

7、关闭SVN

(1)查到服务的进程号:

ps -A | grep svn

4094 ? 00:00:00 svnserve

(2)关闭进程:

kill -9 4094

8、更改防火墙(非必须)

vi /etc/sysconfig/iptables

加入下行:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT

重启防火墙:

service iptables restart

9、设置SVN开机启动

echo 'svnserve -d -r /home/svn/' > start_svn.sh
chmod 0777 start_svn.sh

在/etc/rc.d/rc.local加入下行:

su -c /home/start_svn.sh svn

(仅供参考)

如果觉得我的文章对您有用,请随意赞赏。您的支持将鼓励我继续创作!

发表评论 取消回复

电子邮件地址不会被公开。 必填项已用*标注


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK