Linux initialization Configuration---hostname, shutdown firewall, turn off SELinux

Source: Internet
Author: User

I. Modifying host names

1. Zero modification

[Email protected] network-scripts]# hostname jw07

And then you can see that our hostname has been modified.

2. Permanently modify the host name

[Email protected]/]# Hostnamectl set-hostname Liutao

Restart CentOS to see the changes

Two. How to turn off the CentOS firewall

1. Zero-off

[Email protected] ~]# Systemctl stop Firewalld.service

We can view the firewall status to see if the shutdown was successful

[Email protected] ~]# Firewall-cmd--state
Not running

2. Permanently closed

[Email protected] ~]# systemctl disable Firewalld.service

This command to understand that the boot does not start the firewall, then the boot is not started is it a permanent shutdown?


Third, close SELinux

1. Zero-off

[Email protected] ~]# Setenforce 0

2. Permanently close (Modify config file)

[Email protected] ~]# Vi/etc/selinux/config

The last reboot can

You can view the status to see if it is turned off

[Root@liutao ~]# Sestatus
SELinux Status: disabled

Linux initialization Configuration---hostname, shutdown firewall, turn off SELinux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.