First, the package
Required Packages:
httpd-2.4.12.tar.bz2
subversion-1.8.13.tar.bz2
Sqlite-amalgamation-3071501.zip
serf-1.2.1.tar.bz2
Apr-1.5.2.tar.gz
Apr-util-1.5.4.tar.gz
Note: You may be prompted to install additional packages during the installation, depending on your personal system environment.
Second, installation and configuration steps:
1, installation apr-1.5.2
# TAR–ZVXF apr-1.5.2.tar.gz# cd apr-1.5.2#./configure--PREFIX=/USR/LOCAL/APR/* Install default installation to/usr/local/apr# make# m when no path is specified Ake Install
2, Installation apr-util-1.5.4
# TAR–ZVXF apr-util-1.5.4.tar.gz# cd apr-util-1.5.4#./configure--prefix=/usr/local/apu--with-apr=/usr/local/apr# make# make Install
3, Installation httpd-2.4.12.tar.bz2
# TAR–ZVXF httpd-2.4.12.tar.bz2# cd httpd-2.4.12#./configure--prefix=/usr/local/apache--with-apr=/usr/local/apr/ BIN/APR-1-CONFIG--WITH-APR-UTIL=/USR/LOCAL/APU/BIN/APU-1-CONFIG--ENABLE-MODULES=SO/* DSO mode install Apache (or-- enable-so)--enable-dav--enable-maintainer-mode--enable-rewrite# make# make install
4, Installation serf-1.2.1.tar.bz2
Resolve SVN/http ... When prompted svn:unrecognized URL scheme error. 1.8 need to add neon,1.8 version before the release of neon and change the use of serf;
#tar –ZVXF Serf-1.2.1.tar.bz2#./configure--prefix=/usr/local/serf--with-apr=/usr/local/apr/bin/apr-1-config-- with-arp-util=/usr/local/apu/bin/apu-1-config# make# make Install
5. Installation and Configuration subversion-1.8.13.tar.bz2
#tar –ZVXF subversion-1.8.13.tar.bz2#./configure--prefix=/usr/local/subversion--with-apxs=/usr/local/apache/bin/ apxs--with-apr=/usr/local/apr/bin/apr-1-config--with-apr-util=/usr/local/apu/bin/ Apu-1-config--with-ssl--with-zlib--enable-maintainer-mode--with-serf=/usr/local/serf#make#make Install
Note: The Configure will be error:
Configure: checking sqlite librarychecking sqlite amalgamation... nochecking sqlite amalgamation... nochecking sqlite3.h usability... nochecking Sqlite3.h presence... nochecking for sqlite3.h... nochecking sqlite library version (Via pkg-config) ... noan appropriate version of sqlite could not be found. we recommmend3.7.15.1, but require at least 3.7.12.please either install a newer sqlite on this systemorget the sqlite 3.7.15.1 amalgamation from: http:// Www.sqlite.org/sqlite-amalgamation-3071501.zipunpack the archive using unzip and rename the resultingdirectory to:/root/subversion-1.8.13/sqlite-amalgamationconfigure: error: subversion requireS sqlite
Install the above prompts, download SQLite into the Subversion directory and rename, re-configure through
wget Http://www.sqlite.org/sqlite-amalgamation-3071501.zipunzip SQLITE-AMALGAMATION-3071501.ZIPMV sqlite-amalgamation-3071501 subversion-1.8.13/sqlite-amalgamation
Determine if SVN has been installed successfully
#/usr/local/svn/bin/svnserve--version
You will see the relevant version information!
After installation, you will see two library files under Libexec:
Mod_authz_svn.so mod_dav_svn.so
6. Configure Apache to support SVN
A, copy mod_authz_svn.so mod_dav_svn.so to Apache's module directory
Open the support for both libraries in the config file:
LoadModule dav_svn_module modules/mod_dav_svn.soloadmodule authz_svn_module modules/mod_authz_svn.so
B. Start Build Repository
#/usr/local/subversion/bin/svnadmin create/svn/project/www/* Create warehouse "www" #ls/svn/project/www/* To see if there is a good creation, If more files are available, the repository has been created.
C. Modify SVN repository Permissions
Since Apache startup Default User is DAEMON:DAEMON,SVN startup default user is root
Chown-r Root:daemon/svn/project/wwwchmod-r 775/sv/project/www
D, configuration Apche support SVN
#vi/usr/local/apache/conf/httpd.conf# Add <location/svn>dav svnsvnparentpath/svn/project/* At the end of the file-Configure your version Coogan directory here ) AuthType Basic/* (Connection Type settings Basic authentication) AuthName "Hello Welcome to Here"/* (here the string content is modified to the prompt dialog title) AUTHUSERFILE/SVN/PASSWD/* (Modified here for access Repository user's files, generated with Apache's HTPASSWD command) authzsvnaccessfile/svn/auth.conf/* (modified here to access the Repository permissions file) Require valid-user/* ("Require Valid-user "tells Apache that all users in the Authfile can access it. If it is not, only the first user can access the new library) </location>
Save File Exit!
Re-launch Apache
/usr/local/apache/bin/apachectl restart
Check with your browser first
Open browser access http://192.168.1.220/svn/www prompt for user name password
Wait until the following steps can be accessed in the access, after entering if there is something to indicate success.
7. Configure SVN Rights Management (ie, authz.conf configuration)
A. Add Users:
#/USR/LOCAL/APACHE/BIN/HTPASSWD–C/SVN/PASSWD User1
The first time you set up a user, use-c indicates a new user file. Enter the user password after entering, complete the increase to the user
The second time you add a user does not need to take –c parameters such as:
#/usr/local/apache/bin/htpasswd/svn/passwd User2
B, Permission assignment:
#vi/svn/auth.conf[groups]/* This indicates group settings admin=usr1,user2/* This represents members of the admin group USER1,USER2DEVELOP=U1, U2/* This represents a member of the develop group u1,u2[www:/]/* This indicates that access rights under the root directory of the repository www user1 = rw/*www Warehouse user1 user has read and Write permissions user2 = r/* www warehouse Userl user with only Read permission @develop=rw/* This means that the members of the group develop have read and write permissions [/]/* This represents the root directory of all warehouses * = R/* This indicates that all users have read access
Note: When editing the authz.conf file, all lines must be written to the head, there can be no indentation, otherwise the error: "Access denied: ' User1 '", the contents can be added according to their own needs, not the same as I wrote above!
8. Restart Apache service and start SVN service
#/usr/local/apache/bin/apachectl–k restart
You can access the repository by http://192.168.1.220/svn/www this URL, and of course, permissions must be restricted to legitimate users to access and have the appropriate permissions
Finally start SVN
#/usr/local/svn/bin/svnserve-d-r/svn/project
-d means running in daemon (background run)
-r/svn/project specifies that the root directory is/svn/project
Check that the server is up and running:
#ps –ef|grep Svnserve
If shown below, this is the start success:
Root 45224 1 0 15:45? 00:00:00 svnserve-d-r/svn/project/
Next, the client TortoiseSVN installs directly and restarts the client computer.
Configuration is complete.
This article is from the "A sample" blog, please make sure to keep this source http://yayang.blog.51cto.com/826316/1642157
CentOS Configuration Apache+subversion