To install the SVN method in compile mode
1. Compile and install with source files. A total of two source files are:
subversion-1.6.1.tar.gz (Subversion source file)
Subversion-deps-1.6.1.tar.gz (Subversion dependent file)
Note that the file version must be consistent, otherwise it is easy to create a variety of strange problems.
2. Upload the above two files to the server, unpack. The decompression command is:
Tar xfvz subversion-1.6.1.tar.gz
Tar xfvz subversion-deps-1.6.1.tar.gz
3. After decompression to generate subversion-1.6.1 subdirectory, two compressed packets will automatically be placed in this directory after decompression, do not have to manually change.
4. Into the Extract subdirectory: CD subversion-1.6.1
5. Implementation./configure--PREFIX=/USR/LOCAL/SVN
The following error occurs when/configure: Configure:error:We require OpenSSL; Try–with-openssl
Configure failed for serf.
This is because the OpenSSL related package is not installed
OpenSSL official website: http://www.openssl.org/
Installation of OpenSSL under Linux:
wget http://www.openssl.org/source/openssl-1.0.0g.tar.gz
Tar xvzf openssl-1.0.0g.tar.gz
CD openssl-1.0.0g
And then:
./config--prefix=/usr/local/ssl Shared zlib-dynamic Enable-camellia
Then execute:
Make depend
Make
Make Test
Make install
Edit/etc/ld.so.conf, add to Paths/usr/local/ssl/lib (can be directly in/ETC/LD.SO.CONF.D
File
folder and then create a. conf file, copy the/usr/local/ssl/lib to the inside, and in the existing. conf file
Add/usr/local/ssl/lib this path, anyway ld.so.conf contains all the. conf files in this folder.
After installation, an SSL directory is generated under/usr/local, setting the environment variable, and increasing in the path of/etc/profile
Add the following
Capacity: path=/usr/local/ssl/bin:/sbin/: $PATH:/usr/sbin
Export PATH
6. Go back to subversion-1.6.1 and execute./configure--prefix=/opt/subversion configuration settings and indicate
Installation
Directory. Note that the prefix front is two minus signs. Default does not take BDB package, so the default is to use Fsfs mode. If you want to use the BDB model
The type requires another
Load BDB package. The FSFS mode is recommended.
Configure completion may occur:
You don ' t seem to have Berkeley DB version 4.0.14 or newer installed and linked to
Apr-util.
We have created makefiles which would build without the Berkeley DB back-end; Your
Repositories
Would USEFSFS as the default back-end. Can find the latest version of Berkeley DB
Here
Http://www.oracle.com/technology/software/products/berkeley-db/index.html
You don't seem to have Berkeley DB version 4.0.14 or newer version installed and linked to April-util. We have created
The makefile file will create a
Without the Berkeley DB backend, your version library uses the FSFS format as the default backend. You can find the latest version
Location of the Berkeley db.
This hint can be skipped because the BDB store is not used.
7. Perform make compilation.
8. Perform make install installation.
9. Add Environment variables:
Vi/etc/profile
At the end of the document add:
Svnpath= $PATH:/usr/local/svn/bin
Export Svnpath
10. Test SVN whether the installation was successful and execute:
Svnserve--version
If version information is displayed, the installation succeeds. (if Svnserve is not installed, please install Apt-get install
Subversion
These are the steps to install the SVN server on Linux, and the SVN server configuration is described below:
1. Set up a version library directory, the establishment of a good version of the library directory and the installation directory is not under the same level directory (you can build more than a new library after the following
All need
Reconfigure. Note the difference between the installation directory and the version Library directory, the following is a version of the library directory
Mkdir–p/opt/svndata/repos
2. Set up SVN version library (corresponding to the above directory)
Svnadmin Create/opt/svndata/repos
After you execute this command, SVN automatically adds the necessary configuration files to the Repos directory.
3. Modify the version library configuration file
Vi/opt/svndata/repos/conf/svnserve.conf
The parameter features are described in the comments in the configuration file, which are configured as follows:
[General]
Anon-access = none # makes unauthorized users inaccessible
auth-access = Write # Enables authorized users to have writing permission
Password-db =/opt/svndata/repos/conf/passwd # indicates password file path
authz-db =/opt/svndata/repos/conf/authz # access Control file
Realm =/opt/svndata/repos # authentication namespace, Subversion will be displayed in the authentication prompt, and
A keyword that is cached as a voucher.
Others adopt the default configuration. Each statement must be written below, the left can not leave a blank, or there will be an error.
Instructions: This is the format of the SVN configuration file, please write in the format above.
4. Configure users: passwd files
Enter the following content:
[Users]
< user 1> = < password 1> Admin = admin
< user 2> = < password 2> UserName2 = Password2
You can add multiple, this is a username password pair.
5. Configure permissions: Authz files
Directive Introduction: This profile uses the "path-based Authorization" policy, which specifies the path in brackets, and the following lists the user-delegated
Right. Includes read only r, read and write RW. No users are listed, access is not allowed. You can also group users, please refer to the SVN manual,
Here's a simple example:
<!--[if!supportlinebreaknewline]--> user group format:
[Groups]
< user group name > = < user 1>,< user 2>
Of these, 1 user groups can contain 1 or more users, separated by commas.
Version Library catalog format:
[< Version Library >:/project/directory]
@< user Group Name > = < permissions >
< user name > = < permissions >
Some of the box numbers can be written in several ways:
/, representing the root directory and below. The root directory is specified when the Svnserve is started, and we specify/opt/svndata. So,/is the table
Sets permissions on all version libraries.
repos1:/, to set permissions on version library 1
REPOS2:/ABC, to set permissions on the ABC project in version Library 2
REPOS2:/ABC/AAA, to set the AAA directory permissions for the ABC project in version Library 2
A permission principal can be a user group, user, or *, and the user group adds @,* to the front to represent all users. Permissions can be W, R, WR, and NULL
, null indicates no permissions.
Note: Configure Auth, passwd, and svnserve.conf must be forestall, otherwise client access will authenticate failure, such as the inability to access
, Baidu and Google have a lot of information available for reference.
Configuration complete, and then start svn: The SVN default port is 3690
1. Start command: svnserve-d-r Version Library path--listen-host 192.168.1.178
such as: svnserve-d-r/opt/svndata--listen-host 192.168.1.178
Issues encountered at startup:
Cannot bind server socket:address already in use occurs when Svnserve is started
Workaround:
Method One: Find Svnserve ID Kill process
Netstat-ntlp
Kill-9 ID
Method Two: Re-specify a port number (default port 3690)
svnserve-d--listen-port 3691-r/opt/svndata/repos
2. Check for successful startup: (see if svnserve process exists)
Ps-ef|grep Svnserve
3. Finally, install the client
Yum Command mode install SVN service
1. First you have to see if you have SVN installed, if installed, then don't bother.
Rpm-qa | grep subversion
2. If not installed, then install SVN.
Yum-y Install Subversion
3. Test whether SVN was installed successfully.
SVN--version
SVN service configuration:
1. First to create a warehouse
Svnadmin Create/var/www/test_repo
2. Configure the directory properties and user rights, if the warehouse is created successfully, you will see the test_repo/conf folder under the svnserve.conf
, the three documents PASSWD and Authz
(1) Set up warehouse permissions, VI svnserve.conf
Anon-access = None
auth-access = Write
Password-db = passwd
Authz-db = Authz
(2) Configure user and password, vi passwd
[Users]
McKee = phpddt.com
(3) Configure user operation Rights VI Authz
[test_repo:/]
McKee = RW
3. At this point, you can start SVN service.
svnserve-d-r/var/www--listen-host 42.121.145.230
You can check to see if the service started successfully:
NETSTAT-TUNLP | grep SVN
So simple, SVN service has been built, you can checkout a working copy, because I really windows write generation
Code, so the integrated GUI tool is used