The centos 7 system is used for some simple configurations of remote connection and remote file transfer of intranet servers --- suitable for rookie (mostly for transcription)

Linux initial configuration-host name, close the firewall, close selinux (centos 7)
1. Modify the host name
1. Temporarily modify
[root @ localhost network-scripts] # ​​hostname jw07
Then you can see that our host name has been modified

2. Permanently modify the host name
[root @ localhost /] # hostnamectl set-hostname liutao
restart centos to see the changes

2. How to shut down the firewall of centos
1. Temporarily shut down
[root @ liutao ~] # systemctl stop firewalld.service
We can check whether the firewall is successfully shut down by checking the firewall status
[root @ liutao ~] # firewall-cmd --state
not running

2. Permanently shut down
[root @ liutao ~] # The systemctl disable firewalld.service
command understands that the firewall does not start when the power is turned on, so it does not start when the power is turned on, is it permanently closed?

3. Close selinux
1. Temporarily close
[root @ liutao ~] # setenforce 0

2. Permanently close (modify the configuration file)
[root @ liutao ~] # vi / etc / selinux / config
Finally restart

You can check whether it is closed by checking the status
[root @ liutao ~] # sestatus
SELinux status: disabled

Note: selinux is a common security software in Linux systems. SELinux has three states, namely Enforcing, Permissive and Disabled states. The first is the default state, which means that it is mandatory, and the second is tolerant, that is, most rules are released. The third is to disable, that is, do not set any rules. The first two states can only be set through the setenforce command, and if you want to change to the disabled state, you need to modify the configuration file and restart the system.

Guess you like

Origin www.cnblogs.com/xiaofeiyuxiaopang/p/12724198.html