firewall-cmd命令参数介绍
firewall-cmd –xx-
参数 功能--get-default-zone 查询当前默认的区域名称
--set-default-zone=区域名称 设置默认的区域并使其永久生效
--get-zones 显示可用的区域
--get-services 显示命令支持的服务
--get-active-zones
显示当前正在使用的区域与网卡名称
2023-11-27 Linux&Unix
firewall-cmd –xx-
参数 功能--get-default-zone 查询当前默认的区域名称
--set-default-zone=区域名称 设置默认的区域并使其永久生效
--get-zones 显示可用的区域
--get-services 显示命令支持的服务
--get-active-zones
显示当前正在使用的区域与网卡名称
2023-11-12 Linux&Unix
1、网络
IP设置:
/etc/NetworkManager/system-connections/*.nmconnection
nmcli命令可以配置此文件:
比如:
# nmcli connection modify ens192 +ipv4.routes “192.168.0.0/24 192.168.0.254, 192.168.2.0/24 192.168.0.254”
同:
route1=192.168.0.0/24,192.168.0.254
route2=192.168.2.0/24,192.168.0.254
2、时间
时区设置:
cd /etc
rm /etc/localtime -fr
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock –systohc
(同步硬件时间,无法使用NTP)
3、关闭SElinux
查看状态:/usr/sbin/sestatus -v
临时关闭SElinux: setenforce 0
永久关闭SElinux: vim /etc/selinux/config
SELINUX=disabled
4、修改SSH端口
启用SSH:默认启动
vim /etc/ssh/sshd_config
Port 22
5、关闭防火墙
关闭防火墙: systemctl stop firewalld
禁用防火墙: systemctl disable firewalld
查看防火墙状态: systemctl status firewalld
2023-11-01 Linux&Unix
Linux硬盘是数据存储中极其重要的部分,在使用Linux操作系统时,用户常常需要对Linux硬盘进行扩容。扩容可以提供给用户更多的空间,让用户能够更加有效地利用硬盘作为数据存储。
在扩容Linux硬盘之前,用户需要做几件准备工作,包括对Linux系统环境的检查、检查硬件驱动器和更新固件。
下面,我们就以扩容Linux ext4分区为例,来详细介绍一下Linux硬盘的扩容技术:
Continue…