linux学习笔记之系统管理操作

1.查看网络IP和网关

  • 查看虚拟网络编辑器
    在VMware里 选择 编辑->虚拟网络编辑器

  • 修改ip地址
    在虚拟编辑器里面选择NAT模式,然后配置子网ip, 如果不知道本机ip ,可以在window命令行中输入ipconfig 查看当前ip地址
    在这里插入图片描述
    在这里插入图片描述

  • 查看网关
    在这里插入图片描述

2.配置网络IP地址

  • 查看当前ip地址
    [root@hadoop102 /]# ifconfig

  • 修改ip地址
    [root@hadoop102 /]#vim /etc/sysconfig/network-scripts/ifcfg-eth0
    按 i 键 进入编辑模式
    需要修改的内容有5处:
    IPADDR=192.168.11.106
    GATEWAY=192.168.11.2
    ONBOOT=yes
    BOOTPROTO=static
    DNS1=192.168.23.2
    在这里插入图片描述
    修改后:

在这里插入图片描述
然后执行 service network restart 就ok 了,ip配置完成。

3.防火墙

  1. 查看防火墙状态 service iptables status
  2. 临时关闭防火墙 service iptables stop
  3. 查看防火墙 开机启动状态 chkconfig iptables --list
  4. 关闭防火墙开机启动 chkconfig iptables off
  5. 开启防火墙开机启动 chkconfig iptables on

关机重启

  关机重启  reboot

猜你喜欢

转载自blog.csdn.net/chen7588693/article/details/84252954