November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Install Java 1.8 and tomcat 8 on Redhat 7 centos 7

mkdir software

64 BIT # 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/8u40-b25/jdk-8u40-linux-x64.tar.gz”

# tar xzf jdk-8u40-linux-x64.tar.gz 32 BIT # 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/8u40-b25/jdk-8u40-linux-i586.tar.gz”

 

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/8u60-b27/jdk-8u60-linux-x64.tar.gz”

 

# tar xzf jdk-8u40-linux-i586.tar.gz mkdir /usr/java/

cd /usr/java/jdk1.8.0_40/ [root@cluster1 java]# ln -s /usr/java/jdk1.8.0_40/bin/java /usr/bin/java [root@cluster1 java]# alternatives […]

How to mount inactive LVM partitions

Cause This situation occurs because the same UUID is attached to each LVM disk. Any LVM command, such as pvscan or lvscan, fails because of that error. You can find more details about Bug 454645 ” Bringing a snapshot of an LVM on-line on the same system” here: https://bugzilla.redhat.com/show_bug.cgi?id=454645 This situation can also occur when […]

Linux cluster commands

Linux cluster commands

Checking status of the cluster: # clustat # clustat -m Display status of and exit # clustat -s Display status of and exit # clustat -l Use long format for services

# cman_tool status Show local record of cluster status # cman_tool nodes Show local record of cluster nodes # cman_tool nodes […]

DD command

* Example use of dd command to create an ISO disk image from a CD-ROM: dd if=/dev/cdrom of=/home/sam/myCD.iso bs=2048 conv=sync

*Using dd to wipe an entire disk with random data: dd if=/dev/urandom of=/dev/hda

*Using dd to clone a hard disk to another hard disk: dd if=/dev/ad0 of=/dev/ad1 bs=1M conv=noerror

*Duplicate a disk partition as a […]

LINUX COMPLETE GUIDE WITH SHELL TIPS

SYSTEM

Hardware | Statistics | Users | Limits | Runlevels | root password | Compile kernel | Repair grub | Misc

Running kernel and system information # uname -a # Get the kernel version (and BSD version) # lsb_release -a # Full release info of any LSB distribution # cat /etc/SuSE-release # Get SuSE version […]

maximum-number-of-file-descriptors-rhel-centos

cat /proc/sys/fs/file-max 589420 The output tells us it is set to 589420. The vendor asked for this to be increased to 1639200. We can add change the value immediately by executing: # sysctl -w fs.file-max=1639200 To make this a permanent setting applied everytime the system reboots an edit of /etc/sysctl.conf file is required. Add: fs.file-max […]

LVM Linux

Logical Volume Manager

Page Contents

•Gathering Information •Creating and Moving Volume Groups •?Partition The Disk ?Initialise The Physical Volumes ?Add the PVs to a Volume Group ?Add Logical Volumes to the Volume Group ?Add Filesystems to the Logical Volumes

• •Migrating a Volume Group to Another System •Reducing the Size of a Logical Volume •Extending […]

FIND usage

find / -type f -name *.jpg -exec cp {} . \; find /dir -type f -size 0 -print find . -type f -size +10000 -exec ls -al {} \; find /var/nmon -mtime +30 | xargs -i rm {} find /var/nmon -mtime +1 -exec gzip -9 {} \; find . -atime +1 -type f -exec mv […]

LOAD THE CPU AND MEMORY ON Linux

tar zxvf stress-1.0.4.tar.gz

cd stress-1.0.4

./configure make && make install

stress -m 512M

To start stress run stress followed by the -c flag for load stress, -m for memory stress, -i for io and -d for HDD. For example to stress cpu execute

TO LOAD THE CPU AND MEMORY ON Linux

stress […]

Disk Performance iostat

Use iostat to get the performance data # iostat -x

Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util sda 0.48 2.76 1.90 0.92 56.44 29.40 30.53 0.01 4.48 2.46 0.69

Work out the queue length requests * average wait time / 1000 = queue length ((1.90+0.92) * 4.48) / 1000 = […]