用rsync创建自己的slackware资源库
时间:2007-03-14
来源:互联网
前言:
有多台slackware服务器?每次更新软件包都很不方便?升级安装slackware系统不方便?……
相信这些问题一定有人遇到过,做一个自己的slackware资源库,可以节约很多资源。动手吧:)
如果有疏漏的地方,请多指点,谢谢。
1.安装rsync软件包。
一般在安装系统的时候都直接把他装上,如果当初没有安装,可以在安装盘的slackware/n目录下找到它,upgradepkg --install-new rsync*.tgz,或者去http://rsync.samba.org/download.html下载它,自行编译安装。这里我们只用它的客户端功能,不用做服务端的配置,故到此OK了。
2.同步
RSYNC是一款强大的备份系统,它的具体功能和实现可以参阅有关资料。这里我只叙述如何用它来进行同步远程服务器上的slackware软件包到本地。
首先,写一个script,如下:
然后,就可以用它来同步。下面给一个参考命令:
#{path-to-the-script} -check 1> /dev/null 2>> [the-path-of-file-to-store-the-error-messages] && {path-to-the-script} -download 1> /dev/null 2>> [the-path-of-file-to-store-the-error-messages]
OK了,等着它同步吧。当然,你也可以把它放到crontab里定时自动运行。
原文:
我的blog链接:http://blog.dotimes.com/2007/03/rsyn...epository.html
The end.
有多台slackware服务器?每次更新软件包都很不方便?升级安装slackware系统不方便?……
相信这些问题一定有人遇到过,做一个自己的slackware资源库,可以节约很多资源。动手吧:)
如果有疏漏的地方,请多指点,谢谢。
1.安装rsync软件包。
一般在安装系统的时候都直接把他装上,如果当初没有安装,可以在安装盘的slackware/n目录下找到它,upgradepkg --install-new rsync*.tgz,或者去http://rsync.samba.org/download.html下载它,自行编译安装。这里我们只用它的客户端功能,不用做服务端的配置,故到此OK了。
2.同步
RSYNC是一款强大的备份系统,它的具体功能和实现可以参阅有关资料。这里我只叙述如何用它来进行同步远程服务器上的slackware软件包到本地。
首先,写一个script,如下:
引用:
#!/bin/bash # Define a valid Slackware Linux Version. # NOTE: If you want to use Slackware Linux Current,set VERSION to 'current' (VERSION=current). VERSION=11.0 # Choose the faster one from the sites below and un-comment it. #SOURCE="rsync://rsync.slackware.at/slackware/slackware-$VERSION" #SOURCE="rsync://ftp.ntua.gr/pub/linux/slackware/slackware-$VERSION" #SOURCE="rsync://ftp.slackware.com/slackware/slackware-$VERSION" #SOURCE="rsync://alphageek.dyndns.org/slackware/slackware-$VERSION" #SOURCE="rsync://rsync.vbfx.com/slackware/slackware-$VERSION" #SOURCE="rsync://slackware.ipal.net/slackware-$VERSION" SOURCE="rsync://rsync.transamrit.net/slackware/slackware-$VERSION" #SOURCE="rsync://slackware.mirrors.tds.net/slackware/slackware-$VERSION" #SOURCE="rsync://closeedge.net/slackware/slackware-$VERSION" #SOURCE="rsync://alphageek.dyndns.org/slackware/slackware-$VERSION" #SOURCE="rsync://rsync.unspunproductions.com:8730/slackware/slackware-$VERSION" #SOURCE="rsync://inferno.vbi.vt.edu/slackware/slackware-$VERSION" #SOURCE="rsync://ftp.linuxslackers.org/slackware/slackware-$VERSION" #SOURCE="rsync://rsync.unspunproductions.com:8730/slackware/slackware-$VERSION" #SOURCE="rsync://drazi.geo.uib.no/slackware/slackware-$VERSION" #SOURCE="rsync://carroll.cac.psu.edu/slackware/slackware-$VERSION" #SOURCE="rsync://inferno.bioinformatics.vt.edu/slackware/slackware-$VERSION" # What do the OPTIONS & EXCLUDE parameters below mean? Please check the RSYNC manpages for details.And you can also make your own definitions. OPTIONS="-avzH --delete --delete-before" EXCLUDE="--exclude=slackware/kde --exclude=slackware/kdei --exclude=slackware/x --exclude=slackware/xap --exclude=slackware/y --exclude=slackware/e --exclude=slackware/f --exclude=slackware/t --exclude=slackware/tcl --exclude=bootdisks --exclude=extra --exclude=testing --exclude=pasture --exclude=source --exclude=zipslack" # Here define the destination path where the repository to be stored. DEST="/home/mirror/slackware" case "$1" in "-check" ) echo "Checking..." /usr/bin/rsync $OPTIONS $EXCLUDE --dry-run $SOURCE $DEST ;; "-download" ) echo "Downloading..." /usr/bin/rsync $OPTIONS $EXCLUDE $SOURCE $DEST ;; * ) echo "Usage: `basename $0` {-c|-d}" echo -e "\t-check : To check for updates" echo -e "\t-download : To download updates" exit ;; esac |
#{path-to-the-script} -check 1> /dev/null 2>> [the-path-of-file-to-store-the-error-messages] && {path-to-the-script} -download 1> /dev/null 2>> [the-path-of-file-to-store-the-error-messages]
OK了,等着它同步吧。当然,你也可以把它放到crontab里定时自动运行。
原文:
我的blog链接:http://blog.dotimes.com/2007/03/rsyn...epository.html
The end.
作者: Cherife 发布时间: 2007-03-14
这个脚本是不是不下载KDE等文件夹阿,
看到了这一段:
EXCLUDE="--exclude=slackware/kde --exclude=slackware/kdei --exclude=slackware/x --exclude=slackware/xap --exclude=slackware/y --exclude=slackware/e --exclude=slackware/f --exclude=slackware/t --exclude=slackware/tcl --exclude=bootdisks --exclude=extra --exclude=testing --exclude=pasture --exclude=source --exclude=zipslack"
看到了这一段:
EXCLUDE="--exclude=slackware/kde --exclude=slackware/kdei --exclude=slackware/x --exclude=slackware/xap --exclude=slackware/y --exclude=slackware/e --exclude=slackware/f --exclude=slackware/t --exclude=slackware/tcl --exclude=bootdisks --exclude=extra --exclude=testing --exclude=pasture --exclude=source --exclude=zipslack"
作者: ilxsh 发布时间: 2009-05-24
引用:
作者: ilxsh
这个脚本是不是不下载KDE等文件夹阿,
看到了这一段: EXCLUDE="--exclude=slackware/kde --exclude=slackware/kdei --exclude=slackware/x --exclude=slackware/xap --exclude=slackware/y --exclude=slackware/e --exclude=slackware/f --exclude=slackware/t --exclude=slackware/tcl --exclude=bootdisks --exclude=extra --exclude=testing --exclude=pasture --exclude=source --exclude=zipslack" |
作者: slackcode 发布时间: 2009-05-25
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28