After two days, I finally built up SVN (version 1.8) on the server.
Server System: Centos6.5 64-bit, the building process using the source code compiled installation (Configure/make/make install), we recommend that you use the compilation installation.
The source installation needs to install GCC first to compile, if there is no compilation environment on the Yum-y install GCC installation.
Download the source code are the latest, no way, some of the old version of the software is really difficult to find, simply use the current latest.
Personal habits of the software are installed in the/usr/local/source download and put to/usr/local/src/below no special indication is so
Follow the steps below:
SU root operation under direct root authority
First, install APR, apr-util
cd/usr/local/srcwget-C http://Mirror.bit.edu.cn/apache//apr/apr-1.5.1.tar.gz Tar-ZXVF apr-1.5.1.Tar. GZChown-R Root:root apr-1.5.1CD Apr-1.5.1 ./configure--prefix=/usr/local/Apr Make&& Make Install
Next
wget -C http://mirrors.cnnic.cn/apache//apr/apr-util-1.5.4.tar.gz tar -zxvf apr-util-1.5. 4. Tar . GZ chown -R root:root apr-util-1.5. 4 cd Apr-util-1.5. 4
./configure--prefix=/usr/local/apu--with-apr=/usr/local/apr/
Make && make install
All right, check it out.
./apr/bin/apr-1-config--1.5. 1 . /apu/bin/apu-1-config--1.5. 4
Ii. installation of OpenSSL
wget -C http://www.openssl.org/source/openssl-1.0.1k.tar.gz
TAR-ZXVF openssl-1.0.1k.tar.gz
CD openssl-1.0.1k.tar.gz
./config--prefix=/usr/local/openssl-fpic No-gost no-shared no-zlib
Make && make install
Third , install Apache httpd server
wget-C http://Mirrors.cnnic.cn/apache//Httpd/httpd-2.4.10.tar.gz
TAR-ZXVF httpd-2.4.10.tar.gz
CD httpd-2.4.10
Install httpd It depends on more, some parameters may be used in the old version can be first./configure--help check it out.
There are many compile methods that are viewed from the web, and errors may occur:configure:error:pcre-config for Libpcre not found.
./configure--prefix=/usr/local/apache--with-apr=/usr/local/apr/--with-apr-util=/usr/local/apu/
--enable-so--enable-dav--enable-maintainer-mode--enable-rewrite
--enable-ssl--with-ssl=/usr/local/openssl
So we have to install the pcre (regular expression function library)
Download the version I downloaded here directly to the official website is 8.36
TAR-ZXVF pcre-8.36.tar.gz
CD pcre-8.36
MV Pcre-8.36/usr/local/pcre Direct copy to/usr/local
./configure (Compile using gcc+, do not install yum-y installs gcc-c++)
Make && make install
If you install it, recompile the httpd and it's OK.
./configure--prefix=/usr/local/apache--with-apr=/usr/local/apr/--with-apr-util=/usr/local/apu/
--enable-so--enable-dav--enable-maintainer-mode--enable-rewrite
--enable-ssl--with-ssl=/usr/local/openssl--with-pcre=/usr/local/pcre/pcre-config
Then start making, make install(if you don't add-fpic when installing OpenSSL in front of it, you may get an error here).
Some people may have problems in this step:
EXPORTS.C:1653'ap_hack_apr_version_string' exports.c:1022 ' ap_hack_apr_version_string ' is here
This is./SERVER/EXPORTS.C there are many two identical constants in this file from Apr Apu included come in is the same, I chose a stupid method to delete the extra constants and make install, actually. There is a parameter in the/configure --WITH-INCLUDED-APR plus the compilation is OK.
Open Browser Input http://127.0.0.1
Page display: It works!
Iv. installation of zlib
wget-C http://zlib.net/zlib-1.2.8.tar.gzTar-ZXVF zlib-1.2.8.Tar. GZChown-R Root:root zlib-1.2.8MVzlib-1.2.8zlibMVzlib/usr/local/CD/usr/local/zlib./Configure Make&& Make Install
Five , install Sqlite
wget-C http://www.sqlite.org/2014/sqlite-autoconf-3080704.tar.gzTar-ZXVF sqlite.autoconf-3080704.Tar. GZChown-R Root:root sqlite.autoconf-3080704.Tar. GZMVsqlite.autoconf-3080704SQLiteMVsqlite/usr/LOCALCD/usr/local/SQLite./Configure Make&& Make Install
Vi. installation of Subversion1.8
wget-C http://mirrors.hust.edu.cn/apache/subversion/subversion-1.8.11.tar.gzTar-ZXVF subversion-1.8. One.Tar. gz
CD subversion-1.8.11mkdir-P./sqlite-amalgamation (here Copy the sqlite3.c file from the newly installed SQLite to this)
Cp/usr/local/sqlite/sqlite3.c./sqlite-amalgamation/
./configure--prefix=/usr/local/subversion--with-apxs=/usr/local/apache/bin/apxs--with-apr=/usr/local/apr/
--with-apr-util=/usr/local/apu/--with-zlib--enable-maintainer-mode
Make && make instal
All right, come on, check it out.
/usr/local/subversion/bin/svnserve--version
Svnserve, Version 1.8.11 (r1643975)
Compiled Jan, 18:58:04 on X86_64-unknown-linux-gnu
.
.
.
See if the/usr/local/subversion/libexec/directory exists
Mod_authz_svn.so
Mod_dav_svn.so
Vii. Subversion and Apache integration
(1) Configuring Subversion
Build the SVN repository
mkdir -p/opt/svn/data/repos
/usr/local/subversion/bin/svnadmin Create/opt/svn/data/repos
Cd/usr/local/data
Apache access rights are daemon by default, so, accordingly,
Chown-r Daemon/opt/svn/data/repos
Next, build the access control file
Apache provides a build tool that can be generated directly using the HTPASSWD command
/usr/local/apache/bin/htpasswd-c/opt/svn/data/repos/conf/passwd Admin (-C new file)
/USR/LOCAL/APACHE/BIN/HTPASSWD/OPT/SVN/DATA/REPOS/CONF/PASSWD username
User created, next edit Authz (/opt/svn/data/repos/conf/authz) also has the corresponding template example
[Groups] (indicates group)
Boss=admin//Group name = user, user, user ... (comma delimited)
Boys=username
......
[repos:/]
@boss =RW
@boys =r
*=
How to configure the details of their own access to information. R Read W Write
(2) Configuring Apache
cd/usr/local/apache/
copies two files in subversion to./modules/
Cp/usr/local/subversion/libexec/mod_authz_ svn.so./modules/
cp/usr/local/subversion/libexec/mod_dav_svn.so./modules
Next, edit httpd.conf
Vi./conf/httpd.conf
First at the end of Loadmodules, plus
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
Then add
<location/repos> at the end of the configuration;
DAV SVN
svnparentpath/opt/svn/data/ #SVN仓库的父目录
Svnlistparentpath on
svnautoversioning On
svnreposname "repos"
Authzsvnaccessfile/opt/svn/data/repos/conf/authz #前面生成的访问控制文件
authtype Basic
AuthName "hello,welcome to my repos!"
AUTHUSERFILE/OPT/SVN/DATA/REPOS/CONF/PASSWD #用户文件
Require valid-user
</location
To complete this integration, restart Apache
./bin/apachectl-k Restart
You can open input Http://127.0.0.1/repos prompt to enter your account password in your browser Enter.
Eight , configure HTTPS
(1) First to generate the certificate private key
cd/usr/local/apache/conf/#直接在conf目录下存放
/usr/local/openssl/bin/openssl Genrsa 1024x768 > Server.key
Output hints:
Generating RSA private key, 1024x768 bit long modulus
.....++++++
........++++++
E is 65537 (0x10001)
This will generate a good server.key this file in conf
(2) Fill in the necessary information for the voucher
/usr/local/openssl/bin/openssl Req-new-key Server.key >Server.csr
You is about to being asked to enter information that'll be incorporatedinto your certificate request. What's about-to-enter is called a distinguished Name or a DN. There is quite a few fields but can leave some blankfor some fields there would be a default value,if you enter'.'The field would be a left blank.-----Country Name (2Letter Code) [Au]:cnstate or province name (full name) [Some-state]:guangdonglocality name (eg, city) []:shenzhenorganization name (eg, company) [Internet widgits Pty Ltd]:xxxxxo Rganizational Unit name (eg, section) []:common name (e.g. server FQDN or YOUR name) []:xxxxxxxemail Address []:xxxxxxxPlease enter the following'Extra'Attributesto be sent with your certificate Requesta challenge password []:xxxxxxxan optional company name []:xxxxxxx
Fill in the information and generate SERVER.CSR.
(3) Generate certificate
1024x768 -key server.key- in SERVER.CSR > Server.crt #-days indicates validity
(4) Edit configuration file httpd.conf httpd-ssl.conf
VI httpd.conf will #Include conf/extra/httpd-ssl.conf front of ' # ' removed
Include conf/extra/httpd-ssl.conf
VI./extra/httpd-ssl.conf
Plus
Sslcertificatefile "/USR/LOCAL/APACHE/CONF/SERVER.CRT"
Sslcertificatekeyfile "/usr/local/apache/conf/server.key"
(5) mandatory access to/repos via HTTPS
in httpd.conf <Location/repos> sslrequiressl ... .. </location
(6)
Restart Apache, get it done.
Installation of SVN integration Apache+ssl in Centos6.5 environment