源碼安裝 linux apache 整合 subversion 初探

來源:互聯網
上載者:User

標籤:style   blog   http   color   os   io   檔案   for   

  1. 分別安裝Apache  subversion

    http://my.oschina.net/u/234018/blog/297849

    http://my.oschina.net/u/234018/blog/298292

  2. 修改apache 配置

    2.1 mod_authz_svn.so 和 mod_dav_svn.so 複製到apache /usr/local/apache/modules/

[[email protected] libexec]# cd /usr/local/subversion/libexec/[[email protected] libexec]# ll總用量 3968-rwxr-xr-x 1 root root  197099 8月   5 13:55 mod_authz_svn.so-rwxr-xr-x 1 root root 3860365 8月   5 13:55 mod_dav_svn.socp /usr/local/subversion/libexec/mod_authz_svn.so /usr/local/apache/modules/cp /usr/local/subversion/libexec/mod_dav_svn.so /usr/local/apache/modules/

      2.2 修改配置httpd.conf檔案

去掉注釋LoadModule dav_module modules/mod_dav.soLoadModule dav_fs_module modules/mod_dav_fs.so新加LoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.so檔案尾加上這個<Location /home/devtac/svn/case>    DAV svn    SVNPATH /home/devtac/svn/case</Location>

PS: 一定要檢查/usr/local/apache/modules/裡有沒有對應的.so 檔案


apache 配置到此結束

3 subversion 配置

3.1 匯出資產庫到apache web目錄下

svn checkout --username=admin --password=admin file:///home/devtac/svn/case/ /usr/local/apache/htdocs/


3.2 修改hook檔案

[[email protected] modules]# cd /home/devtac/svn/case/hooks/[[email protected] hooks]# pwd/home/devtac/svn/case/hooks[[email protected] hooks]# ll總用量 40-rwxrwxrwx 1 root root 2215 8月   6 10:32 post-commit-rw-r--r-- 1 root root 1977 8月   5 16:36 post-commit.tmpl-rw-r--r-- 1 root root 1638 8月   5 16:36 post-lock.tmpl-rw-r--r-- 1 root root 2289 8月   5 16:36 post-revprop-change.tmpl-rw-r--r-- 1 root root 1567 8月   5 16:36 post-unlock.tmpl-rw-r--r-- 1 root root 3426 8月   5 16:36 pre-commit.tmpl-rw-r--r-- 1 root root 2410 8月   5 16:36 pre-lock.tmpl-rw-r--r-- 1 root root 2786 8月   5 16:36 pre-revprop-change.tmpl-rw-r--r-- 1 root root 2100 8月   5 16:36 pre-unlock.tmpl-rw-r--r-- 1 root root 2780 8月   5 16:36 start-commit.tmplcp post-commit.tmpl post-commitpost-commit 檔案尾加上SVN=/usr/local/subversion/bin/svn             #svn command directoryWEB=/usr/local/apache/htdocs                  #apache htdoc directory$SVN update --username admin --password admin $WEB檔案修改結束賦予執行許可權chmod 777 post-commit

svn 配置修改完畢

3.2 執行post-commit 報錯

svn: E155036: Please see the ‘svn upgrade‘ command
svn: E155036: The working copy at ‘E:\we‘
is too old (format 10) to work with client version ‘1.8.9 (r1591380)‘ (expects f
ormat 31). You need to upgrade the working copy first.

方法:

[root@localhost hooks]# cd /usr/local/apache/htdocs/

[root@localhost htdocs]# /usr/local/subversion/bin/svn upgrade


然後在執行 post-commit 就好了

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.