Download tool
[Plain]View Plaincopyprint?
- 1. subversion-1.6.17.tar.gz
- 2. subversion-deps-1.6.17.tar.gz
Two decompression of two packs:
1. Prior to this, I have created a user svnroot specifically used to install the management svn, extracted in the/home/root/directory
[Plain]View Plaincopyprint?
- TAR-XZVF subversion-1.6.17.tar.gz
- TAR-XZVF subversion-deps-1.6.17.tar.gz
2. Compiling the installation
[Plain]View Plaincopyprint?
- ./configure--prefix=/home/svnroot/subversion--without-berkeley-db
- prefix specifies the installed directory, WITHOUT-BERKELEY-DB indicates that the Berkeley database is not used
- In this step may not succeed, because there are some dependent software is not installed, see the following "Problems encountered"
- Make
- Make install
3. Add Environment Variables
[Plain]View Plaincopyprint?
- Can be added in/etc/profile
- Exprot path= $PATH:/home/svnroot/subversion/bin
- 4. See if the installation was successful
- /home/svnroot/subversion/bin/svnserve--version
- If SVN version is present, the installation is successful
Build the warehouse in three
1. Create a Directory
[Plain]View Plaincopyprint?
- Mkdir-p/HOME/SVNROOT/SVNDATA/REPOS1
- Plus the parameter p, which is created automatically if there is no parent directory
- Note:/home/svnroot/svndata here will be the root of all warehouses, and REPOS1 is one of the warehouses.
2. Create a warehouse
[Plain]View Plaincopyprint?
- Svnadmin CREATE/HOME/SVNROOT/SVNDATA/REPOS1
- This uses SVN to build the REPOS1 as a repository. The REPOS1 folder will generate a series of corresponding configuration files for the REPOS1 warehouse.
Four configuration warehouses
1. View the files after the warehouse is created
[Plain]View Plaincopyprint?
- Enter/svndata/repos1/conf, you will find a few configuration files
2. Modify Svnserve.conf
[Plain]View Plaincopyprint?
- VI svnserve.conf
- Open this configuration file, you can see a lot of configuration items have been commented out, just need to press the following several changes can be
- [General]
- Anon-access = None
- auth-access = Write
- Password-db = passwd
- Authz-db=authz
3. Directory control file Authz (or called permission control file)
[Plain]View Plaincopyprint?
- VI Authz
- Default is not configured, to configure the following example
- [Groups]
- admin = svnadmin
- [repos1:/]
- @admin = RW
- Svnadmin = RW
- The configuration permissions control files above are configured in the following format:
- [Groups]
- < user group name > = < user 1>,< user 2>
- [< 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/home/svnadmin/svndata. This means that the permissions are set for all repositories.
- repos1:/, which indicates that permissions are set on version library 1
- Repos2:/occi, which indicates that permissions are set on OCCI projects in version Library 2
- REPOS2:/OCCI/AAA, which represents the AAA directory setting permissions on the OCCI project in version Library 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.
4. Modify the user password file passwd
[Plain]View Plaincopyprint?
- VI passwd
- The default is not configured for any users, you can configure the sample configuration as follows
- [Users]
- Svnadmin = 123456
- Configuration format for user passwords:
- [Users]
- < user 1> = < password 1>
- < user 2> = < password 2>
- Note: Here the configuration file, in addition to comments, each line must be top line, or else will be an error.
Five Start SVN
[Plain]View Plaincopyprint?
- Svnserve-d-r/home/svnadmin/svndata
- -d means running in the background,-R means ...
- Note: This is/home/svnadmin/svndata, not/home/svnadmin/svndata/repos1. This is the command that SVN takes to make all the repository root directories, not a warehouse. It must be noted here.
Six basic tests
[Plain]View Plaincopyprint?
- SVN Co SVN://192.168.6.74/REPOS1
- Checkout, you will be asked to enter a user name password, only the configured user can verify the
Summary of issues:
1.configure:error:no XML Parser was found:expat or libxml 2.x required
[Plain]View Plaincopyprint?
- Error message requires installation of expat (download expat2.tar.gz)
- Cd/usr/local
- Tar-xvzf expat2.tar.gz
- CD EXPAT2
- ./configure
- Make
- Make install
2.configure:error:we require OpenSSL; Try--with-openssl
[Plain]View Plaincopyprint?
- The error message requires OpenSSL to be installed, so I installed a OpenSSL with the following installation methods:
- Cd/usr/local
- TAR-ZXVF openssl-1.0.0a.tar.gz
- CD openssl-1.0.0a
- ./config
- ./config-t
- Make depend
- Make
- Make Test
- Make instal
- After installation, an SSL directory is generated under/usr/local with the OpenSSL path configured for SVN
- ./configure--prefix=/home/svnadmin/subversion--without-berkeley-db--with-openssl=/usr/local/ssl
3.configure:error:subversion requires zlib
[Plain]View Plaincopyprint?
- Error prompts to install Zlib
- Download zlb:http://zlib.net/
- Cd/usr/local
- Tar-xvzf zlib-1.2.5.tar.gz
- CD zlib-1.2.5
- ./configure
- Make
- Make install
4.SVN Checkout https://xxx.xxx.xxx/
[Plain]View Plaincopyprint?
- Svn:ssl is not supported
- I looked it up from the internet and said it was in execution./configure to add--with-ssl
- ./configure--with-openssl=/usr/local/ssl--with-zlib=/usr/local/zlib--with-ssl--with-libs=/usr/local/ssl
Build SVN server in Linux