服務(wù)器
#!/bin/bash
#下載svn
yum -y install subversion
#阿里云oss資料
wget -P /root http://wap.friendlycc.com.cn/host/
#解壓資料文件
unzip ziliao.zip
#新建svndata目錄
mkdir /home/svndata
#svn服務(wù)器監聽(tīng) 默認3690端口
svnserve -d -r /home/svndata
#創(chuàng )建svn倉庫
svnadmin create /home/svndata/www
#復制資料到相應位置
\\cp /root/ziliao/passwd.txt /home/svndata/www/conf/passwd
\\cp /root/ziliao/svnserve.txt /home/svndata/www/conf/svnserve.conf
\\cp /root/ziliao/post-commit.txt /home/svndata/www/hooks/post-commit
#鉤子文件可執行
chmod x /home/svndata/www/hooks/post-commit
cd /home/svndata/www/
#檢出svn到本地及到網(wǎng)站根目錄---自動(dòng)化--免輸入密碼
svn co svnhttp://wap.friendlycc.com.cn/host/ --username svn1113 --password svn123 --no-auth-cache
svn co svnhttp://wap.friendlycc.com.cn/host/ /home/wwwroot/www --username svn1113 --password svn123 --no-auth-cache
#創(chuàng )建用戶(hù)及用戶(hù)組
groupadd www
useradd -g www www
#設置網(wǎng)站目錄所屬權限
chown -R www:www /home/wwwroot/www
知識點(diǎn)補充:下面看下linux shell 腳本 svn自動(dòng)更新項目并且打包 、發(fā)布、備份
這里先準備一個(gè)配置文件,用于保存svn地址、目的路徑、用戶(hù)名跟密碼
配置文件名問(wèn):toolConfig.properties
#svn地址 svnAddress=http://wap.friendlycc.com.cn/host/ #本地路徑(目的地址) localDir=E:\\shelltest #svn用戶(hù)名 userName=jack #svn密碼 password=123456
對應shell腳本
#!/bin/bash source ./toolConfig.properties svn_ip=${svnAddress} local_path=${localDir} u_name=${userName} p_wd=${password} svn co ${svn_ip} ${local_path} --username ${u_name} --password ${p_wd}
總結
以上就是在linxu下Svn一鍵安裝shell腳本的詳細內容,更多關(guān)于linux 一鍵安裝shell腳本請關(guān)注特網(wǎng)科技其它相關(guān)文章!
更多關(guān)于云服務(wù)器,域名注冊,虛擬主機的問(wèn)題,請訪(fǎng)問(wèn)特網(wǎng)科技官網(wǎng):wap.friendlycc.com.cn
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自本網(wǎng)站內容采集于網(wǎng)絡(luò )互聯(lián)網(wǎng)轉載等其它媒體和分享為主,內容觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如侵犯了原作者的版權,請告知一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容,聯(lián)系我們QQ:712375056,同時(shí)歡迎投稿傳遞力量。
Copyright ? 2009-2022 56dr.com. All Rights Reserved. 特網(wǎng)科技 特網(wǎng)云 版權所有 特網(wǎng)科技 粵ICP備16109289號
域名注冊服務(wù)機構:阿里云計算有限公司(萬(wàn)網(wǎng)) 域名服務(wù)機構:煙臺帝思普網(wǎng)絡(luò )科技有限公司(DNSPod) CDN服務(wù):阿里云計算有限公司 百度云 中國互聯(lián)網(wǎng)舉報中心 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證B2
建議您使用Chrome、Firefox、Edge、IE10及以上版本和360等主流瀏覽器瀏覽本網(wǎng)站