位置: 编程技术 - 正文

CentOS 一键配置rsync服务器脚本(centos配置yum)

编辑:rootadmin
1、保存下面的代码为一个文件,上传到服务器端,名称为rsync.sh 复制代码代码如下: #!/bin/bash #rsync Written by zhumaohai #For more information please visit echo "Please input the rsync username:" read username echo "Please input the rsync username password:" read password echo "Please input the server ip address:" read serverip echo "Please input the allow ip address:" read allowip echo "Please input the path you want to rsync:" read rsyncpath echo "==========================input all completed========================" echo "==========================install rsync========================" yum -y install rsync useradd $username mkdir /etc/rsyncd cat >/etc/rsyncd/rsyncd.conf<<eof # Minimal configuration file for rsync daemon # See rsync(1) and rsyncd.conf(5) man pages for help # This line is required by the /etc/init.d/rsyncd script pid file = /var/run/rsyncd.pid port = address = $serverip #uid = nobody #gid = nobody uid = root gid = root use chroot = yes read only = yes #limit access to private LANs hosts allow=..1.0/...0 .0.1.0/...0 $allowip hosts deny=* max connections = 5 motd file = /etc/rsyncd/rsyncd.motd #This will give you a separate log file #log file = /var/log/rsync.log #This will log every file transferred - up to ,+ per user, per sync #transfer logging = yes log format = %t %a %m %f %b syslog facility = local3 timeout = [$username home] path = $rsyncpath list=yes ignore errors auth users = $username secrets file = /etc/rsyncd/rsyncd.secrets eof echo "$username:$password" > /etc/rsyncd/rsyncd.secrets chmod /etc/rsyncd/rsyncd.secrets cat >/etc/rsyncd/rsyncd.motd<<eof +++++++++++++++++++++++++++ + centos.bz rsync - + +++++++++++++++++++++++++++ eof /usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf ps -aux | grep rsync 2、赋予脚本权限 复制代码代码如下: chmod +x rsync.sh 3、执行脚本 复制代码代码如下: ./rsync.sh 4、客户端同样需要安装rsync

推荐整理分享CentOS 一键配置rsync服务器脚本(centos配置yum),希望有所帮助,仅作参考,欢迎阅读内容。

CentOS 一键配置rsync服务器脚本(centos配置yum)

文章相关热门搜索词:centos怎么编辑配置文件,centos配置命令,centos配置kdump,centos配置命令,centos配置rsyslog,centos配置命令,centos配置命令,centos怎么配置ssh,内容如对您有帮助,希望把文章链接给更多的朋友!

Unix/Linux 命令参考 linux命令在系统中有两种类型:内置Shell命令和Linux命令。首先介绍一个名词控制台(console),它就是我们通常见到的使用字符操作界面的人机接口,例

CentOS中将DVD作为默认yum源的设置方法 其实对于CentOSDVD来说,里面提供的软件就足以满足我们的需要了,而且DVD里的软件版本都是稳定版,下载速度还快,对于学习CentOS来说,将CentOSDVD作为

pptp及l2tp安装教程篇一安装pptp方法 该篇文章是安装pptp,下一篇将写安装l2tp。这实际是是根据记忆写的,可能在步骤或配置上会有遗漏,争取下次用虚拟机自己动手安装来试试,如有错误

标签: centos配置yum

本文链接地址:https://www.jiuchutong.com/biancheng/357274.html 转载请保留说明!

上一篇:rsync服务器架设(数据同步|文件增量备份)(rsync服务端配置)

下一篇:Unix/Linux 命令参考 (unix命令大全)

  • 个人独资企业要注意什么
  • 个人所得税申报操作流程
  • 土增清算尾盘销售
  • 企业年金是否缴税
  • 保险公司收车船使用税吗
  • 卷票发票校验码在哪里
  • 农业生产者销售自产农产品按9%的税率征收增值税
  • 免税商品进项增值税发票怎么做账
  • 公司代收代付会被监控吗
  • 商品周转天数和周转率
  • 固定资产机器设备使用年限
  • 当月开票一定要当月入账吗
  • 预收账款可以开票吗
  • 公司活动服装费会计分录
  • 1697510728
  • 应收账款无法收回确认为坏账分录
  • 苹果手机怎么看国行还是美版
  • 增值税发票遗失证明模板
  • 应交增值税有哪些
  • 生产用厂房计入什么科目
  • mac连不上wifi怎么回事 其他设备却可以
  • 腾讯电脑管家病毒库更新
  • window10自带商店下载位置
  • php中字符串函数
  • 代开房租的税点计入什么科目?
  • 房地产行业预售制度
  • 个体户变更为有限公司成立时间
  • 微信小程序前端源码
  • 企业银行贷款利率2023
  • vue方法顺序执行
  • php获取上个月第一天
  • 利用python自动填问卷
  • vue有哪些方法
  • High-resolution image reconstruction with latent diffusion models from human brain activity
  • mysql php
  • java 通配符
  • 税收优惠与政府补助对于企业研发来说哪个优惠力度大
  • 技术服务费发票图片
  • 对公账户名称可以是个人名字吗
  • 虚开普票的立案标准
  • 餐饮发票要钱吗
  • 企业按行业划分可划分为哪些
  • 完税证明可以直接做账吗
  • 新准则经营租赁 提折旧
  • 一般纳税人未申报可以开票吗
  • 固定资产未登记入账
  • 土地使用权的界定
  • 短期借款的核算
  • 中小企业投标费怎么算
  • 社保退休金计算方法
  • 股权转让的实质
  • 刷信用卡的手续费一般是多少
  • 小型微利企业年报填什么表
  • 零售行业涉及到什么专业
  • 新会计准则经营租赁
  • 待转销项税额对应科目
  • 松散索引和紧凑索引
  • centos下安装虚拟机
  • 搭建docker私有仓库实验报告
  • win7的查看方式
  • mac win10 wifi
  • GHOST XP 安装教程
  • win8怎么快速开机
  • Win7系统怎么打开蓝牙
  • linux 如何
  • android app架构设计
  • drawcalls2000多
  • javascript闭包优缺点
  • android:View的setTag和getTag使用
  • java调用curl命令
  • Https联网工具类
  • css分页样式
  • Node.js中的全局对象有
  • unity克隆物体
  • js浏览器运行机制
  • python文件处理方法
  • jquery-easyui-1.3.3
  • jquery插件开发方法
  • 所得税调增调减搞不清
  • 个人所得税优惠政策最新2023年度
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设