Linux installation and configuration svn server

Install SVN online

Use svn --versionthe command to check whether SVN has been installed.

or

 $ rpm -qa subversion
 subversion-1.14.1-1.x86_64

If not installed, use the yum command to install:

 $ yum install -y subversion

Upgrade the SVN version

Upgrade svn from version 1.7 to svn-1.14

Configure the yum source of svn

 tee /etc/yum.repos.d/wandisco-svn.repo <<-'EOF'
 [WandiscoSVN]
 name=Wandisco SVN Repo
 baseurl=http://opensource.wandisco.com/centos/7/svn-1.14/RPMS/$basearch/
 enabled=1
 gpgcheck=0
 EOF

Clean up the local yum cache

 $ yum clean all

install svn

 $ yum install -y subversion
 ###############################
 $ yum remove subversion # Uninstall

Create SVN repository

Build the SVN repository:

 $ mkdir /home/svn
 $ mkdir -p /home/svn/project ## can be omitted and directly execute the next one, which is not automatically added by default
 $ svnadmin create /home/svn/project

After executing the above command, a configuration file will be generated in the project directory:

 $ cd /home/svn/project
 $ ls
 conf  db  format  hooks  locks  README.txt

Enter confthe directory , configure svnserve.conf, passwd and authz.

 $ vi svnserve.conf
 [general]
 anon-access = read
 auth-access = write
 password-db = passwd
 authz-db = authz
 ​
 $ we passwd
 [users]
 admin = admin
 ​
 $ we authz
 [groups]
 g_admin = admin
 ​
 [/]
 @g_admin = rw
 * = r

Start the svn service

 $ svnserve -d -r /home/svn
 ##########################
 $ killall svnserve # stop svn

or

 $ ps -aux|grep svnserve #The default port is: 3690
 $ kill -9 2125319 ## 2125319 is the detected process id

Guess you like

Origin blog.csdn.net/qq_36538368/article/details/125373283