詳解在linxu下Svn一鍵安裝shell腳本
發(fā)布日期:2022-02-10 08:32 | 文章來源:源碼中國
#!/bin/bash #下載svn yum -y install subversion #阿里云oss資料 wget -P /root https://babyrita.oss-cn-beijing.aliyuncs.com/lnmp/quyeweb/ziliao.zip #解壓資料文件 unzip ziliao.zip #新建svndata目錄 mkdir /home/svndata #svn服務(wù)器監(jiān)聽 默認(rèn)3690端口 svnserve -d -r /home/svndata #創(chuàng)建svn倉庫 svnadmin create /home/svndata/www #復(fù)制資料到相應(yīng)位置 \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 #鉤子文件可執(zhí)行 chmod +x /home/svndata/www/hooks/post-commit cd /home/svndata/www/ #檢出svn到本地及到網(wǎng)站根目錄---自動化--免輸入密碼 svn co svn://127.0.0.1/www --username svn1113 --password svn123 --no-auth-cache svn co svn://127.0.0.1/www /home/wwwroot/www --username svn1113 --password svn123 --no-auth-cache #創(chuàng)建用戶及用戶組 groupadd www useradd -g www www #設(shè)置網(wǎng)站目錄所屬權(quán)限 chown -R www:www /home/wwwroot/www
知識點(diǎn)補(bǔ)充:下面看下linux shell 腳本 svn自動更新項(xiàng)目并且打包 、發(fā)布、備份
這里先準(zhǔn)備一個(gè)配置文件,用于保存svn地址、目的路徑、用戶名跟密碼
配置文件名問:toolConfig.properties
#svn地址 svnAddress=https://192.168.1.253/【yourPath】 #本地路徑(目的地址) localDir=E:\shelltest #svn用戶名 userName=jack #svn密碼 password=123456
對應(yīng)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}
總結(jié)
以上就是在linxu下Svn一鍵安裝shell腳本的詳細(xì)內(nèi)容,更多關(guān)于linux 一鍵安裝shell腳本請關(guān)注本站其它相關(guān)文章!
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。
相關(guān)文章
關(guān)注官方微信