Fish in the river

思考 技术
记录 回忆
  1. Main page
  2. 运维技术
  3. Linux
  4. Main content

安装CentOS后的常规配置

2024年10月11日 56hotness 0likes 0comments

一.关闭防火墙

1.检查防火墙状态

sudo systemctl status firewalld

输出中显示 active (running) 表示 firewalld 防火墙正在运行。

2.关闭防火墙

sudo systemctl stop firewalld

sudo systemctl disable firewalld

3.再次检查防火墙状态

sudo systemctl status firewalld

检查输出是否显示 inactive,以确认防火墙已关闭。

二.永久关闭Selinux

1.检查Selinux状态

sestatus

如果显示为 enabled,则表示 SELinux 正在运行。

2.关闭Selinux

如果你想永久关闭 SELinux,需要修改配置文件。步骤如下:

2.1

sudo vi /etc/selinux/config
2.2
找到以下内容并修改 SELINUX
SELINUX=enforcing
SELINUX=disabled
2.3
保存后重启
3. 再次检查Selinux状态
sestatus
如果显示 disabled,表示 SELinux 已被永久关闭。
三.更改IP与DNS设置
1. 更改IP设置
nmtui
2. 更改DNS设置
vi /etc/resolv.conf
Tag: Linux
Last updated:2024年10月11日

joey

This person is a lazy dog and has left nothing

Like
< Last article

Comments

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
Cancel

归档

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024

分类目录

  • C#
  • Dock
  • Excel
  • Kindle
  • Linux
  • Windows
  • 生活感悟
  • 群晖
  • 运维技术

COPYRIGHT © 2024 水中小鱼. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang