您的位置 首页 rockylinux

rocky linux 相关命令

rocky linux 相关命令

 

1-网卡:

参考:Vmware下安装Rocky Linux9.4-白眉大叔 (baimeidashu.com)

3、设置防火墙

可选操作,根据实际需求设置

这里演示关闭并禁用firewalld防火墙,使用iptables防火墙。关于iptables和firewalld的区别可自行查找相关资料。

关闭并禁用firewalld防火墙

 systemctl stop firewalld
 systemctl disable firewalld

 

使用iptables防火墙(合适的时候使用)一般内网我们用阿里云的白名单

yum -y install iptables-services
systemctl start iptables
iptables -F
systemctl enable iptables
service iptables save

 

禁用 Selinux

sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
grubby --update-kernel ALL --args selinux=0
grubby --info DEFAULT

 

4、设置时区

检查时区是否是上海

timedatectl

时区如果不是Asia/Shanghai,使用如下命令设置时区

timedatectl set-timezone Asia/Shanghai

5安装命令

可选操作,最小安装版的Linux,很多软件需要自行安装,根据实际需要安装必要的命令

例如:vim、net-tools

yum update -y
yum install -y vim
yum install -y net-tools

6-关闭swap分区:

临时关闭:

swapoff -a

永久关闭:

 

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章