There are two handy tools to help you provide an additional information about system packages. The first tool is the package manager yum
and the second is yumdb
. Both tools display a different type of information. The other difference is that yumdb
command can be only used on packages currently installed on the system.
Redhat / CentOS / AlmaLinux
Installation of Memtest+ RAM memory test tool on Redhat 7 Linux
Installation of Memtest+ RAM memory test tool on Redhat 7 Linux
Memtest is a quite handy tool when troubleshooting hardware problem and specifically problems related to Random Access Memory (RAM). After installation the memtest+ tool will become available among other boot options. To install memtest+
on RHEL 7 Linux server execute the following linux command:
# yum install memtest86+ ... Running transaction Installing : memtest86+-4.20-12.el7.x86_64 1/1 Verifying : memtest86+-4.20-12.el7.x86_64 1/1 Installed: memtest86+.x86_64 0:4.20-12.el7
How to monitor a CPU temperature on Redhat 7 Linux system
Here is a short config to show you how to display and monitor CPU temperature on a Linux system running Redhat 7 Linux. First we need to install lm_sensors
:
# yum install lm_sensors
Next, use sensors
command to display CPU temperature:
$ sensors | grep Core Core 0: +43.0°C (high = +86.0°C, crit = +100.0°C) Core 1: +43.0°C (high = +86.0°C, crit = +100.0°C)
How to install, manage, start and autostart ssh service on RHEL 7 Linux
systemctl
command is used on RedHat 7 linux to manage services system wide. It allows administrators to manage ssh service to start, restart, stop or enable autoload after system startup.
In install ssh service on your RHEL 7 linux run a following linux command:
# yum install openssh
By defalt SSH service or to be more precise sshd
( daemon ) is disabled. Once the opensshd package installed, you can check the status of SSHD service by using the below command:
# systemctl status sshd sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled) Active: inactive (dead)
To start ssh daemon (sshd) on RHEL 7 run:
systemctl start sshd
How to enable EPEL repository on RHEL 7 without a current Red Hat Subscription
If you currently do not hold a Red Hat Subscription and yet you need to enable EPEL ( Extra Packages for Enterprise Linux ) repository on your RHEL 7 Linux you need to download and install following file directly from Fedora project:
epel-release-7-5.noarch.rpm
How to check what Redhat Linux version is my system running
There are number of ways how to find you what Redhat Linux version is my server running on. First check /etc/os-release
file:
# cat /etc/os-release NAME="Red Hat Enterprise Linux Server" VERSION="7.0 (Maipo)" ID="rhel" ID_LIKE="fedora" VERSION_ID="7.0" PRETTY_NAME="Red Hat Enterprise Linux Server 7.0 (Maipo)"
Configure network interface as DHCP client on RHEL7 Linux
In this config we are going to configure a network interface to receive an IP configuration settings from DHCP server. First get the name of the network interface you would like to set as DHCP client. To do this you can run command:
# ip addr show 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:15:38:b7 brd ff:ff:ff:ff:ff:ff valid_lft forever preferred_lft forever inet6 fe80::a00:27ff:fe15:38b7/64 scope link valid_lft forever preferred_lft forever
Once we have located a name of the network interface in question open a corresponding configuration file. So as an example, for network interface epn0s3
vi will edit a /etc/sysconfig/network-scripts/ifcfg-enp0s3
. Open this file and enter the minimum configuration settings in order to make this network interface act as a DHCP client:
DEVICE=enp0s3 BOOTPROTO=dhcp ONBOOT=yes
How to change a static hostname on RHEL7 linux with hostnamectl
Instead of changing a hostname on your Redhat 7 server manually by editing /etc/hostname
you may preferably use a dedicated command hostnamectl
to do this job. By default when no other options are supplied the hostnamectl
command will display basic information including static hostname:
[root@rhel7 ~]# hostnamectl Static hostname: rhel7 Icon name: computer Chassis: n/a Machine ID: 75387b56d72b44b380810499805ec28a Boot ID: 6ad251d0e12a10e3af1894eae5fe5cb6 Virtualization: oracle Operating System: Red Hat Enterprise Linux Server 7.0 (Maipo) CPE OS Name: cpe:/o:redhat:enterprise_linux:7.0:GA:server Kernel: Linux 3.10.0-123.el7.x86_64 Architecture: x86_64
How to list all available locales on RHEL7 Linux
The following linux command will list all available locales currently available on the Redhat 7 system:
[root@rhel7 ~]# localectl list-locales
The list of all available locales on your system my be quite long so use grep
command to narrow down your search. Bellow command will display for example all German available locales:
[root@rhel7 ~]# localectl list-locales | grep ^de de_AT de_AT.iso88591 de_AT.iso885915@euro de_AT.utf8 de_AT@euro de_BE de_BE.iso88591 de_BE.iso885915@euro de_BE.utf8 de_BE@euro de_CH de_CH.iso88591 de_CH.utf8 de_DE de_DE.iso88591 de_DE.iso885915@euro de_DE.utf8 de_DE@euro de_LU de_LU.iso88591 de_LU.iso885915@euro de_LU.utf8 de_LU@euro deutsch
How to reset the root password in RHEL7/CentOS7/Scientific Linux 7- based systems
Objective
Resetting the root password in RHEL7/CentOS7/Scientific Linux 7
Requirements
RHEL7 / CentOS7 / Scientific Linux 7
Difficulty
MODERATE
Instructions
Things have changed in the RHEL7 world and so has the preferred way of resetting the root password. Although the old way of interrupting the boot process (init=/bin/bash) still works, it is no longer bulletproof and recommended.
‘Systemd’ uses ‘rd.break’ to interrupt the boot. Let’s have a quick walk through the whole procedure.
Configuring VNC Server Access on a Redhat Linux
Most of the time as a Linux system administrator you are managing your servers over the network. It is very rare that you will need to have a physical access to any of your managed servers. In most cases all you need is to SSH remotely to do your administration tasks. In this article we will configure a GUI alternative to a remote access to your RHEL server, which is VNC. VNC allows you to open a remote GUI session to your server and thus providing you with a full graphical interface accessible from any remote location.
In this tutorial you will learn:
- How to install required VNC packages
- How to setup and start the VNC server on RHEL
- How to connect to a graphical session remotely
- How to run graphical programs in the xterm session