欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 时评 > shell脚本自动化部署

shell脚本自动化部署

2025/5/17 13:50:13 来源:https://blog.csdn.net/weixin_70751278/article/details/140855286  浏览:    关键词: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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词