当前位置: 首页 > news >正文

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

http://www.lryc.cn/news/412332.html

相关文章:

  • C语言| 文件操作详解(二)
  • 保证项目如期上线,测试人能做些什么?
  • 【杂谈】在大学如何学得计算机知识,浅谈大一经验总结
  • Superset二次开发之柱状图实现同时显示百分比、原始值、汇总值的功能
  • 堆的创建和说明
  • 【玩转python】入门篇day14-函数
  • uni-app 将base64图片转换成临时地址
  • C#用Socket实现TCP客户端
  • jmeter-beanshell学习15-输入日期,计算前后几天的日期
  • Zabbix 7.0 安装
  • 软考高级-系统架构设计师
  • Notepad++ 安装 compare 插件
  • 大数据技术原理-spark的安装
  • 第四范式上线搜广推一体化平台 赋能企业高效增长
  • 智能小程序 Ray 开发面板 SDK —— 智能设备模型通用能力一键执行 SDK 汇总(一)
  • 特大喜讯:我的作品被河北某大学选做教材
  • 将时间用于符合当下的未来思考——读《纳瓦尔宝典》
  • CentOS-Stream-9仿冒Rocky-9通过Kolla-ansible部署OpenStack 2024.1
  • Python机器学习实战:分类算法之支持向量机-垃圾邮件识别
  • 秒懂Linux之自动化构建工具-make/Makefile
  • .net core + vue 搭建前后端分离的框架
  • 小阿轩yx-KVM+GFS 分布式存储系统构建 KVM 高可用
  • centos安装mysql 5.7版本
  • SQL——查询sql执行顺序
  • 钉耙编程(3)
  • python 线程池处理文件
  • AI技术和大模型对人才市场的影响
  • 解释“location”和“position”
  • Netty 必知必会(三)—— ByteBuf
  • 芋道以开源之名行下作之事 恬不知耻 标榜自己开源 公开源码+sql 不用再加入知识星球