In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to install and configure the SVN server of the Linux system". In the daily operation, I believe that many people have doubts about how to install and configure the SVN server of the Linux system. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to install and configure the SVN server of the Linux system". Next, please follow the editor to study!
1. Introduction of SVN service
SVN is a very excellent version management tool. Like CVS management tools, SVN is a cross-platform open source version control system that backs up and records every change of each file.
The workflow of the SVN version control system:
1: create or copy a branch on the central library
2: the code for this branch from the central library check out
3: then make changes and submit the updated code
2. Installation of SVN
System environment
[root@centos6 ~] # cat / etc/redhat-release
CentOS release 6.5 (Final)
[root@centos6 ~] # uname-r
2.6.32-431.el6.x86_64
Install the SVN service
[root@centos6 ~] # rpm-qa subversion
[root@centos6 ~] # yum install subversion
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Base | 3.7 kB 00:00
Extras | 3.4 kB 00:00
Updates | 3.4 kB 00:00
Setting up Install Process
Resolving Dependencies
-> Running transaction check
-> Package subversion.x86_64 0RU 1.6.11-15.el6_7 will be installed
-> Finished Dependency Resolution
Dependencies Resolved
=
Package Arch Version Repository Size
=
Installing:
Subversion x8631 64 1.6.11-15.el6_7 base 2.3m
Transaction Summary
=
Install 1 Package (s)
Total download size: 2.3 M
Installed size: 12 M
Is this ok [y/N]: y
Downloading Packages:
Subversion-1.6.11-15.el6_7.x86_64.rpm | 2.3MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing: subversion-1.6.11-15.el6_7.x86_64 1 Compact 1
Verifying: subversion-1.6.11-15.el6_7.x86_64 1 Compact 1
Installed:
Subversion.x86_64 0VOR 1.6.11-15.el6_7
Complete!
Start SVN
[root@centos6] # svnserve-d-r / application/svndata/
[root@centos6 ~] # ps-ef | grep svn
Root 2077 1 0 15:25? 00:00:00 svnserve-d-r / application/svndata/
Root 2079 2022 0 15:25 pts/0 00:00:00 grep svn
Check Port
[root@centos6] # lsof-I: 3690
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Svnserve 2077 root 3U IPv4 15031 0t0 TCP *: svn (LISTEN)
3. Configure SVN server
Create a version library
[root@centos6 ~] # svnadmin create / application/svndata/docs
[root@centos6 ~] # ll / application/svndata/docs/
Total 24
Drwxr-xr-x. 2 root root 4096 Nov 26 15:36 conf
Drwxr-sr-x. 6 root root 4096 Nov 26 15:36 db
-Rafael, Rafe, Rafael. 1 root root 2 Nov 26 15:36 format
Drwxr-xr-x. 2 root root 4096 Nov 26 15:36 hooks
Drwxr-xr-x. 2 root root 4096 Nov 26 15:36 locks
-rw-r--r--. 1 root root 229 Nov 26 15:36 README.txt
Configure SVN configuration files and permissions
[root@centos6 ~] # cd / application/svndata/docs/conf/
[root@centos6 conf] # ll
Total 12
-rw-r--r--. 1 root root 1080 Nov 26 15:36 authz
-rw-r--r--. 1 root root 309 Nov 26 15:36 passwd
-rw-r--r--. 1 root root 2279 Nov 26 15:36 svnserve.conf
[root@centos6 conf] # cp svnserve.conf svnserve.conf.bak
Backup of production environment is very important!
[root@centos6 conf] # diff svnserve.conf svnserve.conf.bak
12,13c12,13
< anon-access = none < auth-access = write --- ># anon-access = read
> # auth-access = write
20c20
< password-db = /application/svnpasswd/passwd --- ># password-db = passwd
27c27
< authz-db = /application/svnpasswd/authz --- ># authz-db = authz
By comparing the two files, you can see what changes have been made.
Configure password files and authentication permissions files
[root@centos6 conf] # cp authz passwd/ application/svnpasswd/
[root@centos6 conf] # cd / application/svnpasswd/
[root@centos6 svnpasswd] # ll
Total 8
-rw-r--r--. 1 root root 1080 Nov 26 15:46 authz
-rw-r--r--. 1 root root 309 Nov 26 15:46 passwd
[root@centos6 svnpasswd] # chmod 700. / *
[root@centos6 svnpasswd] # ll
Total 8
-rwx-. 1 root root 1080 Nov 26 15:46 authz
-rwx-. 1 root root 309 Nov 26 15:46 passwd
Configure user name and password
[root@centos6 svnpasswd] # vi passwd
# This file is an example password file for svnserve.
# Its format is similar to that of svnserve.conf. As shown in the
# example below it contains one section labelled [users].
# The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
Test = 123456
Test1 = 123456
Configure user permissions
[root@centos6 svnpasswd] # vi authz
[docs:/] Home directory permissions
Test = rw
Test1 = rw
[docs:/file] first-level directory permissions
Test = r
Test1 = rw
Note: the users configured in the permissions must exist in the user profile
After the configuration is completed, there is no need to restart and take effect immediately.
4. SVN client operation
WIN platform operation
Download SVN client software for installation
Create a new file svndata for the local client
Right-click the folder-SVN check out
Enter svn://192.168.1.235/docs at url and click OK
Create a new file, and then right-click the SVNDATA file-- svn commit
LINUX client operation
Download the file locally
[root@centos6] # svn co svn://192.168.1.235/docs/-- username=test-- password=123456
A docs/svn123.txt
A docs/test.txt
Checked out revision 3.
[root@centos6 ~] # ll
Total 48
-rw-. 1 root root 1229 Nov 18 11:13 anaconda-ks.cfg
Drwxr-xr-x. 3 root root 4096 Nov 26 16:50 docs
-rw-r--r--. 1 root root 21712 Nov 18 11:13 install.log
-rw-r--r--. 1 root root 5890 Nov 18 11:12 install.log.syslog
-rw-r--r--. 1 root root 60 Nov 25 22:44 txt
[root@centos6 ~] # ll docs/
Total 8
-rw-r--r--. 1 root root 50 Nov 26 16:50 svn123.txt
-rw-r--r--. 1 root root 24 Nov 26 16:50 test.txt
Update and list file list
[root@centos6] # svn update svn://192.168.1.235/docs/-- username=test-- password=123456
Skipped 'svn://192.168.1.235/docs'
[root@centos6] # svn list svn://192.168.1.235/docs/-- username=test-- password=123456
Svn123.txt
Test.txt
At this point, the study on "how to install and configure the SVN server of the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.