Home > Operation and Maintenance > Linux Operation and Maintenance > How to turn off the CentOS-Linux firewall

How to turn off the CentOS-Linux firewall

巴扎黑
Release: 2017-07-17 15:26:46
Original
1900 people have browsed it

RedHat yum system

Firewall

  • How to close the firewall
    systemctl stop firewalld

  • Detect firewall status
    systemctl status firewalld

  • Set the firewall to disable startup at boot
    systemctl disable firewalld

SELinux

  • Disable SELinux
    setenforce 0

  • Get SELinux status
    getenforce

  • Permanently disabled
    vi/vim /etc/sysconfig/selinux

Set the partition to be automatically mounted at startup

vi/vim /etc/fstab

This file stores the partition to be automatically mounted at startup

/dev/cdrom /mnt iso9660 defaults 0 0

Mount source Mount point partition type Automatic mount No self-detection at boot

Configure yum source-local yum source

/etc/yum.repos.d/

##yum source configuration file address

Individuals can configure new files in this directory. The files must end with .repo repository warehouse

Example rhel7.repo

[rhel7-source] // Name

name=rhel-sever //Description information

baseurl=file:///mnt //(system disk) file path, note that there are no spaces in file://

enabled=1 //Enable

gpgcheck=0 //Cancel verification

Basic commands

Word sorting

Terminal terminal network-scripts network script passwd password file

nologin prohibit login shutdown shutdown reboot restart
poweroff shutdown Grep filter useradd add user graphical graphics

tty console terminal ()

pts virtual terminal ()

  • tty1-tty6

If you enter the graphical interface at the beginning: tty1 is the graphical interface. tty2-6 is a character interface.

Switch the graphical interface to the character interface terminal: Ctrl+Alt+F2-F6

Switch the character interface to another character interface terminal: Alt+F2-F6

Character interface Switch to the graphical interface: Alt+F1

    ##pts virtual terminal
is the terminal in the graphical interface

Shortcut keys:

Ctrl+Shift+T

Create a new virtual terminal

Ctrl+Shift++

Enlarge the font

Ctrl+-

Reduce font

Alt+numeric keys

Switch terminal

Alt+F4

Close terminal

    whoami Function: View the current user
  • [root@qshu-pc ~]whoami

root

Use who am i Query the pts number corresponding to the current terminal

[root@qshu-pc ~]who am i

root pts/0 2017-7-10 20: 10 (:0)

pts(pseudo-terminal slave) Pseudo terminal: Connect through ssh related terminal. The terminal is: pts

Shell prompt

[root@qshu-pc ~]

[user@host name current directory] prompt root is # and ordinary user is $

Bash Shell basic syntax

Summary of Linux command input rules:

How to enter commands:

Command [Option] ([Parameter]) [Option value] [Parameter Value]

Spaces can be used in combination as splitting parameters

Common options (parameters): -h --help; Features: The options look like: -letters or --plus Word

Basic command operation:

    ls command
  • Function: View what files are in the current directory

Syntax: ls directory, if no directory is added, view the current directory

Parameters:

ls -l

Display in detailed information mode

ls -a

Display all files (including hidden files)

ls -d

Display only directories

ls -h

File size user-friendly DisplayCommon information explanation

. Represents the current directory

.. Represents the parent directory (upper-level directory)

Why do some directory files have What about different colors?

Different colors in the Linux system represent different file types

Blue

Directory/etc

Black

File/etc/passwd

Light Blue

Link/etc/grub2.cfg

Red

Compressed package boot.tar.gz

Green

Executable file/etc/init.d/network

Black background with yellow characters

Device file/dev/sda

The above is the detailed content of How to turn off the CentOS-Linux firewall. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template