Firewall
The firewall on Redhat 7 Linux system is enabled by default.
-
Stop and Start RHEL7 firewall
root@rhel7 ~] service firewalld stop
root@rhel7 ~]# service firewalld start
|
- Disable and Enable RHEL7 firewall
[root@rhel7 ~]# systemctl disable firewalld
[root@rhel7 ~]# systemctl enable firewalld
- How to open http port 80 on Redhat 7 Linux using firewall-cmd
[root@rhel7 ~]## firewall-cmd --zone=public --add-port=80/tcp
Once you add the above firewall rule reload firewall service:
[root@rhel7 ~]# firewall-cmd --reload
4.
- List all the port
[root@SGNWH01HP1DB1 firewalld]# firewall-cmd --zone=public --list-all
public
Start, Stop and Restart services on systemd RHEL
- list all currenly running services
[root@rhel7 ~]# systemctl list-units --type=service | grep running
- list all active services available
[root@rhel7 ~]# systemctl list-units --type=service
Journal Analysis
- To get the content of the Systemd journal,
# journalctl
- To get all the events related to the crond process in the journal
# journalctl --unit=chronyd
- To get all the events that appeared today in the journal, type:
# journalctl --since=today
- To display the disk space used by Journald# journalctl --disk-usage
- To get the 10 last events
# journalctl -f
Boot Process
- To get the boot process duration
# systemd-analyze
Service Management
Systemd deals with all the aspects of the service management. The
systemctl command replaces the
chkconfig and the
service commands
- To activate the NTP service at boot
# systemctl enable ntpd
- To deactivate it, start it, stop it, restart it, reload it, type:
# systemctl disable ntpd
# systemctl start ntpd
# systemctl stop ntpd
# systemctl restart ntpd
# systemctl reload ntpd
To get the status of the Apache service
# systemctl status httpd
To get the list of services that failed at boot, type:
# systemctl --failed
To get all the configuration details about a service (here httpd), type:
# systemctl show httpd
Other commands
No comments:
Post a Comment