svn+apache/install.sh
#װapr
tar jxvf apr-1.5.0.tar.bz2  && cd apr-1.5.0

sed -i '/$RM "$cfgfile"/ s/^/#/' configure

./configure --prefix=/usr/local/apr

 make && make install

#װapr-util
tar jxvf apr-util-1.5.3.tar.bz2 && cd  apr-util-1.5.3

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config

make && make install

#װpcre
tar jxvf pcre-8.34.tar.bz2 && cd pcre-8.34

 ./configure --prefix=/usr/local/pcre
 
 make && make install

#openssl
tar zxvf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g

./config shared zlib
make && make install

mv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl

#װapache

tar jxvf httpd-2.4.7.tar.bz2 && cd httpd-2.4.7
 ./configure --prefix=/usr/local/apache2 --sysconfdir=/etc/httpd --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config  --with-pcre=/usr/local/pcre/ --enable-so --enable-mods-shared=most --enable-rewirte  --enable-ssl=shared --with-ssl=/usr/local/ssl
 
 make && make install


#װsqlite
tar zxvf sqlite-autoconf-3080403.tar.gz  && cd   sqlite-autoconf-3080403

./configure --prefix=/usr/local/sqlite

make && make install

#װsvn
tar  jxvf subversion-1.8.9.tar.bz2 && cd  subversion-1.8.9

./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-sqlite=/usr/local/sqlite/

make && make install

make install-tools  #ڰװĿ¼svn-toolsĿ¼һЩչߣsvnauthz-validate

#Ϊapacheģ

cp   libexec/mod_authz_svn.so  /usr/local/apache2/modules/
cp   libexec/mod_dav_svn.so  /usr/local/apache2/modules/

#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

#ȥInclude /etc/httpd/extra/httpd-vhosts.confǰעʹ֮Ч

#httpd-vhosts.conf
<VirtualHost *:80>
    ServerName svn.happigo.com
    <Location /svn>                         #/svnҪAliasĿ¼
        DAV svn
        SVNParentPath /data/svn      #svn汾Ŀ¼,Ŀ¼ж汾ʹSVNParentPath,汾ʹSVNPath
        AuthType Basic
        AuthName "Subversion repository"    #֤ҳʾϢ
        AuthUserFile /data/svn/passwd          #û
        Require valid-user                              # ֻ֤ͨû
        AuthzSVNAccessFile /data/svn/authz  #汾Ȩ޿
    </Location>
</VirtualHost>
# passwdauthzļ

# ֤ļ

# ûļ
/usr/local/apache2/bin/htpasswd -c  /data/svn/passwd  user1  #״ûûʹ-m

# 汾Ȩ֤ļ

vi  /data/svn/authz  #svn汾µauthzļʽ༭Ȩ޼

#  汾

/usr/local/subversion/bin/svnadmin  create /data/svn/happigo

# 
http://svn.happigo.com/svn/happigo


# apache  https

# Ҫװopenssl,ϱߵĲѾװ

# apacheҪsslģ߰װapacheʱѾʹenable-ssl̬ssl

#httpd.confȥеעͣʹ֮Ч
LoadModule ssl_module modules/mod_ssl.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
Include /etc/httpd/extra/httpd-ssl.conf

#༭httpd-ssl.confļ

<VirtualHost _default_:443>
ServerName svn.happigo.com:443
<Location /svn>
        DAV svn
        SVNParentPath /data/svn
        AuthType Basic
        AuthName "Subversion repository"
        AuthUserFile /data/svn/passwd
        Require valid-user
        AuthzSVNAccessFile /data/svn/authz
</Location>
SSLEngine on
SSLCertificateFile "/etc/httpd/server.crt"     
SSLCertificateKeyFile "/etc/httpd/server.key"
</VirtualHost >

# ssl֤
openssl genrsa  -out  server.key 1024

openssl req -new   -key server.key  -out server.csr  

openssl req -x509 -days 365 -key server.key -in server.csr  -out  server.crt

#ɵļŵ/et/httpdĿ¼£/etc/httpdĿ¼һhttpd-ssl.confָģ

# apache

#

https://svn.happigo.com/svn/happigo

#עģʽ£svn񲢲ͨhttphttpssvnsvnύݵʱҪ֤apacheûsvn汾Ŀ¼ждȨޣȻdb/txn-current-lock': Permission denied Ĵ
