CentOS 6.5 Apache+SVN配置

來源:互聯網
上載者:User

標籤:http   io   ar   os   sp   檔案   on   art   bs   

yum -y install subversion #安裝SVN 
svnserve -- version #查看svn版本資訊確定是否安裝
yum -y install httpd #安裝Apache 
yum -y install mod_dav_svn #安裝Apache的SVN支援
mkdir -p /var/www/svn #建立SVN目錄 
svnadmin create /var/www/svn/repos #建立repos版本庫
 
htpasswd -c /etc/httpd/conf.d/passwd.dav_svn admin #建立使用者密碼檔案並添加使用者

vi /etc/httpd/conf.d/authz.dav_svn #編輯使用者權限配置  

[groups]    #許可權分組 manager=admin  
[/]    #根目錄 
@manager=rw    #manager組有讀寫權限  
[repos:/]   
#repos庫  *=r    #所有人都有讀取許可權   

vi /etc/httpd/conf.d/subversion.conf #編輯Apache的SVN配置  
<Location /svn>    
 DAV svn     
 SVNParentPath /var/www/svn    
 AuthType Basic     
 AuthName "Subversion repository"     
 AuthUserFile /etc/httpd/conf.d/passwd.dav_svn     
 AuthzSVNAccessFile /etc/httpd/conf.d/authz.dav_svn
 Require valid-user
</Location>  
ServerName localhost:80 #取消注釋,否則Apache啟動有警告   
chown -R apache.apache /var/www/svn/repos #配置Apache對版本庫的存取權限
iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT #防火牆開啟80連接埠
/etc/init.d/iptables save #拷貝防火牆規則儲存 
chcon -R -t httpd_sys_content_t /var/www/svn/repos #添加Apache對版本庫目錄的selinux安全性原則 
chkconfig httpd on  #系統啟動時Apache自動運行
service httpd start #啟動Apache

CentOS 6.5 Apache+SVN配置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.