LINUX

Installing Java in Linux using rpm

1)Download the rpm from oracle website.[http://java.com/en/download/manual.jsp ]

2) Make the file executable by running the command: 
chmod a + x jre-7u3-linux-i586-rpm.bin

3) Install the package using the command: 
./jre-7u3-linux-i586-rpm.bin

4) To list the installed jre rpm packages run the command: 
rpm -qa | grep jre

How to find if processor is 64 bit / 32 bit:

getconf LONG_BIT

Finally run command to get all CPU related info: less /proc/cpuinfo

Opening port 8080 on linux machine

iptables -I INPUT -p tcp -i eth3 5 --dport 8080 -m state --state NEW, ESTABLISHED -j ACCEPT

To the list with iptables interface options

iptables --line -vnL

Add swap partition

# mkswap /dev/sde1
# swapon /dev/sde1
Cat # /etc/ fstab
/dev/sde1 swap swap defaults 0 0

Add swap file

# dd if =/dev/ zero of =/root /swapfile bs=1M count=1024
1024 + 0 records in
1024 + 0 records out

# chmod 600 / root / swapfile


# mkswap / root / myswapfile

Setting up swapspace version 1, size = 1073737 kB

# swapon / root / myswapfile

To add multicast route in linux

ip route add 224.0.0.0/4 dev eth0


Error while running yum on redhat linux


error was [Errno 14] Peer cert cannot be verified or peer cert invalid

[root@sys-169 ~]# yum install ksh tftp glibc-devel.i686 openssl-devel.i686 openssl-devel.x86_64 pam-devel.i686 elfutils-libelf-devel.i686 zlib-devel.i686
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Error: failed to retrieve repodata/d7257e7aaddef9a047c8b51bd3653b4afd79db9605b6ec7fcea0c23a1f76b7da-primary.xml.gz from rhel-x86_64-server-6.6.z
error was [Errno 14] Peer cert cannot be verified or peer cert invalid
You have new mail in /var/spool/mail/root
[root@sys-169 ~]# 

Workaround: 
Disable SSL for downloads : update useNoSSLForPackages value in /etc/sysconfig/rhn/up2date from 0 to 1


How to install packages using CD in linux.

   
Mount the install DVD:
mkdir -p /mnt/RHEL
mount /dev/cdrom /mnt/RHEL
Or if you just have the ISO, you can use that instead:
mkdir -p /mnt/RHEL
mount -o loop /path/to/RHEL.iso /mnt/RHEL
Now make a Yum repository which uses the DVD as a repository:
/etc/yum.repos.d/rhel-dvd.repo
[rhel-dvd]
name=Red Hat Enterprise Linux $releasever - $basearch - DVD
baseurl=file:///mnt/RHEL/Server/enabled=1
gpgcheck=0
You should now be able to clean the yum cache, and install the 32-bit C library:
yum clean all
yum install glibc.i686
You'll see plenty of similar guides telling you to install and run the createrepo command but you don't need to do that. The RHEL disc already is a repository, it already has the /repodata/repomd.xml file which defines a repository.
However, if you take the RPM files on the RHEL disc and copy them somewhere else and start adding your own packages then you need createrepo to build the metadata for the new repository you have created.

Source: http://stackoverflow.com/questions/15435751/installing-32-bit-libraries-glibc-on-64-bit-rhel-without-using-yum


Adding normal distributed delay on a port in linux

tc qdisc change dev eth3 root netem delay 40ms 24ms distribution normal
tc qdisc change dev eth4 root netem delay 15ms 10ms distribution normal



Comments

Popular posts from this blog

vmWare - Vcenter Server Appliance 5.5 - embedded DB problem

Installing Pytest on Windows Platform

Shell Scripting