Build an Apache integrated SVN 1.8.5 server in CentOS 6.5 (Multi-version database permission configuration)
Build an Apache integrated SVN 1.8.5 server in CentOS 6.5 (Multi-version database permission configuration)
1. gcc-c ++ Installation
Yum install gcc-c ++
2. Upload the Subversion and dependency installation package to the CentOS server.
Download related files:
------------------------------------------ Split line ------------------------------------------
FTP address: ftp://ftp1.bkjia.com
Username: ftp1.bkjia.com
Password: www.bkjia.com
Build an Apache integrated SVN 1.8.5 server on LinuxIDC.com \ CentOS 6.5 on June 14, (Multi-version database permission configuration)
For the download method, see
------------------------------------------ Split line ------------------------------------------
3. Install dependency packages
Tar zxvf apr-1.5.0.tar.gz
Tar zxvf libtool-2.2.4.tar.gz
Tar zxvf apr-util-1.5.3.tar.gz
Cd apr-1.5.0
./Configure -- prefix =/usr/local/apr
Make
Make install
Cd libtool-2.2.4
./Configure -- prefix =/usr/local/libtool
Make
Make install
Cd apr-util-1.5.3
./Configure -- prefix =/usr/local/apr-util -- with-apr =/usr/local/apr/bin/apr-1-config
Make
Make install
Tar zxvf pcre-8.33.tar.gz
Tar zxvf httpd-2.4.7.tar.gz
Cd pcre-8.33
./Configure -- prefix =/usr/local/pcre
Make
Make install
Cd httpd-2.4.7
. /Configure -- prefix =/usr/local/apache -- enable-so -- enable-dav-fs -- enable-mnaintainet-mode -- with-apr =/usr/local /apr -- with-apr-util =/usr/local/apr-util -- with-pcre =/usr/local/pcre
Make
Make install
Tar xzvf zlib-1.2.8.tar.gz
Cd zlib-1.2.8
./Configure -- prefix =/usr/local/zlib
Make
Make install
Tar zxvf sqlite-autoconf-3080100.tar.gz
Tar zxvf subversion-1.8.5.tar.gz
Cd sqlite-autoconf-3080100
./Configure -- prefix =/usr/local/sqlite
Make
Make install
Cd subversion-1.8.5
. /Configure -- prefix =/usr/local/subversion -- with-apxs =/usr/local/apache/bin/apxs -- with-apr =/usr/local/apr --- apr-util =/usr/local/apr-util -- with-sqlite =/usr/local/sqlite -- enable-maintainer-mode -- with-zlib =/usr/local/zlib
Make
Make install
============================================
4. Apache and SVN command environment settings
Vi/etc/profile
PATH =/usr/local/apache/bin: $ PATH
PATH =/usr/local/subversion/bin: $ PATH
Exit VI
Source/etc/profile
============================================
5. Apache configuration
So File Replication
Cp/usr/local/subversion/libexec/mod_authz_svn.so/usr/local/apache/modules/mod_authz_svn.so
Cp/usr/local/subversion/libexec/mod_dav_svn.so/usr/local/apache/modules/mod_dav_svn.so
Httpd. conf configuration file modification
Vi/usr/local/apache/conf/httpd. conf
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
# Svn
<Location/svn>
DAV svn
SVNParentPath/usr/svn
AuthType Basic
AuthName "Subversion repository"
# Password storage file
AuthUserFile/usr/svn/auth. conf
Require valid-user
# Permission file for the user to access the Directory
AuthzSVNAccessFile/usr/svn/access. conf
</Location>
============================================
6. SVN Configuration
Mkdir/usr/svn
# Create a version Library
Svnadmin create/usr/svn/repos
# Add a user and set the password:
Htpasswd-c/usr/local/subversion/auth. conf test1
# Enter the password twice
Htpasswd/usr/local/subversion/auth. conf test2
# Enter the password twice
# SVN user access directory permission configuration file
Touch/usr/local/subversion/access. conf
Vi/usr/local/subversion/access. conf
# User group settings
[Groups]
G1 = test1
G2 = test2
# Version Library 1, group 1 is read/write permission, and group 2 is read-only
[Repos1:/]
@ G1 = rw
@ G2 = r
* =
# Mysvn folder group 1 under version 1 is read-only
[Repos1:/mysvn]
@ G1 = r
# Version library 2
[Repos2:/]
@ G1 = rw
@ G2 = rw
* =
# Version Library 3
[Repos3:/]
@ G1 = rw
@ G2 = rw
# Modify the SVNSERVE. CONF configuration file
Anon-access = none
Auth-access = write
Password-db =/usr/svn/auth. conf
Authz-db =/usr/svn/access. conf
Add read and write permissions for SVN version library files
Chmod-r 777/usr/svn
Start SVN
Svnserve-d-r/usr/svn -- config-file/usr/svn/svnserve. conf
Start APACHE
/Usr/local/apache/bin/apachectl start
============================================
7. Firewall Configuration
Iptables-p output accept # default policy
Iptables-p forward drop # default policy
Iptables-a input-I lo-j ACCEPT
Iptables-a input-p tcp -- dport 80-j ACCEPT
Iptables-a input-p tcp -- dport 3690-j ACCEPT
Iptables-a input-p tcp -- dport 22-j ACCEPT
Iptables-a input-m state -- state ESTABLISHED, RELATED-j ACCEPT # Allow ESTABLISHED and RELATED connections
Iptables-p input drop # default policy
Iptables-a output-m state -- state ESTABLISHED, RELATED-j ACCEPT # Allow ESTABLISHED and RELATED connections
/Etc/init. d/iptables save # save iptables configuration.
============================================
8. Disable selinux
Vi/etc/sysconfig/selinux
SELINUX = DISABLED
============================================
Client Access:
Version Library 1: http: // ip/svn/repos1
Version library 2: http: // ip/svn/repos2
Version Library 3: http: // ip/svn/repos3
-------------------------------------- Split line --------------------------------------
Subversion configuration instances in Linux
CentOS 6.2 SVN setup (YUM installation)
Deploy Apache + SVN in CentOS 6.5
Build an SVN server using Apache + SVN
Set up and use the SVN server in Windows + reset the password on the client
Install SVN in Ubuntu Server 12.04 and migrate Virtual SVN data
Build svn service and migration method on Ubuntu Server
Build SVN server with online storage
-------------------------------------- Split line --------------------------------------