centos 7 Network 脚本】的更多相关文章

#!/bin/sh #主动启动网卡 interface=$() ifup $interface #获取当前网络信息 default_route=$(ip route show) default_interface=$() address=$(ip addr show label $default_interface scope global | awk '$1 == "inet" { print $2,$4}') ip=$(echo $address | awk '{print $1…
centos一键优化脚本:细节:http://oldboy.blog.51cto.com/2561410/1336488网络状态优化:http://oldboy.blog.51cto.com/2561410/1184228定时任务优化:http://oldboy.blog.51cto.com/2561410/1216730一键脚本:较简单: http://mofansheng.blog.51cto.com/8792265/1710247      http://www.chocolee.cn/a…
转载自http://www.2cto.com/os/201306/220559.html   我的一个Centos开机自启动脚本的制作   一.切换到/etc/init.d/   二.制作sh脚本 vi andy.sh [plain]  #!/bin/sh      #add for chkconfig   #chkconfig: 2345 70 30   #description: the description of the shell   #关于脚本的简短描述   #processname…
原文地址:http://www.2cto.com/os/201306/220559.html 我的一个Centos开机自启动脚本的制作   一.切换到/etc/init.d/   二.制作sh脚本 vi andy.sh [plain]  #!/bin/sh      #add for chkconfig   #chkconfig: 2345 70 30   #description: the description of the shell   #关于脚本的简短描述   #processname…
#!/bin/bash # 时间: 2018-11-21 # 作者: HuYuan # 描述: CentOS 7 初始化脚本 # 加载配置文件 if [ -n "${1}" ];then /bin/sh ${1} fi # 可接受配置(shell 变量格式) # INIT_HOSTNAME 主机名, 默认为 localhost # INIT_NTPSERVER ntp 服务器, 默认为 ntp1.aliyun.com # INIT_DNS1 dns 服务器 # INIT_DNS2 #…
IDC小菜鸟一枚,非科班出身.常常有客户的centos服务器需要分配15个IP甚至30个IP.每次需要手动分配十分麻烦,于是花了一天时间学了shell脚本,写了这个脚本. #!/bin/bash read -p "The IP numbers: " num while [[ $num -gt 0 ]] do read -p "Please enter IP Address :" ipaddr touch /etc/sysconfig/network-scripts/…
功能 修改主机名为node. 网卡开机启动并设置ip为静态18.8 更新yum源为国内yum源,并安装vim lrzsz wget man ntpdate软件. 关闭iptables selinux,设置grub等待时间2秒,只开启crond network rsyslog sshd lvm2-monitor blk-availability udev-post服务. 服务器时间同步并加大文件描述符为65535. 最小化硬件,并关闭软盘. 脚本 #!/bin/bash # # hostname…
脚本如下,后续继续优化 #!/bin/bash #author junxi by #this script is only for CentOS 7.x #check the OS platform=`uname -i` if [ $platform != "x86_64" ];then echo "this script is only for 64bit Operating System !" exit 1 fi echo "the platform…
一.service network restart 出错 问题描述: vmware 12 下centos 7 网络模式,NAT 昨晚作者打算更新自己虚拟机python,发现没网络ping www.baidu.com,然后windows 上ping 192.168.187.130 本地,发现没问题, 所以重启网络服务: service network restart 发现出现以下错误: Restarting network (via systemctl): Job for network.serv…
=============================================== 2018/9/12_第1次修改                       ccb_warlock =============================================== 问题: 将vs code里编写好的sh脚本(tmp.sh)上传到服务器(centos),运行时报“$'\r': 未找到命令”. 解决方案: 查了资料后才知道,由于该脚本的命令在windows上编辑后再复制到l…