May 2017
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  

Categories

May 2017
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  

CentOS / RHEL 7 : How to sync chrony to local clock

Question : How to sync chrony to the local clock.

Answer : When the chrony service starts, there are some settings in the /etc/chrony/chrony.conf file that tells it to actually set the time if specific conditions occur. Below procedure lts you set the local clock as the source for chrony to synchronize the time.

1. […]

CentOS / RHEL 7 : How to configure serial getty with systemd

With SysV init, by default, getty processes are started on the first six virtual consoles. They can be accessed with the Ctrl+Alt+F1 to Ctrl+Alt+F6 key combination. systemd starts the getty processes only when needed. That means, only after you change to, for instance, the second virtual terminal by pressing Ctrl+Alt+F2 is the getty process started […]

CentOS / RHEL 7 : How to change runlevels (targets) with systemd

Systemd has replaced sysVinit as the default service manager in RHEL 7. Some of the sysVinit commands have been symlinked to their RHEL 7 counterparts, however this will eventually be deprecated in favor of the standard systemd commands in the future.

SysVinit V/s systemd runlevels

Here is a comparison between SysVinit runlevels V/s systemd targets.

[…]

CentOS / RHEL 7 : systemd-analyze command to find booting time delays

Question : My system is taking a lot of time to boot. How can I find out which services are taking long time to start?

Answer :

systemd-analyze command can be utilized to find out information about how much each service took to start. systemd-analyze time can provide overall information about how long it took […]

CentOS / RHEL 7 : How to open the Firewall port for Samba server using FirewallD

Question : I cannot reach my Samba server after starting the service. How do I open the port to be able to connect to my Samba server?

Solution :

If running FirewallD, it is mandatory to open the ports used by the Samba server in order for it to properly accept clients. To begin with […]

CentOS / RHEL 7 : Unable to start/enable iptables

When trying to start/enable the iptables daemon you receive the errors:

# systemctl enable iptables Failed to issue method call: Access denied # systemctl start iptables Failed to start iptables.service: Unit iptables.service failed to load: No such file or directory. Solution:

Starting with RHEL 7, firewalld is introduced and by default the iptables package is […]

CentOS / RHEL 7 : Never run the iptables service and FirewallD service at the same time!

By default, RHEL 7 uses the FirewallD service to provide network security. FirewallD must be stopped and disabled when using the iptables service:

# systemctl stop firewalld.service # systemctl disable firewalld.service # systemctl enable iptables.service # systemctl start iptables.service The iptables service is now provided by a separate package called iptables-services:

# yum info iptables-services […]

CentOS / RHEL 7 : How to open a port in the firewall with firewall-cmd?

Question: How to open a port in RHEL 7 using the firewall-cmd command?

Solution:

To begin with check the firewalld status using the systemctl command :

# systemctl status firewalld ? firewalld.service – firewalld – dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2016-10-29 21:47:04 IST; 1 weeks […]

CentOS / RHEL : Configure yum automatic updates with yum-cron service

yum-cron is an optional package starting from Red Hat Enterprise Linux 6, this is a plugin for yum. From man page of yum-cron :

yum-cron is a simple way to call yum commands from cron. It provides configuration to keep repository metadata up to date, and to check for, download, and apply updates. The yum-cron […]

CentOS / RHEL : How to install and start the Apache httpd service

Question: How to install Apache and configure Apache httpd to run as a service?

Answer:

Installing the Apache package

If you have the apache package downloaded, you can install it using rpm command as root user.

# rpm -ivh httpd If you have yum repository configured, use the recommended way of installing Apache httpd, i.e. […]