小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

svn使用手記

 喜歡雨路的火焰狼 2006-11-06
第一,根據(jù)BLFS BOOK安裝好Subversion-1.1.4,配置選項用了
--prefix=/usr --with-apr=/usr --with-apr-util=/usr --with-apxs=/usr/sbin/apxs --with-ssl
編譯安裝很順利,但發(fā)現(xiàn)install后沒有所說的~/.subversion/config and /etc/subversion/config
什么的
第二,配制本地訪問的svn
完全按照BOOK來的,啟動也是利用xinetd啟動
1,建立svn組何用戶,建立svntest組,把svn用戶置入svstest組
groupadd -g 56 svn &&
useradd -c "SVN Owner" -d /home/svn -m -g svn -s /bin/false -u 56 svn
groupadd -g 57 svntest &&
usermod -G svntest svn
設置用svn何svnserve的時候的mask為022
mv /usr/bin/svn /usr/bin/svn.orig &&
mv /usr/bin/svnserve /usr/bin/svnserve.orig &&
cat >> /usr/bin/svn << "EOF"
#!/bin/sh
umask 002
/usr/bin/svn.orig "$@"
EOF
cat >> /usr/bin/svnserve << "EOF"
#!/bin/sh
umask 002
/usr/bin/svnserve.orig "$@"
EOF
chmod 0755 /usr/bin/svn{,serve}
2,創(chuàng)建倉庫
install -d -m0755 /srv &&
install -d -m0755 -o svn -g svn /srv/svn/repositories &&
svnadmin create --fs-type fsfs /srv/svn/repositories/svntest
然后我在我的/usr/local下通過mkdir建立一下目錄結(jié)構(gòu)
svntest/ # The name of the repository
    trunk/ # Contains the existing source tree
        BOOK/
        bootscripts/
        edguide/
        patches/
        scripts/
    branches/ # Needed for additional branches
    tags/ # Needed for tagging release points
再初始畫導入
svn import -m "Ininial import." /usr/local/svntest file:///srv/svn/repositories/svntest
再把倉庫的屬主信息改成svn:svntest的
chown -R svn:svntest /srv/svn/repositories/svntest &&
chmod -R g+w /srv/svn/repositories/svntest &&
chmod g+s /srv/svn/repositories/svntest/db &&
usermod -G svn,svntest,[insert existing groups] [username]
其中還可以添加其他沒有特權(quán)的但也想讓其分享倉庫的用戶和組,
然后就可以通過以下命令查看svn的倉庫了
svnlook tree /srv/svn/repositories/svntest/
3,配制服務器
先備份該倉庫的服務器配置文件,在相應conf目錄下
cp /srv/svn/repositories/svntest/conf/svnserve.conf /srv/svn/repositories/svntest/conf/svnserve.conf.default
再建立svnserve.conf
cat > /srv/svn/repositories/svntest/conf/svnserve.conf << "EOF"
[general]
anon-access = read
auth-access = write
EOF
4,利用xinetd啟動svn服務器
只要在/etc/xinetd.d/下建立svn
cat >> /etc/xinetd.d/svn << "EOF"
# Begin /etc/xinetd.d/svn
service svn
{
port = 3690
socket_type = stream
protocol = tcp
wait = no
user = svn
server = /usr/bin/svnserve
server_args = -i -r /srv/svn/repositories
}
# End /etc/xinetd.d/svn
EOF
再重啟xinetd服務
/etc/rc.d/init.d/xinetd restart
另外我拷貝blfs啟動腳本中的svn到init.d目錄下

此時,隨便到哪個目錄下,運行
svn checkout file://localhost/srv/svn/repositories/svntest
就可以完全checkout 撿出svntest了

配置能用http訪問,及與apache整合
1,檢查Httpd.conf中已經(jīng)有了
LoadModule dav_svn_module     lib/apache/mod_dav_svn.so
LoadModule authz_svn_module   lib/apache/mod_authz_svn.so
2,匿名訪問的配置,同樣是在Httpd.conf中添加
<Location /svn>
    DAV svn
    SVNPath /srv/svn/repositories/svntest
</Location>
信息,這樣就可以通過http://192.168.0.3/svn/訪問,測試通過,:)
另外當有多個倉庫時,httpd.conf中可以通過設置 SVNParentPath 值設置
3,通過htpasswd的方式來進行用戶訪問的驗證,添加兩個用戶,放在/etc/svn-auth-file 文件中
htpasswd -c /etc/svn-auth-file harry
htpasswd /etc/svn-auth-file sally
再在剛才的httpd.conf的Location信息中添加認證信息,如下
<Location /svn>
    DAV svn
    SVNPath /srv/svn/repositories/svntest
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /etc/svn-auth-file
    Require valid-user
</Location>
測試成功,:)
另外,我通過終端里
svn checkout http://localhost/svn
先輸入root的命令,在輸入用戶名密碼,也可以checkout,這里為什么要輸入root的密碼了?我還是很多不懂啊

http://www.ahfyzs.com/showWeb/0/0/200256.aspx文章提到了倉庫中conf目錄下的authz和passwd文件的詳細含義和用法,很不錯,只是我不怎么好試驗

06-11-05:
想試驗讓我的DAV svn通過學校的ldap服務器認證,檢查了一下我的配置和club的配置,我的沒有Load進來mod_auth_ldap.so,我檢查我的沒有安裝這個模塊,
通過scp從club上拷貝回來,但還是不行,提示找不到libexpat.so.1,看來要讓apache支持得重新編譯apache才行。
查看了apache2.2的中文手冊,原來此模塊必須在2.1后的版本才支持,我的才2.0.54,差那么一點點哦





     



 

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多