The Problem While executing yum commands user is getting below error: # yum update Bad id for repo: My Repo, byte = 2 The following is the repo file which is used for local dvd image # cat /etc/yum.repos.d/my_repo.repo [My Repo] name=repo1 baseurl=file:///mnt/iso/ enabled=1 gpgcheck=0 The Solution [My Repo] is wrong as it uses spaces […]
Archives for September 2018
How to disable lvmetad in CentOS/RHEL
What is lvmetad To improve performance and automatic activation of volume groups and logical volumes by udev, LVM makes use of a metadata cache. By default, LVM manages its metadata centrally using a daemon, lvmetad. How to disable lvmetad Sometimes, especially in a clustered environment, you may find that when you create a volume group […]
How to view past performance with sar in Linux
There are many tools/utilities that can be used to analyze the current system performance. But how do we gauge the historic system performance? For that you can use the System Activity Report (SAR) tool. Using the sar tool, you will be able to look back over a period of time and see how the server […]
How to Configure Separate Port For SSH and SFTP On CentOS/RHEL
Sometimes for the security reasons, there is a need to have a separate port for ssh and sftp on CentOS/RHEL. Here’s a short how-to on configuring SSH on port 2222 and SFTP to work on port 22. 1. Since openssh-5.3p1-117.el6.x86_64 for separating the ssh and sftp port on the CentOS/RHEL systems, make changes to the […]
What is OCFS or OCFS2
1. What is OCFS for Linux? OCFS is an open source clustered file system for Linux designed for use with Oracle RAC on Linux to store Oracle datafiles, redo logs, archive logs, voting disks, quorum files and control files. It is NOT a general purpose file system and should not be used to store a […]
How to Change the Default Timeout Settings for Telnet Session in CentOS/RHEL
To modify the telnet timeout you need to change the value of the tcp keepalive parameters. Let us first check the default values of TCP keepalive parameter. # cat /proc/sys/net/ipv4/tcp_keepalive_time 7200 # cat /proc/sys/net/ipv4/tcp_keepalive_intvl 75 # cat /proc/sys/net/ipv4/tcp_keepalive_probes 9 The first two parameters are expressed in seconds, and the last is the pure number. This […]
How to modify snmp service to listen to an alternative port in CentOS/RHEL
Follow steps below to check and change the default port (161) number on which snmp service would be listening. NOTE: Similarly for each service there will be a port over which the service is binded to. There is a common miss conception that the port mapping is done over /etc/services file. This is just an […]
How to Stop SSH Session From Getting Timed Out
The Linux ssh server never disconnects ssh session from server side by default, check switch/router/firewall configuration to avoid the issue without changing the configuration of ssh servers/clients. If the ssh session is getting disconnected due to inactivity and one wants to stop this then please follow the below steps either on client or server side […]
How to Setup SSH keys for “passwordless” SSH Login on CentOS/RHEL
The post outlines the steps to configure passwordless ssh between 2 CentOS/RHEL hosts. The steps although remains almost the same with slight changes across all the Linux distributions. 1. Log in as the user that you want to set up the ssh keys, in this case, we are using user “geek”. 2. Create a private […]
Why Does “netstat” Output Show Many Connections in CLOSE_WAIT Status?
This post will provide details on TCP connections reporting ‘CLOSE_WAIT’ states. The possible state values for TCP sockets are as follows: BOUND Bound, ready to connect or listen. CLOSED Closed. The socket is not being used. CLOSING Closed, then remote shutdown; awaiting acknowledgment. CLOSE_WAIT Remote shutdown; waiting for the socket to close. ESTABLISHED Connection has […]