centos7常用运维命令(updating)

文章目录

工具

rpm

# 安装
yum install docker-ce-19.03.9-3.el7
rpm -ivh xxxx.rpm

# 查找
rpm -qa|grep docker

# 查看路径
rpm -ql docker-ce-19.03.9-3.el7.x86_64




系统

防火墙

1、centos6的网卡重启方法:service network restart
centos7的网卡重启方法:systemctl restart network

2、DNS配置文件:

    `cat /etc/resolv.conf`
    设置主机和IP绑定信息:`cat /etc/hosts`
    设置主机名:`cat /etc/hostname`

3、可以使用nmtui文本框方式修改IP

4、关闭防火墙并设置开机不启动
查看防火墙状态:

    systemctl status firewalld.service
    关闭:systemctl stop firewalld
    开启:systemctl start firewalld
    开机自动关闭:systemctl disable firewalld
    开机自动启动:systemctl enable firewalld
    查看开机是否启动:chkconfig --list|grep network(RHLE6)

5、临时和永久关闭Selinux
临时关闭:

    getenforce
    Enforcing

    setenforce 0
    setenforce:SELinux is disabled

永久关闭:vim /etc/selinux/config

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大怀特

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值