[筆記]Centos7 安裝subversion

參考:
CentOS7使用firewalld打開關閉防火牆與端口: https://www.cnblogs.com/moxiaoan/p/5683743.html
Centos7安裝配置SVN服務並設置開機自啓動: https://blog.csdn.net/NDF923/article/details/74171867?fps=1&locationNum=9
centOS7下SVN的安裝和使用: https://blog.csdn.net/u010071211/article/details/79877303
CentOS7.2 安裝Subversion(SVN): https://blog.csdn.net/wh211212/article/details/53128805

曾嘗試源碼安裝svn最終失敗,所以改爲yum方式安裝,但是源碼安裝需要的相關資源還是保留了下來,後面會附上.


[root@xxxxx ~]# yum -y install subversion  
[root@xxxxx ~]# whereis subversion            
subversion: /etc/subversion
[root@xxxxx ~]# whereis svn
svn: /usr/bin/svn /usr/share/man/man1/svn.1.gz
[root@xxxxx ~]# svnserve --version
[root@xxxxx ~]# mkdir /opt/svn1.7
[root@xxxxx ~]# mkdir /opt/svn1.7/data
[root@xxxxx ~]# vim /etc/sysconfig/svnserve #將默認目錄指定到 OPTIONS="-r /var/svn" 改爲 OPTIONS="-r /opt/svn1.7/data/"
[root@xxxxx ~]# cd  /opt/svn1.7/data/
[root@xxxxx data]# mkdir -p /opt/svn1.7/data/repository #遞歸創建多個目錄
[root@xxxxx data]# svnadmin create  /opt/svn1.7/data/repository
[root@xxxxx data]# cd /opt/svn1.7/data/repository              
[root@xxxxx repository]# vi conf/passwd 
[users]
user1=user1

[root@xxxxx repository]# vi conf/authz 
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
admin = user1

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]
@admin=rw
* =      # *號表示除admin組的其他人,=後爲空表示無任何權限


[root@xxxxx repository]# vi conf/svnserve.conf 
anon-access = none
auth-access = read/write
password-db = passwd #使用哪個文件作爲賬號文件
authz-db = authz #使用哪個文件作爲權限文件
# realm =/opt/svn1.7/data/ # 認證空間名,版本庫所在目錄

[root@xxxxx repository]# systemctl is-enabled svnserve.service
disabled
[root@xxxxx repository]# systemctl enable svnserve.service
Created symlink from /etc/systemd/system/multi-user.target.wants/svnserve.service to /usr/lib/systemd/system/svnserve.service.
[root@xxxxx repository]# systemctl is-enabled svnserve.service
enabled
[root@xxxxx repository]# systemctl start svnserve.service
[root@xxxxx repository]# netstat -lntup
[root@xxxxx repository]# svn mkdir file:///opt/svn1.7/data/repository/trunk -m "初始化"
[root@xxxxx repository]# svn mkdir file:///opt/svn1.7/data/repository/branches -m "初始化"
[root@xxxxx repository]# svn mkdir file:///opt/svn1.7/data/repository/tags -m "初始化"
[root@xxxxx repository]# shutdown -r now

源碼安裝svn相關資源: 鏈接:https://pan.baidu.com/s/1V1lZZb6nj-Jo-AZWQ8wikw  提取碼:g1bp 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章