linux下apache+svn的安裝


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 svn
shell# useradd svn
shell# mkdir /home/svn
shell# chown -R svn:svn /home/svn
創建用戶svn以及用戶組svn,該用戶以及用戶組將用在以后軟件編譯、路徑權限設置以及apache和svn的運行時用戶。
3 -- 安裝依賴庫
STEP01 安裝apr
shell# tar -zxvf apr-1.4.6.tar.gz
shell# cd apr-1.4.6/
shell# ./configure --prefix=/home/svn/apps/apr
shell# 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/sqlite
shell# make && make install
STEP04 安裝openssl
shell# tar -zxvf openssl-1.0.1c.tar.gz
shell# cd openssl-1.0.1c/
shell# ./config --prefix=/home/svn/apps/ssl shared
shell# make && make install
STEP05 安裝neon
shell# tar -zxvf neon-0.29.6.tar.gz
shell# cd neon-0.29.6/
shell# ./configure --prefix=/home/svn/apps/neon --with-ssl --with-libs=/home/svn/apps/ssl --enable-shared
shell# 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 --version

The 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 --version

The 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.gz
shell# cd httpd-2.2.23
shell# ./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-rewrite
shell# make & make install
5 -- 安裝svn(with mod_dav_svn)
shell# tar -zxvf subversion-1.7.7.tar.gz
shell# cd subversion-1.7.7
shell# ./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-openssl
shell# make & make install


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM