Article Directory
Explanation
- When changing svnserve.conf, you need to restart SVN, and you don't need to restart when changing authz and passwd files
- Source installation
- Need to join firewall
- The default port is 3690.
Time synchronization
- Do time synchronization first
ntpdate ntp1.aliyun.com
RPM method
-
installation
yum install -y subversion
Create a resource library
-
To create a resource library, you need to create the corresponding directory
#创建资源库 svnadmin create /opt/svndir
Configuration
-
Go to the resource directory
/opt/svndir
and modify the configurationcd /opt/svndir/conf/ #包含以下三个目录 authz #配置权限相关 passwd #配置用户相关 svnserve.conf #是资源库相关的配置
user
-
Add and delete users
vim password #------------下列是配置文件 [users] user1 = 123 # 用户名 = 密码 user2 = 123 # 用户名 = 密码 user3 = 123 # 用户名 = 密码
Grouping
-
Grouping
vim authz [groups]
Authority
-
It means that
user
users in the root directory have read and write permissions[/] user1=rw #代表了根目录下的user1用户具备读写权限 user2=r #代表了根目录下的user2具备有读的权限 *= #其他用户没有权限 [/data/js/] *=rw #代表了/data/js/]录下的所有用户具备读写权限
Repository configuration file
-
svnserve.conf
, Modify the configuration file needs to restart SVN[general] anon-access = none # 匿名无法访问 #anon-access = write # 匿名用可写 #anon-access = read # 匿名用读 auth-access = write # 使授权用户有写权限 auth-access = read # 使授权用户有读权限 password-db = passwd # 指明密码文件路径,可以建立一个稳定的目录使所有的资源库访问该文件,这样就避免了重复配置的问题 authz-db = authz #访问控制文件,可以建立一个稳定的目录使所有的资源库访问该文件,这样就避免了重复配置的问题 realm =/dat/svn/test #这里是仓库路径
System commands
-
start up
#启动 svnserve -d -r 表示将 svn 的目录当作根目录 svnserve -d -r /mnt/svn --listen-port 3000 以3000端口执行
-
Reboot
#查看SVN进程 ps -ef|grep svn #干掉该进程 kill -9 PID
-
View version
svnserve --version
access
- svn: // Alibaba Cloud public network ip: 3690