CentOS 6.3 Subversion + Usvn 搭建版本管理伺服器

來源:互聯網
上載者:User

標籤:style   blog   http   color   io   os   ar   使用   for   

一. Subversion 簡介 
Subversion是一個自由,開源的版本控制系統。在Subversion管理下,檔案和目錄可以超越時空。Subversion將檔案存放在中心版本庫裡。這個版本庫很像一個普通的檔案伺服器,不同的是,它可以記錄每一次檔案和目錄的修改情況。這樣就可以籍此將資料恢複到以前的版本,並可以查看資料的更改細節。正因為如此,許多人將版本控制系統當作一種神奇的“時間機器”。 
二. 環境準備 
用1台cent os 6.3。 

[[email protected] ~]# uname -a
Linux yxp2p.server 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

[[email protected] ~]# vim /etc/selinux/config    

設定SELINUX=disabledt重啟後關閉selinux 。

[[email protected]  ~]# setenforce 0
setenforce: SELinux is disabled

查看是否關閉了selinux。

 

三、安裝

1. 安裝所需軟體 
[[email protected] ~]# yum install subversion httpd mod_dav_svn php php-mysql mysql-server perl-DBI perl-DBD-mysql mysql-devel mod_auth_mysql 

查看 subversion 是否安裝成功,如:

2.啟動httpd、mysqld服務

[[email protected] ~]# service httpd start
Starting httpd: httpd: Could not reliably determine the server‘s fully qualified domain name, using yxp2p.server for ServerName
[ OK ]
[[email protected] ~]# service mysqld start
Starting mysqld: [ OK ]

 

啟動後設定mysqld密碼,後面安裝usvn時需要用

[[email protected] ~]# mysqladmin -u root password 123123

 

3. 配置開機啟動 

[[email protected] ~]# chkconfig svnserve on  設定svn服務隨機啟動。

 

四.配置Usvn

[[email protected] ~]# wget https://github.com/usvn/usvn/archive/1.0.7.tar.gz

[[email protected] ~]# tar zxvf 1.0.7 

[[email protected] ~]# mv usvn-1.0.7/ /home/webroot/usvn  

[[email protected] ~]# chown -R apache:apache /home/webroot/usvn 

[[email protected] ~]# vim  /etc/httpd/conf/httpd.conf 

Alias /usvn "/home/webroot/usvn/public"   
<Directory "/home/webroot/usvn/public">     

  Options +SymLinksIfOwnerMatch     

  AllowOverride All     

  Order allow,deny     

  Allow from all 

</Directory>

配置完後重啟httpd 
[[email protected] ~]# service httpd restart 
通過IE開啟http://172.16.11.89/usvn/就可以按步驟一步步完成,此時如果打不開,請檢查你的iptables、selinux是否有限制。

 

出現上面的提示,嘗試關閉SElinux看能否解決。

 

 

訪問正常將會出現下面介面。

 

第四步如果使用預設值不行,請做調整

 

 
改為以下路徑則可以順利進入下一步

 

我本地的的倉庫地址是 /home/subversion, 注意設定目錄許可權

[[email protected] ~]# mkdir -p /home/subversion

[[email protected] ~]# chown -R apache:apache /home/subversion

 

 

 
改為以下路徑則可以順利進入下一步 
填入上面建立的mysqld使用者名稱和密碼,勾選“建立資料庫”,此處如果你沒有安裝php-pdo則會報錯

 

建立一個帳號用於登陸管理usvn

 

 

 

複製下面的代碼到/etc/httpd/conf/httpd.conf裡

 

[[email protected] usvn]# vim /etc/httpd/conf/httpd.conf

 

點上面的“串連到USVN”登陸

 

至此整個subversion及USVN搭建完成。需要用USVN測試建立使用者、使用者組、項目是否正常。

 

參考連結:

http://wenku.baidu.com/link?url=yKLV9Z1UyA3SCZqcZkDM0miWl5LWLgEJvOh_cY-iPQRIOP23sWg2sNgP_2-is2h_jeGyQfKYE0YSOL8ZMnf-ZlsQzGg-wISVWsU3FynUKwi

http://wiki.ubuntu.org.cn/index.php?title=SubVersion

http://wenku.baidu.com/view/b98a62cb4693daef5ef73d5d.html?re=view

http://zhumeng8337797.blog.163.com/blog/static/1007689142011341202582/

http://wuyaweiwude.iteye.com/blog/1915064

http://www.jb51.net/os/RedHat/73031.html

http://www.linuxidc.com/Linux/2011-05/35626.htm

CentOS 6.3 Subversion + Usvn 搭建版本管理伺服器

相關文章

聯繫我們

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