上一页 1 ··· 15 16 17 18 19
摘要: #!/bin/bash! rpm -qa |grep -q net-tools > /dev/null && yum -y install net-tools path=/etc/sysconfig/network-scripts/ifcfg-$1 ip=`ifconfig $1 |grep ine 阅读全文
posted @ 2020-11-03 16:13 心恩惠动 阅读(85) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash yum -y install wget #更换阿里源 下载epel源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget -O /etc/yum.repos.d/ 阅读全文
posted @ 2020-11-03 16:02 心恩惠动 阅读(83) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash # chkconfig: 2345 99 99 prot=80 nginx=/usr/local/nginx/sbin/nginx check(){ ! $nginx -tq && echo "致命错误:配置文件错误" && exit } start(){ check net 阅读全文
posted @ 2020-11-02 20:53 心恩惠动 阅读(106) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash for i in {100..999};do a=${i:0:1} #截取出百位 b=${i:1:1} #截取出十位 c=${i:2} #截取出个位 num=$[$a**3+$b**3+$c**3] [ $num -eq $i ] && echo "水仙花数为:$i" don 阅读全文
posted @ 2020-11-02 20:26 心恩惠动 阅读(44) 评论(0) 推荐(0) 编辑
摘要: #!/binbash ! rpm -qa |grep expect &> /dev/null && yum -y install expect #判断是否已下载expect 若没有则下载该服务if [ ! -e /root/.ssh/id_rsa.pub ];then #判断公钥是否已存在 没有则生 阅读全文
posted @ 2020-11-02 20:09 心恩惠动 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash iso=/iso/CentOS-7-x86_64-Minimal-1708.iso #本机镜像文件位置 centos=centos7.0 #操作系统版本 disk_path=/var/lib/libvirt/images #虚拟磁盘文件存储路径 file_path=/etc/ 阅读全文
posted @ 2020-11-02 19:46 心恩惠动 阅读(226) 评论(0) 推荐(0) 编辑
摘要: - hosts: all tasks: - block: - name: 创建1000M的逻辑卷lv1 lvol: vg: vg0 lv: lv1 size: 1000 - name: 逻辑卷文件系统类型 filesystem: fstype: xfs dev: /dev/vg0/lv1 rescu 阅读全文
posted @ 2020-11-02 15:41 心恩惠动 阅读(645) 评论(0) 推荐(0) 编辑
摘要: 问题描述:开机时显示进入紧急登录模式 提示你输入密码 如下图 这是由于异常关机引起的挂载问题 在censtos 7.4 版本中较常见 可以看到/etc/fstab 多了一行 只需这行注释或删掉 然后重启就可以了 阅读全文
posted @ 2020-10-31 16:34 心恩惠动 阅读(88) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19