当前位置:   article > 正文

云计算Day1

云计算Day1

查看电脑IP地址:Win+R输入cmd进入窗口输入ipconfig  ipv4地址查看 

[root@localhost ~]#
root:代表当前登录系统的用户的用户名
localhost:主机名
~:当前用户的家目录
#:超级用户的命令提示符
启动网卡:ifup ens33
查看IP地址:ip a

查看时间:
系统时间:date
硬件时间:hwclock -r

修改时间:
系统时间:date -s "2021-11-11 22:22:22"
硬件时间:hwclock --set --date "2021-11-11 22:22:22"

如何查看服务器能否上网
ping baidu.com
PING baidu.com (110.242.68.66) 56(84) bytes of data.
64 bytes from 110.242.68.66 (110.242.68.66): icmp_seq=1 ttl=128 time=31.1 ms
64 bytes from 110.242.68.66 (110.242.68.66): icmp_seq=2 ttl=128 time=24.2 ms
64 bytes from 110.242.68.66 (110.242.68.66): icmp_seq=3 ttl=128 time=23.5 ms

ctrl+c  终止
ctrl+l    清屏  clear

网络时间:授时中心 域名  ntp.aliyun.com    time.windows.com 
ntpdate time.windows.com

yum install ntpdate
ntpdate time.windows.com

将系统时间同步给硬件
hwclock --systohc
将硬件时间同步给系统
hwclock --hctosys
将硬件时间保存到主板
hwclock -w


网卡开机自启动
1、编辑网卡的配置文件
    vi /etc/sysconfig/network-scripts/ifcfg-ens33
    ONBOOT=no 改成yes
    1、将光标移动到文件的最后一行,然后再将光标移动至这一行的最后
    2、按键盘上的i键,然后光标再向右移动一位;
    3、删除no;
    4、输入yes;
    5、按键盘上左上角的Esc键;
    6、输入英文冒号:
    7、输入wq
    8、回车
2、重启网卡
systemctl restart network


3、防火墙
查看防火墙的状态:
    systemctl status firewalld
关闭防火墙:
    systemctl stop firewalld
设置开机不自启动
    systemctl disable firewalld

4、selinux
查看selinux状态
    getenforce
Enforcing        开启状态
Permissive        临时关闭
Disabled        永久关闭
临时关闭
    setenforce 0
永久关闭
    vi /etc/selinux/config
    SELINUX=Enforcing 改成 SELINUX=disabled

reboot重启系统

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/459402
推荐阅读
相关标签
  

闽ICP备14008679号