Friday 18 August 2017

Installing and Configuring Linux LVM with Multipath simple Steps

Configuring Multipath Linux LVM Steps.


#To Install Multipath supportable RPM's
yum install -y device-mapper-multipath*

#Generate Sample Multipath Configuration
mpathconf --enable --user_friendly_names y

#Start Multipathd Services
systemctl start multipathd.service

#To Check Netapp SAN LUN Disks and Paths
sanlun lun show -p

# Configure Multipath Alias
vim /etc/multipath.conf

#check the Status of Configured Alias reflected 
multipath -v2

# List Created Disk Paths
ls -al /dev/mapper/

#Create Linux LVm Partition
fdisk /dev/mapper/DATA-DISK

#Add Mapping to Partition
kpartx -a /dev/mapper/DATA-DISK

#Create Physical Volume
pvcreate /dev/mapper/DATA-DISKp1

#Create Volume Group
vgcreate ATE-PROD /dev/mpath/DATA-DISKp1 /dev/mpath/DATA-DISKp1

#Create LV with 100% Free Space
lvcreate -n U03 -l 100%FREE DATAVG

#File System Creation in Newly Created LVM
mkfs -t ext3 /dev/DATAVG/U03

#Mount Permanently using fstab Entry
vi /etc/fstab

/dev/DATAVG/U03  /u03    ext3    defaults        1 2

Monday 31 July 2017

Java Update Guide Centos 7 / RHEL 7

Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to data centers, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!

# java -version
java version "1.7.0_141"
OpenJDK Runtime Environment (rhel-2.6.10.1.el7_3-x86_64 u141-b02)
OpenJDK 64-Bit Server VM (build 24.141-b02, mixed mode)

32 Bit Java Download Link
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-i586.tar.gz"

64 Java Download Linux
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz"

# du -sh jdk-8u144-linux-x64.tar.gz
177M    jdk-8u144-linux-x64.tar.gz
# tar -xvf jdk-8u144-linux-x64.tar.gz


[root@Arkit-Serv java]# update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_144/bin/java 100
[root@Arkit-Serv java]# update-alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.141-2.6.10.1.el7_3.x86_64/jre/bin/java)
   2           /usr/java/jdk1.8.0_144/jre/bin/java
   3           /opt/java/jdk1.8.0_144/bin/java

Enter to keep the current selection[+], or type selection number: 3


[root@Arkit-Serv java]# export JAVA_HOME=/opt/java/jdk1.8.0_144/
[root@Arkit-Serv java]# export JRE_HOME=/opt/java/jdk1.8.0_144/jre
[root@Arkit-Serv java]# export PATH=$PATH:/opt/java/jdk1.8.0_144/bin:/opt/java/jdk1.8.0_144/jre/bin

# java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

That's it Java Updated.

Monday 24 July 2017

Free Python Programming E-Books Download

Download and Learn 3 Python Programming Books Completely Free

  1. Drive Into Python – Written by Mark Pilgrim Download Now
  2. Learning Python – Written by Fabrizio Romano Download Now
  3. Python Cook Book – Written by Sebastian Download Now

Of course you have to fill Details and Click Download you will get to your Email Directly.

Just Spending one Minute of time instead of paying a few dollars of money

Best of Luck Learn Python Programming Freely with your own learning curve



Thursday 20 July 2017

Failed To Load SELINUX policy. Freezing error after reboot on Centos 7/RHEL7?

system[1]: Failed to load SELinux policy. Freezing error after reboot on Centos 7/RHEL7?

 Most of the time you will get this error "while resetting the root password". That means you are not correctly reset the root password (or) mismatch words in the "touch /.autorelabel" command.

"touch /.autorelabel" -->  create an hidden file under the slash which means SELinux will automatically relabel the SELinux policy when server is booting

SELinux Load Error



1) Reboot your machine
2) Loading boot menu then press key to stop the boot menu, edit(press 'e') kernel line.

Change String SELInux

3) Goto "linux16" word and append the word "selinux=0".
4) reboot the server.


That't it.

Installing nagios core got error - Resolution

While installing nagios core got error make all command on RHEL7/centos 7:

while installing nagios core on RHEL7  got the issue that is "(cd angularjs && unzip -u angular-1.3.9.zip),/bin/sh: unzip: command not found". The error occur after enter the command make all . On my server have already installed gcc so the error was coming from some other dependency requirement.

[root@serverx nagios-4.1.1]# make all
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagiostats nagiostats.c  -lm  ../lib/libnagios.a
make[1]: Leaving directory `/tmp/nagios-4.1.1/base'
cd ./cgi && make
make[1]: Entering directory `/tmp/nagios-4.1.1/cgi'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/nagios-4.1.1/cgi'
cd ./html && make
make[1]: Entering directory `/tmp/nagios-4.1.1/html'
(cd angularjs && unzip -u angular-1.3.9.zip)
/bin/sh: unzip: command not found
make[1]: * [all] Error 127
make[1]: Leaving directory `/tmp/nagios-4.1.1/html'
make: * [all] Error 2
[root@serverx nagios-4.1.1]#


Observed the above error i.e "unzip command not fund", Installed the unzip package by following below command

# yum install -y unzip

After installed the unzip package, rerun the configure command issue has been resolved.


That's it.

Saturday 25 February 2017

RHEL7 installation Kickstart File

I have made Kickstart (Auto Answer File) Using Kcikstart configuration generator tool with LVM partitioning included

[root@ArkIT ~]#cat ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'# Reboot after installation
reboot
# Root password
rootpw --iscrypted $1$tS7oWXXF$X.HS5njtcfPpxHgW9pFtX.
# System timezone
timezone Africa/Abidjan
# Use network installation
url --url="http://192.168.4.27/rhel7"
# System language
lang en_US
# Firewall configuration
firewall --disabled
# Network information
network  --bootproto=dhcp --device=eth0
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
# SELinux configuration
selinux --disabled

# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
volgroup rhel --pesize=4096 PV0
part PV0 --fstype=lvmpv --ondisk=sda --size=50000
part /boot --fstype=xfs --size=500
logvol / --vgname=rhel --name=root --fstype=xfs --size=10000
logvol /var --vgname=rhel --name=var --fstype=xfs --size=8000
logvol swap --vgname=rhel --name=swap --fstype=swap --size=8000
logvol /home --vgname=rhel --name=home --fstype=xfs --size=7000
logvol /usr --vgname=rhel --name=usr --fstype=xfs --size=7000

%packages
@base
@core
@desktop-debugging
@dial-up
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@mariadb
@multimedia
@print-client
@x11
kexec-tools

%end

%post
useradd ravi
echo password | passwd ravi
%end

Thursday 19 January 2017

A Major Difference Between RHEL 6 vs RHEL 7 Here you go

RHEL 7 vs RHEL 6

Red Hat Enterprise Linux 7 is an Light weight and minimized Operating system. RHEL 7 changes are huge effect to enterprise.

Let's see what changed in RHEL 7 as per administration prospective.

  • First one is Anaconda Installer Completely new.
  • Grub version updated from 0.97 to Grub 2 fast booting
  • Procedure of bypassing root password at booting process completely different than RHEL 6/5 
  • There is no SysV Initd in RHEL 7 it's an new Systemd
  • Run Levels are changed to Targets.
  • Default file system in RHEL 7 is XFS. XFS file system supports 550TB of each partition size in 64-bit.
  • Directories /bin /sbin /lib and /lib64 are moved under /usr/
  • Network Interface Names are changed from eth0 to ens.xxx
  • New concept to create multiple profiles top of one Ethernet card, No need of changing IP addresses and settings every time when you connect different networks, simply activate different profile.
  • GNOME version changed from 2 to 3
  • No classic registration system, completely changed to Red Hat subscription Manager
  • Default database is MariaDB instead of MySQL
  • Cluster Manager has been changed to Pacemaker and Corosync
  • Ifconfig command is deprecated, replaced with ip command
  •  User Identification Numbers (UID's) changed from 500 to 1000, which means when you create new normal user in RHEL 7 will get UID from 1000 to 65534
  • locate command is changed to mlocate
  •  yum commands are changed little bit

 
Feature Name RHEL 6  RHEL 7
Default File System Ext4 XFS
Kernel Version 2.6.xx 3.10.xx
Release Name Santiago Maipo
Gnome Version GNOME 2 GNOME 3.8
KDE Version 4.6 4.1
Release Date 10-Nov-10 10-Jun-14
NFS Version NFS 4 NFS 4.1. NFS V2 is deprecated in RHEL 7
Samba Version 3.6 4.4
Default Database MariaDB MySQL
Cluster Resource Manager Rgmanager Pacemaker
Network Grouping Team Driver will support multiple types of Teaming methods called Active-Backup, Load-balancing and Broadcase Bonding can be done as Active-Backup, XOR, IEEE and Loac Balancing
KDUMP RHEL 7 can be supported up to 3TB Kdump does't support with large RAM Size
Boot Loader Grub 2
/boot/grub2/grub.cfg
Grub 0.97
 /boot/grub/grub.conf
File System Check xfs_replair
- Inode blockmap checks
-Inode allocation map checks
-Inode size check
-Directory check
-Path Name check
-Link count check
-Freemap check
-Super block check
e2fsck
-Inode check. Block and size check
--Directory Structure check
-Directory Link Check
-reference count check
-Group Summary Check
Process ID Systemd (1) Initd (1)
Port Security Firewalld instead of iptables. Iptables can also support with RHEL 7, but we can't use both of them at the same time. Firewall will not allow any port until and unless you enabled it. iptables by default service port is enabled when service is switched on.
Boot Time 40 Sec 20 Sec
File System Size EXT4 16TB with XFS 100TB XFS 500TB with EXT4 16TB
Processor Architecture 32Bit and 64Bit Only 64Bit.
Network Configuration Tool steup nmtui
Hostname Config File /etc/sysconfig/network /etc/hostname No need to edit hostname file to write permanent hostname simply use hostnamectl command
Interface Name eth0 ens33xxx
Managing Services service sshd start
service sshd restart
chkconfig sshd on
systemctl start sshd.service
systemctl restart sshd.service
systemctl enable sshd.service
System Logs /var/log/ /var/log
journalctl
Run Levels runlevel 0 - Power Off
runlevel 1 - Single User Mode
runlevel 2 - Multi User without Networking
runlevel 3 - Multi User CLI
runlevel 4 - Not USed
runlevel 5 - GUI Mode
runlevel 6 - Restart
There is no run levels in RHEL 6. Run levels are called as targets
Poweroff.target
rescue.target
multi-user.target
graphical.target
reboot.target
UID Information Normal User UID will start from 500 to 65534
System Users UID will start from 1 to 499
Normal User UID start from 1000 - 65534
System Users UID will start from 1 to 999

Because Services are increased compare to RHEL 6
By Pass Root Password Prompt append 1 or s or init=/bin/bash to Kernel command line Append rd.break or init=/bin/bash to kernel command line
Rebooting and Poweroff poweroff - init 0
reboot - init 6
systemctl poweroff
systemctl reboot
YUM Commands yum groupinstall
yum groupinfo
yum group install
yum group info

Thanks, please provide your valuable feedback on the same.