shell脚本自动化部署

1、自动化部署DNS

[root@web ~]# vim dns.sh

[root@tomcat ~]# yum -y install bind-utils

[root@tomcat ~]# echo "nameserver 192.168.8.132" > /etc/resolv.conf
[root@tomcat ~]# nslookup www.a.com

2、自动化部署rsync

[root@web ~]# vim rsync.sh


[root@web ~]# bash rsync.sh

[root@tomcat ~]# rm -rf /tmp/*
[root@tomcat ~]# ls /tmp/
[root@web ~]#  touch /root/rsync/file2
[root@tomcat ~]#  ls /tmp/

3、自动化配置FTP

[root@web ~]# vim ftp.sh

[root@web ~]# bash ftp.sh

[root@tomcat ~]# yum -y install ftp
[root@tomcat ~]# ftp 192.168.8.128
[root@tomcat ~]# kehu

4、自动化部署frp

 [root@web ~]# vim frp.sh

[root@web ~]# bash frp.sh

[root@tomcat ~]# vim frp.sh

[root@tomcat ~]# bash frp.sh

5、自动化部署samba

[root@web ~]# vim samba.sh

[root@web ~]# bash samba.sh

[root@tomcat ~]# yum -y install samba-client
[root@tomcat ~]#  smbclient //192.168.8.128/smb_share -U user01

6、自动化配置yum仓库初始化(包括阿里云和epel)

 [root@web ~]# vim yum.sh

[root@web ~]# bash yum.sh

7、自动化部署nfs

 [root@web ~]# vim nfs.sh

[root@web ~]# bash nfs.sh

[root@tomcat ~]# yum -y install nfs-utils.x86_64
[root@tomcat ~]# mkdir /nfs

[root@tomcat ~]# mount -t nfs 192.168.8.128:/nfsshare /nfs
[root@tomcat ~]# ls /nfs

8、自动化部署ntp

[root@web ~]# vim ntp.sh

[root@web ~]# bash ntp.sh

[root@tomcat ~]# date
[root@tomcat ~]#  date -s "2014-08-1 00:00"
[root@tomcat ~]#  ntpdate 192.168.8.136
[root@tomcat ~]#  date

  • 7
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值