SVN配置文檔詳解
本節(jié)向大家簡單介紹一下SVN配置文檔,在這里提醒一下SVN和Apache的版本要對應起來,不然架設不起來,歡迎大家一起來學習SVN配置文檔。下面是具體的介紹。
安裝需要的軟件包:
Apr:APR-1.2.12和APR-util-1.2.12
Apache:httpd-2.2.6.tar.gz
Subversion:subversion-1.4.5.tar.gzsubversion-deps-1.4.5.tar.gz
1、安裝APR-1.2.12和APR-util-1.2.12
1)#tarzxvfapr-1.2.12.tar.gz
#cdapr-1.2.12
#./configure
Make;makeinstall
2)#tarzxvfapr-util-1.2.12.tar.gz
#cdapr-util-1.2.12
#./configure--with-apr=/usr/local/apr
#make;makeinstall。下面我們看一下SVN配置文檔中安裝Apache的介紹。
2、安裝apache2.2.6
1)解包httpd-2.2.6.tar.gz
#tarxzvfhttpd-2.2.6.tar.gz
2)生成配置文件
#./configure--prefix=/usr/local/apache2--enable-dav--enable-modules=so--enable-maintainer-mode--enable-rewrite--with-apr=/usr/local/apr/bin/apr-1-config--with-apr-util=/usr/local/apr/bin/apu-1-config
3)生成make文件,并安裝
#make;makeinstall
4)編輯配置文件httpd.conf
#vi/usr/local/apache2/conf/httpd.conf
(沒修改)
保存退出
5)啟動Apache服務:
#/usr/local/apache2/bin/apachectlstart
6)瀏覽網(wǎng)站:
用瀏覽器查看http://localhost/,得到itworks,說明apache已經(jīng)配置成功了。
7)停止Apache服務:
#/usr/local/apache2/bin/apachectlstop
8)設置啟動系統(tǒng)后,自啟動Apache服務
編輯etc/rc.d/rc.local
#vi/etc/rc.d/rc.local
在***加上一句:/usr/local/apache2/bin/apachectlstart
3、安裝subversion
1)解包
SVN配置文檔介紹安裝SVN時首先要對下載的軟件包進行解包。#tarxvzfsubversion-1.4.5.tar.gz
#tarxvzfsubversion-deps-1.4.5.tar.gz
2)轉入解包目錄并生成配置文件
#cdsubversion-1.4.5
SVN依賴的APR版本要正確。如果Apache為2.0.x,對應的APR版本應為0.9.x;Apache為2.2.x,對應的APR版本應為1.2.x。由于subversion-deps包里的APR是0.9.x的,因此編譯svn時要刪除從deps里解壓出來的apr,apr-util,改而使用apache2.2里提供的。(這里指定為開始安裝的apr目錄)
如果apache不是安裝在默認路徑,configure必須加上--with-apxs選項,如:./configure--with-apxs=/usr/local/apache2/bin/apxs(此目錄為我的apache安裝目錄)
#rm-rfapr
#rm-rfapr-util
#./configure--with-apxs=/usr/local/apache2/bin/apxs--prefix=/usr/local/subversion--with-apr=/usr/local/apr/bin/apr-1-config--with-apr-util=/usr/local/apr/bin/apu-1-config--with-ssl--with-zlib--enable-maintainer-mode
3)編譯安裝
#make;makeinstall
4)查看subversion兩個動態(tài)庫有沒有安裝成功
#vi/usr/local/apache2/conf/httpd.conf
看到下面兩個模塊說明安裝成功
LoadModuledav_svn_modulemodules/mod_dav_svn.so
LoadModuleauthz_svn_modulemodules/mod_authz_svn.so。請期待下節(jié)關于SVN配置文檔講解。
【編輯推薦】