1. Compile the installation with the source file. The total source files are two:
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 produce a variety of strange problems .
2. Upload the above two files to the server, unzip. The decompression commands are:
Tar xfvz subversion-1.6.1.tar.gz
Tar xfvz subversion-deps-1.6.1.tar.gz
3. After extracting the subversion-1.6.1 sub-directory, two compressed packets will be automatically placed in this directory after decompression, do not have to manually change.
4. Go to Unzip sub-directory: CD subversion-1.6.1
5. Implementation./configure--PREFIX=/USR/LOCAL/SVN
The following error occurs when the./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 the/ETC/LD.SO.CONF.D file
folder and create a. conf file, copy the/usr/local/ssl/lib to the inside, or in the existing. conf file
Add/usr/local/ssl/lib this path, anyway ld.so.conf contains all the. conf files under this folder)
After installation, an SSL directory is generated under/usr/local, setting environment variables, and adding the following in the path of/etc/profile
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 indication of installation
Directory. Note that there are two minus signs before prefix. The default is no BDB package, so the default is to use Fsfs mode. If you want to use the BDB mode requires a different
Load BDB package. The FSFS mode is recommended.
Configure completion may occur:
You don't seem to any 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. You can find the latest version of Berkeley DB here:
Http://www.oracle.com/technology/software/products/berkeley-db/index.html
You do not seem to have Berkeley DB version 4.0.14 or later installed and linked to April-util. We have created a makefile file that will build a
Without the Berkeley DB backend, your repository uses the FSFS format as the default back end . You can find the latest version of Berkeley DB location.
This hint can be skipped because BDB storage is not used.
7. Perform make compilation.
8. Perform the 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 if SVN is installed successfully, execute:
Svnserve--version
If version information is displayed, the installation succeeds. (if Svnserve is not installed, please install Apt-get installation Subversion first)
These are the steps to install the SVN server on Linux and the SVN server configuration is described below:
1. Build the repository directory, set up a good repository directory and the installation directory is not in a sibling directory (can be set up, after the new library, the following items are required
Re-configure. Note the difference between the installation directory and the repository directory, the following is the Repository directory)
Mkdir–p/opt/svndata/repos
2. Create the SVN repository (corresponding to the above directory)
Svnadmin Create/opt/svndata/repos
After executing this command, SVN automatically adds the necessary configuration files under the Repos directory.
3. Modifying a repository configuration file
Vi/opt/svndata/repos/conf/svnserve.conf
Each parameter function is described in the comments in the configuration file, which is configured as follows:
[General]
Anon-access = none # makes non-authorized users inaccessible
auth-access = Write # Enables authorized users to have write permissions
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 is displayed in the authentication prompt, and
As the keyword for the credential cache.
The other uses the default configuration. Each statement must be shelf write, the left can not leave a blank, otherwise there will be an error.
Instruction Description: This is the SVN configuration file format, please write in the format described above.
4. Configure User: passwd file
Enter the following:
[Users]
< user 1> = < password 1> Admin = admin
< user 2> = < password 2> UserName2 = Password2
You can add multiple, this is the user name password pair.
5. Configure permissions: Authz file
Instruction brief: This profile takes the path-based authorization policy, specifying the path in parentheses, and the following lists the authorizations for each user. Includes read-only R, read-write RW. If no users are listed, access is not allowed. You can also group users, please refer to the SVN manual, the following is 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 between users.
Repository directory format:
[< Repository >:/project/catalog]
@< user Group Name > = < permissions >
< user name > = < permissions >
Where the box number can be written in several ways:
/, which indicates the root directory and the following. The root directory is specified at svnserve startup, and we specify/opt/svndata. This means that the permissions are set for all repositories.
repos1:/, which indicates that permissions are set on version library 1
REPOS2:/ABC, which indicates that permissions are set on the ABC project in version Library 2
REPOS2:/ABC/AAA, which represents the AAA directory setting permissions on the ABC project in version 2
A permission principal can be a user group, user, or *, and the user group is preceded by @,* to represent all users. Permissions can be W, R, WR, and NULL, and NULL indicates no permissions.
Note: Configuration auth, passwd and svnserve.conf must be cautious, otherwise the client will fail to access authentication, such as can not access, Baidu and Google have a lot of information available for reference.
Configuration is complete, the next step is to start SVN: 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 out 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 whether the start is successful: (see if there is a svnserve process)
Ps-ef|grep Svnserve
3. Finally, install the client, download the client tortoisesvn-1.6.15.21042-win32-svn-1.6.16.msi, and download the corresponding version
The language pack Languagepack_1.6.15.21042-win32-zh_cn.msi unzip the installation.
Once installed, this allows access to the server directly using the svn://server IP.
Reprint: http://cainiao-zl.iteye.com/blog/1435328
Linux SVN server installation configuration and startup