mkdir /data服務器
yum -y install subversiontcp
mkdir /data/svndata 先建立一個文件夾svn
svnadmin create /data/svndata/llj 建立版本庫工具
cd /data/svndata/llj/conf 進入配置文件目錄,ls查看下測試
vi passwd 建立svn用戶(最下面一行就是我建立的用戶名/密碼)阿里雲
### This file is an example password file for svnserve. ### Its format is similar to that of svnserve.conf. As shown in the ### example below it contains one section labelled [users]. ### The name and password for each user follow, one account per line. [users] # harry = harryssecret # sally = sallyssecret liaolongjun = abc,123
vi authz 修改用戶權限rest
[groups] # harry_and_sally = harry,sally # harry_sally_and_joe = harry,sally,&joe admin = liaolongjun # [/foo/bar] # harry = rw # &joe = r # * = [/] admin = rw # [repository:/baz/fuz] # @harry_and_sally = rw # * = r @admin = rw
vi svnserve.conf svn參數配置(注意:前面不能有空格。使用 TortoiseSVN 工具鏈接時,會告訴你這個問題)code
anon-access = none auth-access = write password-db = passwd authz-db = authz
svnserve -d -r /data/svndataorm
本地SVN Checkoutblog
地址 svn://ip/llj llj是前面建立的版本庫
輸入上面添加的用戶名/密碼鏈接。
鏈接成功後,隨便建立一個文件,提交,測試下。若是沒問題,svn成功安裝完畢
ps -ef|grep svnserve
kill 1458(進程號)
導出:
svnadmin dump /data/svndata/llj > /data/svndata/llj.dump
導入:
先建立版本庫 svnadmin create /data/svndata/test
svnadmin load /data/svndata/test < /data/svndata/llj.dump
防火牆
vi /etc/sysconfig/iptables
添加一行
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT
從新啓動防火牆
/etc/init.d/iptables restart
查看端口是否放開
/etc/init.d/iptables status