Disabling NetworkManager The following steps will disable NetworkManager service and allows the interface to be managed only by network service. 1. To check which are the interfaces managed by NetworkManager # nmcli device status This displays a table that lists all network interfaces along with their STATE. If Network Manager is not controlling an interface, its STATE will be listed as unmanaged. Any other value indicates the interface is under Network Manager control. 2. Stop the … [Read more...] about How to disable NetworkManager on CentOS / RHEL 7
The systemd system and service manager are responsible for controlling how services are started, stopped and otherwise managed on Red Hat Enterprise Linux 7 systems. By offering on-demand service start-up and better transactional dependency controls, systemd dramatically reduces startup times. As a systemd user, you can prioritize critical services over less important services. Although the systemd process replaces the init process (quite literally, /sbin/init is now a symbolic link to … [Read more...] about systemd command line reference (cheat sheet)
timedatectl is a new feature on RHEL7. It may be used to query and change the system clock and its settings. Follow the below steps to change the timezone to IST (India). (Execute the below commands as root user). 1. List all the available timezones using the below command. You will get a long list of timezones using this command. # timedatectl list-timezones Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers .... 2. Locate the correct timezone you need that is in the … [Read more...] about CentOS / RHEL 7 : How to Change Timezone
Question: Why CentOS 7 / RHEL 7 have many tmpfs (6 tmpfs filesystem), are these tmpfs mandatory for OS? What are the mount /run/user/1000, /run/user/0, /run/user/45, /sys/fs/cgroup for? Answer: If you run df -hP in RHEL 7 system you would find many tmpfs file systems mounted. # df -hP Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_os-lv_root 296G 33G 248G 12% / devtmpfs 126G 0 126G 0% /dev tmpfs … [Read more...] about Why CentOS / RHEL 7 have many tmpfs (6 tmpfs filesystem), and what is their purpose
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. with "yum install" command. # yum install httpd NOTE: To get a specific version replace httpd with the version you would like. Example: … [Read more...] about CentOS / RHEL : How to install and start the Apache httpd 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 package provides a convenient way to check for, download and apply updates automatically. The cron jobs from the yum-cron package are active immediately after installing the package … [Read more...] about CentOS / RHEL : Configure yum automatic updates with yum-cron service
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 4 days ago Main PID: 1055 (firewalld) CGroup: /system.slice/firewalld.service … [Read more...] about CentOS / RHEL 7 : How to open a port in the firewall with firewall-cmd?
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 Name : iptables-services Arch : x86_64 Version : … [Read more...] about CentOS / RHEL 7 : Never run the iptables service and FirewallD service at the same time!
Problem: 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 not installed on the system. This is done to avoid conflict in running both iptables and firewalld. Make sure you … [Read more...] about CentOS / RHEL 7 : Unable to start/enable iptables
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 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; … [Read more...] about CentOS / RHEL 7 : How to open the Firewall port for Samba server using FirewallD