您好,登錄后才能下訂單哦!
#!/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)聽(tīng) 默認(rèn)3690端口 svnserve -d -r /home/svndata #創(chuàng)建svn倉(cāng)庫(kù) 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)站根目錄---自動(dò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
知識(shí)點(diǎn)補(bǔ)充:下面看下linux shell 腳本 svn自動(dòng)更新項(xiàng)目并且打包 、發(fā)布、備份
這里先準(zhǔn)備一個(gè)配置文件,用于保存svn地址、目的路徑、用戶名跟密碼
配置文件名問(wèn):toolConfig.properties
#svn地址 svnAddress=https://192.168.1.253/【yourPath】 #本地路徑(目的地址) localDir=E:\shelltest #svn用戶名 userName=jack #svn密碼 password=123456
對(duì)應(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腳本請(qǐng)關(guān)注億速云其它相關(guān)文章!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。