日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

svn文件同步到web服务器,即同步到网站根目录

發布時間:2025/3/20 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 svn文件同步到web服务器,即同步到网站根目录 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

進入到hooks目錄

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 [root@li538-34?default]#?cd?/opt/svn [root@li538-34?svn]#?ll total?4 drwxr-xr-x?6?root?root?4096?Feb?24?06:38?repos [root@li538-34?svn]#?cd?repos [root@li538-34?repos]#?ll total?24 drwxr-xr-x?2?root?root?4096?Feb?24?07:47?conf drwxr-sr-x?6?root?root?4096?Feb?24?08:01?db -r--r--r--?1?root?root????2?Feb?24?06:31?format drwxr-xr-x?2?root?root?4096?Feb?24?07:24?hooks drwxr-xr-x?2?root?root?4096?Feb?24?06:31?locks -rw-r--r--?1?root?root??229?Feb?24?06:31?README.txt [root@li538-34?repos]#?cd?hook -bash:?cd:?hook:?No?such?file?or?directory [root@li538-34?repos]#?cd?hooks [root@li538-34?hooks]#?ll total?40 -rwxrwxrwx?1?root?root??138?Feb?24?07:21?post-commit -rw-r--r--?1?root?root?1977?Feb?24?06:31?post-commit.tmpl -rw-r--r--?1?root?root?1638?Feb?24?06:31?post-lock.tmpl -rw-r--r--?1?root?root?2289?Feb?24?06:31?post-revprop-change.tmpl -rw-r--r--?1?root?root?1567?Feb?24?06:31?post-unlock.tmpl -rw-r--r--?1?root?root?3426?Feb?24?06:31?pre-commit.tmpl -rw-r--r--?1?root?root?2410?Feb?24?06:31?pre-lock.tmpl -rw-r--r--?1?root?root?2786?Feb?24?06:31?pre-revprop-change.tmpl -rw-r--r--?1?root?root?2100?Feb?24?06:31?pre-unlock.tmpl -rw-r--r--?1?root?root?2780?Feb?24?06:31?start-commit.tmpl [root@li538-34?hooks]#

正常情況下沒有post-commit 文件,我這里已經添加了。

post-commit 文件代碼

1 2 3 4 5 6 #!/bin/sh export?LANG=zh_CN.UTF-8 WEB=/home/wwwroot/default svn?update?$WEB?--username?ningyuqiao?--password?ningyuqiao?--no-auth-cache ~?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ~

包括網站根目錄,svn一個用戶名和密碼。

然后給post-commit 執行權限,我直接給了777。

然后進入網站根目錄

1 svn?checkout?svn://?ip?address???.???#輸入ip地址,然后注意后面有個.代表當前目錄

到此為止基本搞定,大家有問題給我留言。





? ? ? 本文轉自ning1022 51CTO博客,原文鏈接:http://blog.51cto.com/ning1022/1615070,如需轉載請自行聯系原作者




總結

以上是生活随笔為你收集整理的svn文件同步到web服务器,即同步到网站根目录的全部內容,希望文章能夠幫你解決所遇到的問題。

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