1 -- 軟體依賴與下載
apache依賴的軟體:openssl、apr-util、apr
svn依賴的軟體:openssl、apr-util、apr、sqlite、neon
下載各軟體連結:
apache:http://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.2.23.tar.gz
apr-util:http://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.5.1.tar.gz
apr:http://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.4.6.tar.gz
openssl:http://openssl.org/source/openssl-1.0.1c.tar.gz
subversion:http://www.fayea.com/apache-mirror/subversion/subversion-1.7.7.tar.gz
sqlite:http://sqlite.org/sqlite-autoconf-3071401.tar.gz
neon:http://www.webdav.org/neon/neon-0.29.6.tar.gz
2 -- 建立運行環境使用者以及使用者組
該使用者將是apache和svn運行時使用的有效使用者,建立命令:
shell# groupadd svnshell# useradd svnshell# mkdir /home/svnshell# chown -R svn:svn /home/svn
建立使用者svn以及使用者組svn,該使用者以及使用者組將用在以後軟體編譯、路徑使用權限設定以及apache和svn的運行時使用者。
3 -- 安裝依賴庫
STEP01 安裝apr
shell# tar -zxvf apr-1.4.6.tar.gzshell# cd apr-1.4.6/shell# ./configure --prefix=/home/svn/apps/aprshell# make && make install
STEP02 安裝apr-util
shell# tar -zxvf apr-util-1.5.1.tar.gz shell# cd apr-util-1.5.1/shell# ./configure --prefix=/home/svn/apps/apr-util --with-apr=/home/svn/apps/apr/shell# make & make install
STEP03 安裝SQLite
shell# tar -zxvf sqlite-autoconf-3071401.tar.gz shell# cd sqlite-autoconf-3071401/shell# ./configure --prefix=/home/svn/apps/sqliteshell# make && make install
STEP04 安裝openssl
shell# tar -zxvf openssl-1.0.1c.tar.gzshell# cd openssl-1.0.1c/shell# ./config --prefix=/home/svn/apps/ssl sharedshell# make && make install
STEP05 安裝neon
shell# tar -zxvf neon-0.29.6.tar.gzshell# cd neon-0.29.6/shell# ./configure --prefix=/home/svn/apps/neon --with-ssl --with-libs=/home/svn/apps/ssl --enable-sharedshell# make && make install
neon並非必要軟體,但如果需要通過http或者https協議訪問版本庫,那就必須安裝。我們知道,SVN有ra_dav(http,https)、ra_svn(svn原生協議)、ra_local(本地路徑)三種存模數塊,系統為我們預設安裝了ra_svn和ra_local,我們自己安裝neon庫,從而讓svn支援ra_dav儲存模組。下面是不安裝neon的情況下,svn的輸出:
shell# svn --versionThe following repository access (RA) modules are available:* ra_svn : Module for accessing a repository using the svn network protocol. - handles 'svn' scheme* ra_local : Module for accessing a repository on local disk. - handles 'file' scheme
當我們正確安裝neon,svn已經支援ra_dav之後,執行上述命令應該是如下輸出:
shell# svn --versionThe following repository access (RA) modules are available:* ra_neon : Module for accessing a repository via WebDAV protocol using Neon. - handles 'http' scheme - handles 'https' scheme* ra_svn : Module for accessing a repository using the svn network protocol. - handles 'svn' scheme* ra_local : Module for accessing a repository on local disk. - handles 'file' scheme
4 -- 安裝apache(with https)
shell# tar -zxvf httpd-2.2.23.tar.gzshell# cd httpd-2.2.23shell# ./configure --prefix=/home/svn/apps/apache --with-apr=/home/svn/apps/apr --with-apr-util=/home/svn/apps/apr-util --with-ssl=/home/svn/apps/ssl --enable-dav --enable-so --enable-ssl --enable-rewriteshell# make & make install
5 -- 安裝svn(with mod_dav_svn)
shell# tar -zxvf subversion-1.7.7.tar.gzshell# cd subversion-1.7.7shell# ./configure --prefix=/home/svn/apps/svn --with-apr=/home/svn/apps/apr --with-apr-util=/home/svn/apps/apr-util --with-ssl=/home/svn/apps/ssl --with-sqlite=/home/svn/apps/sqlite --with-apxs=/home/svn/apps/apache/bin/apxs --with-neon=/home/svn/apps/neon --with-opensslshell# make & make install