CentOS6.4 detailed tutorial for installing SVN of ultra detailed

  • 2020-05-10 23:23:59
  • OfStack

1, check whether the system has been installed if installed, uninstall


rpm -qa subversion
yum remove subversion

2, installation,


yum install subversion

3. Set up SVN library


mkdir -p /home/svn/repos
svnadmin create /home/svn/repos

After executing the above command, the repositories library is automatically set up, and the /home/svn/repos folder is found to contain conf, db,format,hooks, locks, README.txt files, indicating that an SVN library has been set up.

Go to the /home/svn/repos/ folder generated above and configure the authz file configuration. The purpose is to set which directories can be accessed by which users, and append the following to the authz file


[/]
afa4j = rw
abs = rw

The passwd file configuration is to add username and password files, as modified below


[users]
# harry = harryssecret
# sally = sallyssecret
afa4j = afa4j
abs = abs123

svnserve.conf file configuration configure access rights


[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
realm = /home/svn/repos

5. Start svn


/etc/init.d/svnserve start

6, check the process and listen to the port


ps -ef |grep svn |grep -v grep
root 23580 1 0 20:10 ? 00:00:00 /usr/bin/svnserve --daemon --pid-file=/var/run/svnserve.pid
netstat -antlp |grep :3690
tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN 23580/svnserve

7. Change the default port to 20016


vim /etc/init.d/svnserve
args="--daemon --pid-file=${pidfile} $OPTIONS --listen-port 20016"

Go to this 1 line and add -- listen-port 20016

save

8, restart


service svnserve restart
ps -ef |grep svn |grep -v grep
root 23580 1 0 20:10 ? 00:00:00 /usr/bin/svnserve --daemon --pid-file=/var/run/svnserve.pid --listen-port 20016
netstat -antlp |grep :20016
tcp 0 0 0.0.0.0:20016 0.0.0.0:* LISTEN 23580/svnserve

9, TortoiseSVN client connection test repository URL svn: / / xxx xxx. xxx: 20016 / home/svn/repos pop-up dialog enter the first add user name password input image


Related articles: