Wise people learn when they can; fools learn when they must - Arthur Wellesley

Thursday 27 July 2017

RHEL6–37–AUTOFS-2


RHEL6–37–AUTOFS-2


INDIRECT MAP:

This is the main reason because of “autofs” is too famous. Let’s assume there are several remote users in a network, jumping from this server to that server. They all need a space on each server to edit their files or do some data retrieval work. They can collect their data on each server and send it back to their home location, but this is not feasible. Also practically it is not possible to carry their home dir to each location while login to that server.

But what if they get their default home dir on each server as they logged in.

RHEL6–36–AUTOFS-1


RHEL6–36–AUTOFS


WHAT IS AUTOFS?

Mounted partition is a dedicated resource in NFS whereas in autofs mount & unmount are not permanent. They automatically mounted whenever accessed and unmounted if not used for certain time.

WHY /WHEN /WHERE AUTOFS?

If we want to save precious bandwidth & system resources then we should opt for autofs.

Still not clear…?

Let’s have an example,

Thursday 25 May 2017

RHEL6 – 35 – NFS


RHEL6–35–NFS

Which packages are required to run NFS?

nfs-utils & rpcbind

How to know about the required NFS packages installed in RHEL system?

[root@rhel6-test1 ~]# rpm -qa rpcbind
rpcbind-0.2.0-11.el6.x86_64

[root@rhel6-test1 ~]# rpm -qa |grep -i nfs
=====Nothing in O/P=====================

Saturday 6 May 2017

RHEL6 – 33 –RESET DEFAULT PERMISSIONS & OWNERSHIP

RHEL6 – 33 –RESET DEFAULT PERMISSIONS &                 OWNERSHIP

Well, it is very interesting to reset default perms of files and dirs. Also resetting the default ownership.

How to reset the default permission for files of particular package?

[root@rhel6-test1 ssh]# rpm --setperms <package name>


How to reset the default ownership for files of particular package?

[root@rhel6-test1 ssh]# rpm --setugids  <package name>

Wednesday 3 May 2017

RHEL6 – 32 -YUM


RHEL6 – 32 -YUM


As we had seen earlier in last post that how to install RPM packages. YUM is also a way to do same. If both have same purpose then what is need of yum?

YUM is preferable way to install RPM packages, because its capability to resolve dependency.

YUM is the primary tool for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux RPM software packages from official Red Hat software repositories, as well as other third-party repositories. YUM is used in Red Hat Enterprise Linux versions 5 and later.

Friday 28 April 2017

RHEL6 - 31 - RPM


RHEL6-31-RPM


Red Hat has simplified the installation of software in Linux by creating the Red Hat Package Manager (RPM). A package, or RPM file, will install a given application and create the necessary directories to run it.

An RPM package can contain an arbitrary set of files. The larger part of RPM files encountered are “binary RPMs” (or BRPMs) containing the compiled version of some software. There are also “source RPMs” (or SRPMs) files containing the source code used to produce a package. These have an appropriate tag in the file header that distinguishes them from normal (B)RPMs, causing them to be extracted to /usr/src on installation. SRPMs customarily carry the file extension “.src.rpm” (.spm on file systems limited to 3 extension characters, e.g. old DOS FAT).

Tuesday 25 April 2017

RHEL6 - 30 - CHROOT JAIL (FTP/SFTP)


RHEL6-30-CHROOT JAIL (FTP/SFTP)

WHAT IS CHROOT-JAIL?

A chroot operation changes the apparent root directory for a running process and its children. It allows you to run a program with a root directory other than /. The program cannot see or access files outside the designated directory tree. Such an artificial root directory is called a chroot jail, and its purpose is to limit the directory access of a potential attacker. The chroot jail locks down a given process and any user ID that it is using so that all they see is the directory in which the process is running. To the process, it appears that the directory in which it is running is the root directory. 

Tuesday 18 April 2017

RHEL6 - 29 - TCP WRAPPERS


RHEL6-29-TCP WRAPPERS
  
WHAT IS TCP WRAPPER?

As name suggest, wrapping of TCP, protection of services that communicate using the TCP protocol.
The Linux services or commands that can be controlled through tcp_wrappers are those that use the libwrap library.

For network services that utilize it, TCP Wrappers add an additional layer of protection by defining which hosts are or are not allowed to connect to "wrapped" network services. One such wrapped network service is the xinetd super server. This service is called a super server because it controls connections to a subset of network services and further refines access control.

Sunday 16 April 2017

RHEL6 - 28 - XINETD


RHEL6-28-XINETD

xinetd stands for “extended internet service daemon”

To control access to Internet services, use xinetd, which is a secure replacement for inetd. The xinetd daemon conserves system resources, provides access control and logging, and can be used to start special-purpose servers. xinetd can also be used to grant or deny access to particular hosts, provide service access at specific times, limit the rate of incoming connections, limit the load created by connections, and more.

RHEL6 – 27 - SSH


RHEL6–27-SSH
  
SSH:
SSH is a client/server protocol, which helps us to access the remote system over the network. The communication done via encrypted tunnel. Whenever client access the server, the client downloads the secure key from server and simultaneously server fetch the secure key from client. These keys make the secure encrypted tunnel between client/server for communication.

Saturday 15 April 2017

RHEL6 - 26 - TELNET


RHEL6-26-TELNET


HOW TO CONFIGURE TELNET IN RHEL6?

Telnet is very unsecure way to connect with other system. This is unsecure because communication between systems is in plain text.

By default
-   Telnet is not installed,
-   User “root” is not allowed,
-   After installing telnet again telnet login is not permitted.

RHEL6 - 25 - VIRTUAL IP


RHEL6-25-VIRTUAL IP


HOW TO CONFIGURE VIRTUAL IP IN RHEL6?

Before configuring virtual IP we need to know how many network interfaces are available?

Various ways to find available Network Interfaces on the RHEL system.

Wednesday 12 April 2017

RHEL6 - 24- LINUX KERNEL - 3


RHEL6-24-LINUX KERNEL -3


KERNEL TUNING:

Kernel Tuning via /proc/sys          Temporary
Kernel Tuning via sysctl             Temporary
Kernel Tuning via /etc/sysctl.conf   Permanent

Kernel Tuning via /proc/proc                Temporary

Monday 10 April 2017

RHEL6-23-LINUX KERNEL -2


RHEL6-23-LINUX KERNEL -2


KERNEL TUNING:

As we already know that “lsmod” is used to get the info about loaded modules.

LOADING KERNEL MODULES:

There are 2 ways to load the kernel modules, “insmod” and “modprobe”

“insmod” inserts a single module into the kernel, provided underlying dependencies are already loaded.

Sunday 9 April 2017

RHEL6-22-LINUX KERNEL -1


RHEL6-22-LINUX KERNEL -1

THE LINUX KERNEL:


The kernel is the central module of an operating system (OS). It is the part of the operating system that loads first, and it remains in main memory. Because it stays in memory, it is important for the kernel to be as small as possible while still providing all the essential services required by other parts of the operating system and applications. The kernel code is usually loaded into a protected area of memory to prevent it from being overwritten by programs or other parts of the operating system.
Typically, the kernel is responsible for memory management, process and task management, and disk management. The kernel connects the system hardware to the application software. Every operating system has a kernel. For example the Linux kernel is used numerous operating systems including Linux, FreeBSD, Android and others.

Wednesday 5 April 2017

RHEL6-21-LOGICAL VOLUME MANAGER (LVM)-8


RHEL6-21-LOGICAL VOLUME MANAGER (LVM)-8

LVM OPERATIONS:

VOLUME RE-LAYOUT:

How to know the volume layout (Linear, Mirrored and striped) of existing LV’s?
How to change a linear volume to mirrored volume in LVM?
How to change a stripe volume to linear volume in LVM?
How to change a mirror volume to linear volume in LVM?
How to change a linear volume to stripe volume in LVM?

Monday 3 April 2017

RHEL6-20-LOGICAL VOLUME MANAGER (LVM)-7


RHEL6-20-LOGICAL VOLUME MANAGER (LVM)-7


LVM OPERATIONS:


IMPORT & DEPORT OF VOLUME GROUP (VG):
LVM CONFIGURATION BACKUP & RESTORE:

How to do vgexport in linux?
How to do vgimport in linux?
How to move a volume group to another server in linux?
How to take backup of volume group (VG)?
What is LVM metadata?
How to restore volume group (VG)?
How to restore Logical volume group (LV) from VG backup?
Discuss various scenarios with volume group restore.

Sunday 2 April 2017

RHEL6-19-LOGICAL VOLUME MANAGER (LVM)-6


RHEL6-19-LOGICAL VOLUME MANAGER (LVM)-6


LVM OPERATIONS:

How to deactivate a VG?
How to activate a VG?
How to deactivate a LV?
How to activate a LV?
How to deactivate/activate a VG in cluster?
How to change the read/write permission of LV?
How to force a LV mirror for resync?

Saturday 1 April 2017

RHEL6-18-LOGICAL VOLUME MANAGER (LVM)-5


RHEL6-18-LOGICAL VOLUME MANAGER (LVM)-5


LVM OPERATIONS:

How to remove logical volume (LV)?
How to remove volume group (VG)?
How to remove physical volume (PV)?
How to free the disk by moving data to another disk in LVM?
How to remove the free/unused disk in LVM?

RHEL6-17-LOGICAL VOLUME MANAGER (LVM)-4


RHEL6-17-LOGICAL VOLUME MANAGER (LVM)-4


LVM OPERATIONS:

How to resize the logical volume with “lvresize”…?
How to rename the volume group (vgrename)…?
How to rename the logical volume (lvrename)…?
How to make the changes effective after vgrename and lvrename…?

Friday 31 March 2017

RHEL6-16-LOGICAL VOLUME MANAGER (LVM)-3


RHEL6-16-LOGICAL VOLUME MANAGER (LVM)-3

LVM OPERATIONS:

How to extend/increase volume group space?
“vgextend”
How to extend/increase logical volume space?
“lvextend”
How to reduce/decrease logical volume space?
“lvreduce”
How to reduce/decrease volume group space?
“vgreduce”


Wednesday 29 March 2017

RHEL6-15-LOGICAL VOLUME MANAGER (LVM)-2


RHEL6-15-LOGICAL VOLUME MANAGER (LVM)-2

DIFFERENT LV’S:
HOW TO USE THE LV:


DIFFERENT LV’S:
1) Linear Volume
2) Striped Volume
3) Mirrored Volume

[root@rhel6-client1 ~]# pvcreate /dev/sdc1 /dev/sdc2 /dev/sdc3
  Physical volume "/dev/sdc1" successfully created
  Physical volume "/dev/sdc2" successfully created
  Physical volume "/dev/sdc3" successfully created
[root@rhel6-client1 ~]# vgcreate myvg01 /dev/sdc1 /dev/sdc2 /dev/sdc3
  Volume group "myvg01" successfully created

RHEL6-14-LOGICAL VOLUME MANAGER (LVM)-1


RHEL6-14-LOGICAL VOLUME MANAGER (LVM)-1

CREATION:



RHEL6 - 13 - NETSTAT


       RHEL6-13-NETSTAT

The netstat "network statistics" command in Linux is a very useful tool when dealing with networking issues. This command displays information related to network connections, routing tables, interface statistics etc.

Ifconfig and netstat are not working in rhel6.
Which package is responsible for ifconfig and netstat.
How to list all connections via netstat?
How to list all connections (listening and non-listening ports) via netstat?
How to list only TCP & UDP connections via netstat?
How to list only listening ports via netstat?
How to list only listening TCP & UDP ports via netstat?
How to list statistics of all ports via netstat?
How to list statistics of tcp & udp ports via netstat?
How to list PID of programs using ports via netstat?
How to list PID of programs using ports (TCP & UDP) via netstat?
How to monitor continuous info via netstat?
How to list routing table via netstat?
How to list information related to all network interfaces via netstat?
How to list multicast group membership information via netstat?

Sunday 19 March 2017

VCS ON RHEL6–CONFIGURE & OPERATION-P8 (CLUSTER OPERATIONS)


VCS ON RHEL6–CONFIGURE & OPERATION-P8


CLUSTER OPERATIONS:

How to display info about cluster…?
How to check the state of cluster…?
How to list the existing cluster(s)…?
How to display the attribute value…?
How to check the status of cluster…?
How to add a cluster…?
How to delete a cluster…?
How to modify a cluster attribute…?
How to start a cluster…?
How to stop a cluster…?
How to know the status summary of cluster(s)…?
How to know the vcs version…?

VCS ON RHEL6–CONFIGURE & OPERATION-P7 (RESOURCES)


VCS ON RHEL6–CONFIGURE & OPERATION-P7

RESOURCES:

·         How to list the available resources in vcs?
·         How to online/offline a resource in vcs?
·         How to display the attributes/parameters of a resource in vcs?
·         How to change the attribute value of a resource in vcs?
·         How to show the state of a resource in vcs?
·         How to list dependency of a resource in vcs?
·         How to online/offline resources in vcs?
·         How to Clearing a resource (automatically initiates the online) in vcs?
·         How to probe a resource in vcs?
·         How to Offline a resource and propagate the command to its children in vcs?

VCS ON RHEL6–CONFIGURE & OPERATION-P6 (SERVICE GROUP)


VCS ON RHEL6–CONFIGURE & OPERATION-P6


SERVICE GROUP:

·         How to list the available SG's…?
·         What is the name of SG / how many SG’s ?
·         How to check the contained resources of a SG…?
·         How to switch a SG…?
·         How to online/offline a SG…?
·         How to freeze/unfreeze a SG…?
·         How to enable/disable a SG…?
·         How to flush a SG…?
·         How to display the attributes/parameters of a SG…?
·         How to show the state of a SG…?
·         How to list dependency of a SG…?
·         How to enable/disable all resources in one go of a SG…?
·         How to check the attribute value of a SG…?
·         How to clear a faulted non-persistent resource of a SG…?

VCS ON RHEL6–CONFIGURE & OPERATION-P5 (APACHE VIA CLI)


VCS ON RHEL6–CONFIGURE & OPERATION-P5


ONLINE CONFIGURATION THROUGH CLI:

First open the config,

[root@pr01 /]# haconf -makerw

SERVICE GROUP CONFIGURATION:

[root@pr01 ~]# hagrp -add Web-App
VCS NOTICE V-16-1-10136 Group added; populating SystemList and setting the Parallel attribute recommended before adding resources

VCS ON RHEL6–CONFIGURE & OPERATION-P4


VCS ON RHEL6–CONFIGURE & OPERATION-P4


ONLINE/OFFLINE SERVICE GROUP:
SWITCHING SERVICE GROUP:
RESOURCE ONLINE:
RESOURCE OFFLINE:
STOP VCS:
START VCS:
VCS CONFIGURATION:
ONLINE CONFIG:
OFFLINE CONFIG:
CONFIG EDITING/NEW CREATION:
What if we forget to save and shutdown the VCS
AUTOMATIC CONFIG BACKUP:

VCS ON RHEL6–CONFIGURE & OPERATION-P3


VCS ON RHEL6–CONFIGURE & OPERATION-P3

BASIC VCS OPERATION:

How to check the cluster status?
How to check the vcs logs?
How to check the resource and attributes?
How to check the service group and contained resources?
How to check resources & attributes?
how do I know that how many service groups are in cluster?
how do I know that how many resources a SG have?
How to know the details about a particular resource…?
CRITICAL & NON CRITICAL RESOURCES:
How to know the state (online/offline) of resources…?
How to know the virtual ip address configured with SG…?
How to know the SG is frozen or not…?
How to know that Autostart is set for an SG is or not…?