SVN installation and use
SVN installation access
SVN website
Download your own version of the installation package. Take Linux as an example, the installation process performs the following steps:
RPM-IVH APR-0.9.5-0.2.i386.rpm
RPM-IVH APR-UTIL-0.9.5-0.1.i386.rpm
RPM-IVH neon-0.24.7-1.i386.rpm
RPM-IVH Subversion-1.1.1-1.rh80.i386.rpm
SVN installation package basic order
svnThe command-line client program.svnversionA program for reporting the state (in terms of revisions of the items present) of a working copy.svnlookA tool for inspecting a Subversion repository.svnadminA tool for creating, tweaking or repairing a Subversion repository.svndumpfilterA program for filtering Subversion repository dumpfile format streams.mod_dav_svnA plug-in module for the Apache HTTP Server, used to make your repository available to others over a network.svnserveA custom standalone server program, runnable as a daemon process or invokable by SSH; another way to Make Your Repository Available To Others over a network.
Configure local access to SVN execution svn -version, you will see the following screen
[root @ localhost local] # svn --Version
* RA_DAV: Module for Accessing A Repository Via WebDAV (DELTAV) Protocol.
* RA_LOCAL: Module for Accessing a repository on local disk.
* RA_SVN: Module for Accessing a repository use the svn network protocol.
If you have a RA_LOCAL module, then the client can access the address of File: // URLS.
Execute a command
$ svnadmin create / root / svnrepo
$ LS / ROOT / SVNREPO
CONF / DAV / DB / FORMAT HOOKS / LOCKS / ReadMe.txt
Next, we build a local working directory / root / svnlocal, enter the execution
//create project
[root @ localhost svnlocal] # mkdir Project
[root @ localhost svnlocal] # MKDir Project / Trunk
[root @ localhost svnlocal] # MKDir Project / Branches
[root @ localhost svnlocal] # MKDir Project / Tags
// Create a module EXO
[root @ localhost svnlocal] # MKDir Project / EXO
[root @ localhost svnlocal] # vi provject / exo / exo.conf
[root @ localhost svnlocal] # svn import. file: /// root / svnrepo -m 'initial' [root @ localhost svnlocal] # rm -rf project
[root @ localhost svnlocal] # svn checkout file: // localhost / root / svnrepo / project // Check Overall project
[root @ localhost svnlocal] # svn checkout file: // localhost / root / svnrepo / project exo // one of the modules
If success, you can see that the file has been checked out. Address You can use file: // localhost / root / svnrepo or use file: /// root / svnrepo
Other orders have
Enter your working copy and edit a file's contents. Run svn diff to see unified diff output of your changes. Run svn commit to commit the new version of your file to the repository. Run svn update to bring your working copy "up-to- Date "with the repository.
SVN access address
Schema Access Methodfile: /// direct repository access (on local disk) http: // access via WebDAV protocol to Subversion-aware Apache serverhttps: // same as http: //, but with SSL encryption.svn: // via access Custom Protocol To An SvnServe Serversvn SSH: // Same As SVN: / / But Through An Ssh Tunnel.
Start SVN SVNServe so you can access the SVN: // URL. View startup parameters
[root @ localhost svnlocal] # svnserve --help
USAGE: SVNserve [options]
Valid Options:
-d [--daemon]: daemon mode
--Listen-Port Arg: Listen Port (for daemon mode)
--Listen-Host Arg: Listen Hostname OR IP Address (for daemon mode)
--Foreground: Run in wellGround (useful for debugging)
-H [--help]: Display this Help
--Version: Display Version
-i [--inetd]: inetd mode
-r [-root] Arg: root of directory to serve
-R [-read-only]: deprecated; use repository config file
-T [- Tunnel]: Tunnel Mode
- Tunnel-User Arg: Tunnel Username (Default Is Current Uid's Name) - T [--threads]: Use Threads INSTEAD OF FORK
-X [-listen-overce]: listen overce (useful for debugging)
We perform svnserve -d -r / root / svnrepo
Then execute it in the Svnlocal directory just now
[root @ localhost svnlocal] # svn checkout svn: // localhost / project exo
You can use the specified REPO or module by the network protocol Check.
Note: If we start with svnserve -d without developing the REPO path, then you must use the SVN Checkout SVN: // localhost / root / svnrepo / project exo to specify the full path when Checkout.
Next, we will modify a file, then execute
[root @ localhost exo-build] # svn commit -m "test"
You will find a prompt: "Submit Failed, SVN: Connection Is Read-Only" Description SVN: // No user permission control, only the most basic anonymous download.
Permissions Configuration First introduce the file-based rights control based on SVNserve
Enter / root / svnrepo / conf / open svnserve.conf, modify two lines
[general]
Anon-access = none
Auth-access = WRITE
Password-db = passwd
Note: All rows must be top, otherwise an error is reported.
Create a passwd file in the same directory and use the vi passwd command. Enter inside
[users]
Danny = Danny
Bobo = BOBO
Restart SVNserve, svnserve -d -r / root / svnrepo /.
Ok, next, we will execute
[root @ localhost svnlocal] # svn checkout svn: // localhost / project exo
Enter "root" password (arbitrary), the user login (Danny_XCZ) and password (pass) based on the prompt. It will be the directory you need normal Chekout. You do not need to enter the authentication password again when you log in again.