CentOS 6 compilation and installation of Subversion-1.8.10 + Apache2.4
Just record the installation process, so that you can copy it directly next time. You can find some options in the province. After CentOS6 is installed, it comes with Apache2.2 and subversion1.6. Let's take a look at how the system comes with it:
1. Use the built-in Apache and svn Configuration
1. Add svn users
1 # useradd-r-s/sbin/nologin svn
2. Configure the Apache configuration file
# Mkdir-pv/www/svnroot/# create a library directory for svn
# Chown-R svn. svn/www/svnroot/# Change permissions
# Cd/etc/httpd/conf. d # edit the configuration file
# Vim subversion. conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location/svn/> # define the path of the access, for example, http: // IP/svn
DAV svn
SVNParentPath/www/svnroot # SVN LIBRARY PATH
SVNListParentPath on # list Directories
AuthzSVNAccessFile/www/svnroot/authz # authentication File
# RedirectMatch ^ (/svn) $1/
AuthType Basic # Basic Authentication
AuthName "Subversion Auth" # authentication prompt information
AuthUserFile/www/svnroot/password # authentication password File
Require valid-user # Must be a valid user
</Location>
# Service httpd start
3. Create and test the version Library:
# Cd/www/svnroot
# Svnadmin create platform
# Chown-R svn. svn *
# Cp platform/conf/authz.
# Vim authz
[Aliases]
# Joe =/C = XZ/ST = Dessert/L = Snake City/O = Snake Oil, Ltd./OU = Research Institute/CN = Joe Average
[Groups] # define a group
Group_platform_admin = admin # group member
[/] # Browsing permissions of all users in the root directory
* = R
[Platform:/] # permissions for each version Library
@ Group_platform_admin = rw # permission
# Htpasswd-c password admin # generate a password file and add a user
Now, you can access it normally.
In this case, you can enter an address in the browser or use a client.
Ii. source code compilation and Installation
1. Resolve dependency packages
Yum-y install pcre-devel perl-ExtUtils-Embed perl-devel
Yum-y remove subversion
2. download the required source code package
Apr-1.5.1.tar.bz2
Apr-util-1.5.4.tar.bz2
Httpd-2.4.12.tar.gz
Sqlite-autoconf-3080802.zip
Subversion-1.8.10.tar.bz2
Zlib-1.2.8.tar.gz
Expat-2.0.1.tar.gz
3. Compile
Apr
./Configure -- prefix =/usr/local/apr
Make & make install
Apr-util
./Configure -- prefix =/usr/local/apr-util -- with-apr =/usr/local/apr/
Make & make install
Httpd-2.4.12
. /Configure -- prefix =/usr/local/apache -- sysconfdir =/etc/httpd24 -- enable-so -- enable-ssl -- enable-cgi -- enable-rewrite -- with-zlib -- -pcre -- with-apr =/usr/local/apr -- with-apr-util =/usr/local/apr-util -- enable-modules = most -- enable-mpms-shared = all -- with-mpm = event -- enable-proxy-fcgi -- enable-dav-fs -- enable-maintainer-mode
Make & make install
# Add environment variables after compilation:
Vim/etc/profile. d/apache. sh
Export PATH =/usr/local/apache/bin/: $ PATH
./Etc/profile. d/apache. sh # Takes Effect
Expat
./Configure
Make & make install
Sqlite
./Configure -- prefix =/usr/local/sqlite -- enable-libtool-lock
Make & make install
Subversion
. /Configure -- prefix =/usr/local/svn -- with-apr =/usr/local/apr/-- with-apr-util =/usr/local/apr-util /-- with-apxs =/usr/local/apache/bin/apxs -- with-apache-libexecdir -- with-sqlite =/usr/local/sqlite/-- with-openssl -- enable-maintainer -mode
Make & make install
# Add environment variables after compilation:
Vim/etc/profile. d/svn. sh
Export PATH =/usr/local/svn/bin/: $ PATH
./Etc/profile. d/svn. sh # Takes Effect
During the above compilation process, please note whether there are any errors. If there are any errors, then proceed to the next installation operation.
4. Configure Apache
# After the Apache compilation is complete, because the built-in Apache does not need to be uninstalled, directly go to the/etc/init. d/directory.
Cd/etc/init. d/
Cp httpd {,. bak}
Vim httpd
Apachectl =/usr/local/apache/bin/apachectl
Httpd =$ {HTTPD-/usr/local/apache/bin/httpd}
Prog = httpd
Pidfile =$ {PIDFILE-/var/run/httpd. pid}
Lockfile =$ {LOCKFILE-/var/lock/subsys/httpd}
# Modify the corresponding paths. The pidfile must define the path in the configuration file and write the error log Path completely. This facilitates troubleshooting.
# Add the following lines to the configuration file:
Add the following two lines to the path loaded by LoadModule:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
# Note: Change the started user and group to the user and group used by SVN. Otherwise, you do not have the write permission, or change the owner group of the svn directory to the one running Apache.
# Add the following in other locations:
<Location/svn/>
DAV svn
SVNParentPath/data/svn
AuthzSVNAccessFile/data/svn/authz
# SVNListParentPath on
AuthType Basic
AuthName "Subversion Auth"
AuthUserFile/data/svn/password
Require valid-user
</Location>
# Service httpd restart
5. Configure the svn library and authentication file. The first configuration is the same.
6. Access Test
Test as above. Client Access is the same.
Subversion configuration instances in Linux
CentOS 6.2 SVN setup (YUM installation)
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