日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SVN 创建仓库操作

發布時間:2025/3/15 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SVN 创建仓库操作 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

服務端安裝完成后

1.創建一個存放倉庫的文件夾(這里在home目錄創建)

#mkdir svnRepo #cd svnRepo/

創建一個倉庫 (寫全路徑)

# svnadmin create /root/svnRepo/test.com

?

?查看倉庫里面默認的文件結構

[root@wentao13 svnRepo]# cd test.com/ [root@wentao13 test.com]# ll total 8 drwxr-xr-x. 2 root root 54 Mar 29 08:59 conf //配目錄件 匿名讀寫,授權都要在這里修改 drwxr-sr-x. 6 root root 233 Mar 29 08:59 db //程序存放 -r--r--r--. 1 root root 2 Mar 29 08:59 format drwxr-xr-x. 2 root root 231 Mar 29 08:59 hooks //鉤子 實現一些高級功能 drwxr-xr-x. 2 root root 41 Mar 29 08:59 locks -rw-r--r--. 1 root root 229 Mar 29 08:59 README.txt [root@wentao13 test.com]#

?

?啟動倉庫(這里對整個大倉庫的啟動,也可以對項目倉庫啟動,也就是單庫和多庫的區別訪問方式也不同):?

[root@wentao13 svnRepo]# svnserve -d -r /root/svnRepo/

?

查看是否啟動:端口是3690

[root@wentao13 svnRepo]# netstat -nltp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN 12667/svnserve tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1118/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1913/master tcp6 0 0 :::3306 :::* LISTEN 1603/mysqld tcp6 0 0 :::22 :::* LISTEN 1118/sshd tcp6 0 0 ::1:25 :::* LISTEN 1913/master

?

?訪問(取得聯系,及git clone):

[root@wentao13 111]# svn checkout svn://localhost/test.com Checked out revision 0.

上面命令完成,本地已經把倉庫文件拉下來了,并創建了test.com

drwxr-xr-x. 3 root root 18 Mar 29 09:13 test.com [root@wentao13 111]# cd test.com/ [root@wentao13 test.com]# ll -a total 0 drwxr-xr-x. 3 root root 18 Mar 29 09:13 . drwxr-xr-x. 3 root root 22 Mar 29 09:13 .. drwxr-xr-x. 4 root root 75 Mar 29 09:13 .svn

?

?接下來,修改本地文件,提交:

1.加入提交隊列

[root@wentao13 test.com]# svn add 1.php A 1.php

2.提交svn庫里面

[root@wentao13 test.com]# svn commit -m "commit 1.php file" 1.php svn: E170001: Commit failed (details follow): svn: E170001: Authorization failed //權限驗證失敗

?

?一般這樣是可以提交成功的,之所以報錯,是因為svn服務器禁止匿名用戶提交文件.修改svn服務器配置文件即可 (修改下面scnserve.conf文件)

[root@wentao13 conf]# pwd /root/svnRepo/test.com/conf [root@wentao13 conf]# ll total 12 -rw-r--r--. 1 root root 1080 Mar 29 08:59 authz -rw-r--r--. 1 root root 309 Mar 29 08:59 passwd -rw-r--r--. 1 root root 3090 Mar 29 08:59 svnserve.conf [root@wentao13 conf]#

?

配置一個最簡單的 (所有匿名用戶都可以提交,之后再修改讓authz等)

vim svnserve.conf

# anon-access = read anon-access = write //添加一個 匿名用戶都可以提交 # auth-access = write

 

?2.現在提交就沒有報錯 :

[root@wentao13 test.com]# svn commit -m "commit 1.php file" 1.php Adding 1.php Transmitting file data . Committed revision 1.

?

?

現在你庫里面就有那個文件了 在:

?

[root@wentao13 0]# pwd /root/svnRepo/test.com/db/revprops/0 [root@wentao13 0]# ll total 8 -r--r--r--. 1 root root 50 Mar 29 08:59 0 -r--r--r--. 1 root root 85 Mar 29 09:27 1

?

?

總結提示提交就兩步:(之后會有圖形界面)

[root@wentao13 test.com]# svn add 1.php [root@wentao13 test.com]# svn commit -m "commit 1.php file" 1.php

?

?

?下一節介紹下,權限分配 ?解決沖突等

?

?

?

?

參考:http://www.runoob.com/svn/svn-start-mode.html

?

轉載于:https://www.cnblogs.com/fps2tao/p/8672394.html

總結

以上是生活随笔為你收集整理的SVN 创建仓库操作的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。