Shell Scripting

Sunday, October 14, 2018

HOW TO MAKE A CAT 6 PATCH CABLE

Step 1
Cut the cable to the length needed.

Step 2
Strip back the cable jacket approximately 1 inch.
Use the cutter provided with the crimping tool or strip by hand.

Be careful not to nick the individual wires.









Step 3
Un-twist each of the 4 pairs and straighten each wire as much as possible between the fingers.

Step 4
Use the 568-B wiring scheme on both ends for a standard patch cable.
We can use straight through or cross over cable.

Step 5
Bring all of the wires together as closely as possible.
Hold the grouped (and sorted) wires together tightly between the thumb, and the forefinger.
Cut all of the wires at a perfect 90 degree angle from the cable,
1/2 inch from the end of the cable jacket.
Use a sharp cutting tool so as not to "squash" the wire ends.

Thursday, June 29, 2017

How to write "FORM OF AGREEMENT FOR APPRENTICE" for RRB Appointment

While doing notary for Apprentice Agreement form, we need to take care following steps

1. Stamp duty amount 20 is enough
2. 6 witnesses sign
3. Affidavit
4. Notary

Wednesday, May 17, 2017

How to install Oracle database 11g rpm file in Linux

Installing software on Ubuntu usually entails using Synaptic or by using an apt-get command from the terminal. Unfortunately, there are still a number of packages out there that are only distributed in RPM format.
There’s a utility called Alien that converts packages from one format to the other. This doesn’t always mean that an rpm will work on your system, though. You will need to install some prerequisite software packages in order to install alien, however. These packages include gcc and make.
1. Run this command to install alien and other necessary packages:
sudo apt-get install alien dpkg-dev debhelper build-essential

2. Convert RPM package format to DEB package format (that is used by Ubuntu) using the command:

$ sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm
oracle-xe_11.2.0-2_amd64.deb generated
3. Create the required chkconfig script using the command:
sudo pico /sbin/chkconfig
The pico text editor is started and the commands are shown at the bottom of the screen. Now copy and paste the following into the file and save:
#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Ubuntu
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
    echo >> $file
    echo '### BEGIN INIT INFO' >> $file
    echo '# Provides: OracleXE' >> $file
    echo '# Required-Start: $remote_fs $syslog' >> $file
    echo '# Required-Stop: $remote_fs $syslog' >> $file
    echo '# Default-Start: 2 3 4 5' >> $file
    echo '# Default-Stop: 0 1 6' >> $file
    echo '# Short-Description: Oracle 11g Express Edition' >> $file
    echo '### END INIT INFO' >> $file
fi
update-rc.d oracle-xe defaults 80 01
Note: In pico editor, Ctrl+o to save, ctrl+x to exit
4. Change the permission of the chkconfig file using the command:
sudo chmod 755 /sbin/chkconfig  
5. Set kernel parameters. Oracle 11gR2 XE requires additional kernel parameters which you need to set using the command:
sudo pico /etc/sysctl.d/60-oracle.conf
6. Copy the following into the file and save:
# Oracle 11g XE kernel parameters 
fs.file-max=6815744  
net.ipv4.ip_local_port_range=9000 65000  
kernel.sem=250 32000 100 128 
kernel.shmmax=536870912
7. Verify the change using the command:
sudo cat /etc/sysctl.d/60-oracle.conf 
8.You should see what you entered earlier. Now load the kernel parameters:
sudo service procps start
output: procps stop/waiting
9.Verify the new parameters are loaded using:
sudo sysctl -q fs.file-max
output: fs.file-max = 6815744
You should see the file-max value that you entered earlier.
10. Set up /dev/shm mount point for Oracle. Create the following file using the command:
sudo pico /etc/rc2.d/S01shm_load
11. Copy the following into the file and save.
#!/bin/sh
case "$1" in
start)
    mkdir /var/lock/subsys 2>/dev/null
    touch /var/lock/subsys/listener
    rm /dev/shm 2>/dev/null
    mkdir /dev/shm 2>/dev/null
*)
    echo error
    exit 1
    ;;

esac
12. Change the permissions of the file using the command:
sudo chmod 755 /etc/rc2.d/S01shm_load
13. Now execute the following commands:
sudo ln -s /usr/bin/awk /bin/awk 
sudo mkdir /var/lock/subsys 
sudo touch /var/lock/subsys/listener
Now, Reboot Your System








Sunday, April 2, 2017

Monday, October 12, 2015

How to Set a Static IP in Ubuntu 14.04

By default the Ubuntu 14.04 server sets the interface to use DHCP, here’s how to set a static IP address.

Edit “/etc/network/interfaces”.  In this example set-up we’ll use 192.168.10.207 as our server IP address:

$sudo nano /etc/network/interfaces

To find out an ipadress in Linux
Ifconfig eth0 | grep "inet addr:"
Sample o/p: inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0

How to download youtube videos in Ubuntu

You can install youtube-dl and use it to download YouTube videos.

 sudo apt-get install youtube-dl

 youtube-dl https://www.youtube.com/watch?v=TA1MSeWA6Wk

Install weblogic in 64 bit mode

Use below command to install weblogic in 64 bit mode
 
java -d64 -jar wlsversion_generic.jar -mode=console