The command to turn off a service such as a firewall in a previous release is
Service Iptables Stop
/etc/init.d/iptables stop
In RHEL7, in fact, there is no such service
[email protected] ~]# cat/etc/redhat-release
Red Hat Enterprise Linux Server Release 7.0 (MAIPO)
[[Email protected] ~]# service iptables stop
Redirecting To/bin/systemctl Stop Iptables.service
[[email protected] ~]#/etc/init.d/iptables stop
-bash:/etc/init.d/iptables:no such file or directory
Originally started at RHEL7, the Systemctl tool was used to manage the service programs, including services and Chkconfig
[Email protected] ~]# systemctl List-unit-files|grep enabled
Cups.path enabled
Abrt-ccpp.service enabled
Abrt-oops.service enabled
Abrt-vmcore.service enabled
Abrt-xorg.service enabled
Abrtd.service enabled
Accounts-daemon.service enabled
Atd.service enabled
Auditd.service enabled
Avahi-daemon.service enabled
Bluetooth.service enabled
Chronyd.service enabled
Crond.service enabled
Cups.service enabled
Dbus-org.bluez.service enabled
Dbus-org.fedoraproject.firewalld1.service enabled
Dbus-org.freedesktop.avahi.service enabled
Dbus-org.freedesktop.modemmanager1.service enabled
Dbus-org.freedesktop.networkmanager.service enabled
Dbus-org.freedesktop.nm-dispatcher.service enabled
Display-manager.service enabled
Dmraid-activation.service enabled
Firewalld.service enabled
Firstboot-graphical.service enabled
Gdm.service enabled
[Email protected] Enabled
Hypervkvpd.service enabled
Hypervvssd.service enabled
Irqbalance.service enabled
Iscsi.service enabled
Ksm.service enabled
Ksmtuned.service enabled
Libstoragemgmt.service enabled
Libvirtd.service enabled
Lvm2-monitor.service enabled
Mdmonitor.service enabled
Microcode.service enabled
Modemmanager.service enabled
Multipathd.service enabled
Networkmanager-dispatcher.service enabled
Networkmanager.service enabled
Nfs-lock.service enabled
Packagekit-offline-update.service enabled
Postfix.service enabled
Rhsmcertd.service enabled
Rngd.service enabled
Rpcbind.service enabled
Rsyslog.service enabled
Rtkit-daemon.service enabled
Smartd.service enabled
Spice-vdagentd.service enabled
Sshd.service enabled
Sysstat.service enabled
Systemd-readahead-collect.service enabled
Systemd-readahead-drop.service enabled
Systemd-readahead-replay.service enabled
Tuned.service enabled
Vmtoolsd.service enabled
Avahi-daemon.socket enabled
Cups.socket enabled
Dm-event.socket enabled
Iscsid.socket enabled
Iscsiuio.socket enabled
Lvm2-lvmetad.socket enabled
Rpcbind.socket enabled
Default.target enabled
Graphical.target enabled
Nfs.target enabled
Remote-fs.target enabled
disabling firewalls
[[email Protected] ~]# systemctl stop Firewalld.service
[[email protected] ~]# systemctl disable Firewalld.service
[[email protected] ~]# systemctl status firewalld.service
firewalld.service–firewalld–dynamic firewall Daemon
loaded:loaded (/usr/lib/systemd/system/firewalld.service; disabled)
active: Inactive (dead)
Jul 22:25:43 rhel7 systemd[1]: Started firewalld–dynamic firewall daemon.
Jul 22:43:29 Rhel7 systemd[1]: Stopping firewalld–dynamic firewall daemon ...
Jul 22:43:29 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.
Jul 22:44:14 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.
Jul 22:44:15 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.
Jul 22:44:19 Rhel7 systemd[1]: Starting firewalld–dynamic Firewall daemon ...
Jul 22:44:19 rhel7 systemd[1]: Started firewalld–dynamic firewall daemon.
Jul 22:44:21 Rhel7 systemd[1]: Stopping firewalld–dynamic firewall daemon ...
Jul 22:44:21 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.
Jul 22:44:32 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.
Start a service: Systemctl start Firewalld.service
Close a service: Systemctl stop Firewalld.service
Restart a service: Systemctl restart Firewalld.service
Displays the status of a service: Systemctl status Firewalld.service
Enable a service at boot: Systemctl enable Firewalld.service
Disable a service at boot: systemctl disable Firewalld.service
Check to see if the service is booting: Systemctl is-enabled Firewalld.service;echo $?
To view a list of services that have been started: Systemctl List-unit-files|grep enabled
Turn from: http://www.zhongweicheng.com/?p=1419 If there is infringement, please contact me, will be deleted as soon as possible.
Go RedHat Enterprise Linux 7 Shutdown Firewall method