Centos7 shut down firewalls, SELinux, Mount discs, and set IP

Source: Internet
Author: User

To modify the IP address using the command:
[Email protected]~] #vi/etc/sysconfig/network-scripts/ifcfg-ens33
Press I to add a modified content
onboot= "No" change to Yes to turn on the network card
Bootproto= "DHCP" changed to None or static
ipaddr=192.168.159.129
neteway=255.255.255.0
gateway=192.168. 159.1
dns1=8.8.8.8
Restart the NIC service
[Email protected] ~]# systemctl Restart Network

Turn off the firewall and set the boot not to start
To view firewall-enabled conditions
Systemctl Status Firewalld
Active open (running)
Active:inactive (dead) Close
Temporary shutdown: systemctl stop Firewalld
Turn off the firewall at boot:
[Email protected] ~]# systemctl disable FIREWALLD
Restart the computer to take effect

Temporary and off SELinux
View SELinux Open conditions
[Email protected] ~]# Getenforce
Enforcing open Permissive off
Temporarily close SELinux
[Email protected] ~]# Setenforce 0
Completely shut down SELinux
[Email protected] ~]# Vi/etc/sysconfig/selinux
Selinux=disabled
Last Restart service effective
[Email protected] ~]# systemctl Restart Network
Set the system CD to mount automatically
[Email protected] ~]#
echo "/dev/sr0/mnt iso9660 defaults 0 0" >>/etc/fstab
Attach all the contents of the file
viewing mount conditions
[Email protected] ~]# df-h

Centos7 shut down firewalls, SELinux, Mount discs, and set IP

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.