Set up SVN server in Centos 6.4
Subversion is an excellent version control tool. For more information about its advantages and details, see the encyclopedia,
[root@localhost~]#iptables-F
[root@localhost~]#setenforce0
[Root @ localhost ~] # Lsb_release-a # view system version
LSBVersion::base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
DistributorID:CentOS
Description:CentOSrelease6.5(Final)
Release:6.5
Codename:Final
Modify local YUM Source
[root@localhost~]#cd/etc/yum.repos.d/
[root@localhostyum.repos.d]#ls
CentOS-Base.repoCentOS-Debuginfo.repoCentOS-Media.repoCentOS-Vault.repo
[root@localhostyum.repos.d]#mvCentOS-Base.repoCentOS-Base.repo.bak
[root@localhostyum.repos.d]#mvCentOS-Debuginfo.repoCentOS-Debuginfo.repo.bak
[root@localhostyum.repos.d]#mvCentOS-Vault.repoCentOS-Vault.repo.ak
[root@localhostyum.repos.d]#mvCentOS-Vault.repo.akCentOS-Vault.repo.bak
[root@localhostyum.repos.d]#vimCentOS-Media.repo
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
Changed:
baseurl=file:///mnt/sr0
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=0
enabled=1
Use: wq to save and exit
[Root@localhostyum.repos.d] # mkdir/mnt/sr0 # create hanging Source
[Root@localhostyum.repos.d] # mount/dev/cdrom/mnt/sr0 # hanging on the disc
[Root@localhostyum.repos.d] # yum-yinstallsubversion # Install svn Server
[Root@localhostyum.repos.d] # rpm-qlsubversion # view installation location
/etc/bash_completion.d
/etc/bash_completion.d/subversion
/etc/rc.d/init.d/svnserve
/etc/subversion
/usr/bin/svn
/usr/bin/svnadmin
/usr/bin/svndumpfilter
/usr/bin/svnlook
..................... Omitted part ..............................
[Root@localhostyum.repos.d] # ll/bin # svn generated several binary files under the bin directory,
Lrwxrwxrwx.1rootroot4 October 22, August 6 2015awk-> gawk
Lrwxrwxrwx.1rootroot4 August 7 2015csh-> tcsh
Lrwxrwxrwx.1rootroot8 October 22, August 6 2015dnsdomainname-> hostname
Lrwxrwxrwx.1rootroot8 October 22, August 6 2015domainname-> hostname
Lrwxrwxrwx.1rootroot2 August 6 2015ex-> vi
Lrwxrwxrwx.1rootroot3 August 6 2015gtar-> tar
Lrwxrwxrwx.1rootroot41 August 6 2015iptables-xml->/etc/alternatives/bin-iptables-xml.x86_64
Lrwxrwxrwx.1rootroot2 February 22, August 6 2015iptables-xml-1.4.7->/sbin/iptables-multi
Lrwxrwxrwx.1rootroot22 August 22, August 6> 5mail->/etc/alternatives/mail
Lrwxrwxrwx.1rootroot8 October 22, August 6 2015nisdomainname-> hostname
Lrwxrwxrwx.1rootroot2 August 6 2015rvi-> vi
Lrwxrwxrwx.1rootroot2 August 6 2015rview-> vi
Lrwxrwxrwx.1rootroot4 August 6 2015sh-> bash
Lrwxrwxrwx.1rootroot1 August 7 2015traceroute6-> traceroute
Lrwxrwxrwx.1rootroot2 August 6 2015view-> vi
Lrwxrwxrwx.1rootroot8 October 22, August 6 2015ypdomainname-> hostname
Enter svn -- help to obtain svn help information.
[root@localhost~]#svn--help
Usage: svn <
subcommand
>[options][args]
Subversion command line client, version 1.6.11.
Use "svnhelp <
subcommand
> "Displays the help information of sub-commands.
Use "svn -- version" to view the program version and version library access module, or
Use "svn -- version -- quiet" to view only the program version.
Most sub-commands can use file or directory parameters to recursively process directories.
If no parameter is specified, the current directory (including the current directory) is recursively processed by default.
Available sub-commands:
add
blame(praise,annotate,ann)
cat
changelist(cl)
checkout(co)
cleanup
commit(ci)
copy(cp)
delete(del,remove,rm)
diff(di)
export
help(?,h)
import
info
list(ls)
lock
log
merge
mergeinfo
mkdir
move(mv,rename,ren)
propdel(pdel,pd)
propedit(pedit,pe)
propget(pget,pg)
proplist(plist,pl)
propset(pset,ps)
resolve
resolved
revert
status(stat,st)
switch(sw)
unlock
update(up)
Subversion is a version control tool.
For details, see http://subversion.tigris.org/
Create svn version directory
[root@localhost~]#mkdir-p/var/svn/svnrepos
Create a version Library
[Root @ localhost ~] # Svnadmincreate/var/svn/svnrepos/# several files will be generated under/var/svn/svnrepos/after execution
[root@localhost~]#ll/var/svn/svnrepos/
Total usage 24
Drwxr-xr-x.2rootroot4096 November 16: 43 conf
Drwxr-sr-x.6rootroot4096 November 16, August 6: 43db
-R --. 1rootroot2 October 16: 43 format
Drwxr-xr-x.2rootroot4096 November 16: 43 hooks
Drwxr-xr-x.2rootroot4096 November 16: 43 locks
-Rw-r --. 1rootroot229 August 16: 43README.txt
View All files in the/var/svn/svnrepos/conf/directory
[root@localhost~]#ll/var/svn/svnrepos/conf/
Total usage 12
-Rw-r --. 1rootroot108 October 16: 43 authz # permission Control File
-Rw-r --. 1rootroot309 August 16: 43 passwd # account password file
-Rw-r --. 1rootroot2279 August 16: 43svnserve. conf # svn service configuration file
[Root @ localhost ~] # Vim/var/svn/svnrepos/conf/passwd # Add an access account and password
[users]
Wlr = wlr # username = Password
[Root @ localhost ~] # Vim/var/svn/svnrepos/conf/authz # authorize wlr to have read and write permissions
[/]
wlr=rw
w=r
[Root @ localhost ~] # Vim/var/svn/svnrepos/conf/svnserve. conf # Server Configuration
Anon-access = read # anonymous users can read and write
Auth-access = write # authorize the user to read
Password-db = passwd # Which file is used as the account file
Authz-db = authz # Which file is used as the permission File
Change realm = MyFirstRepository to realm =/var/svn/svnrepos
# Authentication space name, version library directory
Note: Do not leave a space before the preceding comments. Otherwise, the error/var/svn/svnrepos/conf/svnserve. conf: 12: Optionexpected will be reported.
Enable svn version Library
[root@localhost~]#svnserve-d-r/var/svn/svnrepos/
Test the client. The installation is not described here. You can use Baidu to continue the next step.
After installation, right-click the blank area on the desktop and move the mouse to the right of TortoiseSVN.
Click SVN Checkout.
Click "OK" and enter the user wlr password wlr added to the file.
Click OK. The link is successful and you can try uploading.