0
点赞
收藏
分享

微信扫一扫

CentOS 7 - 基础设置

双井暮色 2022-06-08 阅读 56

系统下载

# 当前版本
https://www.centos.org
# 归档版本
https://vault.centos.org
https://archive.kernel.org/centos-vault


系统名称

查查系统版本

cat /etc/redhat-release

查看系统名称

hostnamectl

修改系统名称

hostnamectl set-hostname dev-c701


设置网络

修改配置文件vi /etc/sysconfig/network-scripts/ifcfg-ens33(静态P地址)

BOOTPROTO=static
ONBOOT=yes
IPADDR=10.10.20.101
NETMASK=255.255.254.0
GATEWAY=10.10.20.1
DNS1=114.114.114.114

重新加载网络配置

nmcli connection reload


系统时间

查看系统时间

timedatectl

查看系统时区

timedatectl list-timezones
timedatectl list-timezones | grep -i shanghai

设置系统时区

timedatectl set-timezone Asia/Shanghai

时间服务

chrony(CentOS 8 and CentOS 7)

yum info chrony
yum install chrony -y
systemctl start chronyd
systemctl enable chronyd
systemctl status chronyd

ntp(CentOS 6)

chkconfig ntpd on
chkconfig | grep ntpd
service ntpd start
service ntpd status


图形/命令行切换

# 安装图形
yum groupinstall "GNOME Desktop" -y
systemctl get-default
systemctl set-default graphical.target
systemctl set-default multi-user.target


登陆提示

/etc/motd

举报

相关推荐

0 条评论