ORACLE 10G MANUAL INSTALATION IN REDHAT LINUX

April 9, 2010

ORACLE 10G MANUAL INSTALATION IN RHEL5

* Normal Installation with your rhel5 dvd Partition:
 
Partition    SIZE
/    10 GB
/boot    100 MB
swap    2GB
/oracle    20GB
/var    20GB

* Selecting packages:

Do not select any packages.
Complete the general installation

* Check whether the packages listed below is installed:

# yum list
            elinks
            openssh
            openssh-server
            openssh-clients
            vim-enhanced
            samba-common
            samba-client
            gimp
            gimp-data-extras
            enscript
            libcap
            ntp
            coreutils
            elfutils
            elfutils-libelf
            gimp-print-plugin
            gnome-icon-theme
            gstreamer
            gstreamer-tools
            libgnomeprint22
            libgnomeprintui22
            libgsf
            libIDL
            libraw1394
            nautilus-cd-burner
            openmotif
            pyorbit
            startup-notification
            ttmkfdir
            firefox
            mutt
            libXp
            compat-libstdc++-33

* Install the missing packages:

# yum install packagename

* Kernel parameter settings:

(copy and paste the below comming lines in a terminal)
perl -pi -e ‘s/^kernel\.shmmax.*/kernel\.shmmax = 2147483648/’ /etc/sysctl.conf
cat >> /etc/sysctl.conf <<END
kernel.shmall = 268435456
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
END
1. Reboot
2. Login as root
3. Cmd # sysctl –p

* User Creation Details:

groupadd dba
useradd -g dba oracle
echo oracle | passwd –stdin oracle

* Default DataBase Path Details:
echo ‘export ORACLE_BASE=/oracle’ >> /home/oracle/.bashrc
echo ‘export ORACLE_HOME=/oracle/ora10g’  >> /home/oracle/.bashrc
echo ‘export PATH=/usr/bin:/bin:/usr/local/bin:/usr/bin/X11:/usr/bin/X11R6:$ORACLE_HOME/bin’  >> /home/oracle/.bashrc
echo ‘export PATH’  >> /home/oracle/.bashrc
echo ‘LANG=en_US’  >> /home/oracle/.bashrc
echo ‘export LANG’  >> /home/oracle/.bashrc
echo ‘LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib’  >> /home/oracle/.bashrc
echo ‘LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/i386:$ORACLE_HOME/jdk/jre/lib/i386/server:$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib:$LD_LIBRARY_PATH’  >> /home/oracle/.bashrc
echo ‘export LD_LIBRARY_PATH’  >> /home/oracle/.bashrc
echo redhat-4 > /etc/redhat-release
* Directory Permission Details:

mkdir /oracle/ora10g
chown -R oracle.dba /oracle
chmod -R 775 /oracle

* Patch File Details

rpm -ivh –replacepkgs jdk-1_5_0_06-linux-i586.rpm
rpm -iv –force –nodeps gnome-libs-1.4.2-5.el5.kb.i386.rpm

* Installation Details

1. Reboot the system
2. Login as oracle user
3. ./runinstaller

*****************************END****************************

April 9, 2010

Usage of AJAX Framework SAJAX

January 18, 2010

Small example for the usage of sajax . It is explained according to the

function flow

step 1.) Calling javascript function using button (CLIENT SIDE)

<input class=”button” name=”test” value=”Test” type=”test”>

onclick=ajax_test();>

step 2.) Function definition … Here it calls server function which is named as “loading” … (CLIENT SIDE)

function ajax_test()
{
alert (”sdsdf”)
x_loading(ajax_test_diaplay)
}

Note: Here ajax_test_display is a function which will handle the
returned result

step 3.) PHP Coding .. (SERVER SIDE) (you should include Sajax2.php file)

function loading()
{
return (”balavignesh”);
}
sajax_export(”loading”);

step 4.) Displaying the result (CLIENT SIDE)

function ajax_test_diaplay(ret_value)
{
alert (ret_value)
}

Finding a File containing a particular text string in Linux server

January 18, 2010

grep command form (syntax)

grep “text string to search” directory-path

Examples

For example search for a string called redeem reward in all text files located in /home/tom/*.txt directory, use
$ grep "redeem reward" /home/tom/*.txt

Task: Search all subdirectories recursively

You can search for a text string all files under each directory, recursively with -roption:
$ grep -r "redeem reward" /home/tom

Task: Only print filenames

By default, grep command prints the matching lines You can pass -H option to print the filename for each match.
$ grep -H -r “redeem reward” /home/tom
Output:

...
filename.txt: redeem reward
...

To just print the filename use cut command as follows:
$ grep -H vivek /etc/* -R | cut -d: -f1
Output:

...<br />filename.txt<br />...

Postgres Database Creation

January 18, 2010

To create a database with a user that have full rights on the database, use the following command:

Adding new Database user in Postgres

sudo -u postgres createuser -D -A -P mynewuser

Creating new database in Postgres and adding user to the database

sudo -u postgres createdb -O mynewuser mydatabase

Entering into pgsql of solarplm – psql -h solarplm -U plmuser inelplm

Postgresql database default mode – sudo -u postgres psql template1

Postgres Database Backup

January 18, 2010

Database dump – sudo pg_dump -d inelplm_tmp -h solarplm -U plmuser -f inel_tmp.sql   

Granting all permission to database

             grant all on cookbook2_development.* to ‘ODBC’@’localhost’;

Procedure for Formatting pen drive in Linux

January 18, 2010


Procedure for Formatting pen drive

    Check wheather the drive is mounted using command : mount

   
    Unmount the drive : sudo umount /media/disk

    Change the file system : sudo mkfs.vfat /media/disk

    Check the disk information : df -h

    Reomove the drive safely using : sync

===========================================================

Formatting pen drive   

Look for pen drive – sudo fdisk -l

Disk /dev/sda: 2063 MB, 2063597056 bytes

Give fdisk – sudo fdisk /dev/sda

For new partiion – n

Give primary partion – p

General Linux Command

January 18, 2010

pwd –  Print working directory

hostname –  Print the name of the local host

whoami –  Print my login name.

id username –  Print user id (uid) and his/her group id (gid), effective id (if different than the real id) and the supplementary groups.

finger user_name –  System info about a user

last –  Show listing of users last logged-in on your system

history | more –  Show the last (1000 or so) commands executed from the command line on the current account.

uptime –  Show the amount of time since the last reboot.

ps axu | more –  List all the processes currently running, even those without the controlling terminal, together with the name of the user that owns each process.

top –  Keep listing the currently running processes on my computer, sorted by cpu usage (top processes first). Press c when done.

uname -a – = “Unix name” with option “all”) Info on your (local) server.

cat /etc/issue –  Check what distribution you are using. You can put your own message in this text file–it’s displayed on login.

free –  Memory info (in kilobytes). “Shared” memory is the memory that can be shared between processes

df -h –  (=disk free) Print disk info about all the filesystems (in human-readable form).

du / -bh | more –  (=disk usage) Print detailed disk usage for each subdirectory starting at the “/” (root) directory (in human legible form).

cat /proc/interrupts –  List the interrupts in use. May need to find out before setting up new hardware.

cat /proc/version –  Linux version and other info.

cat /proc/filesystems –  Show the types of filesystems currently in use.

lsmod –  (= “list modules”. As root. Use /sbin/lsmod to execute this command when you are a non-root user.) Show the kernel modules currently loaded.

set|more –  Show the current user environment (in full). Normally too much to bother.

chage -l my_login_name –  See my password expiry information.

Frequently Used Ubuntu – Linux Command

January 18, 2010

Installing librarys into ubuntu – sudo apt-get install libapache2-mod-auth-mysql

Service starting  – sudo /etc/init.d/apache2 start

Searching for packages – sudo apt-cache search quanat

Updating packages – sudo apt-get update

Host name setting – vim /etc/resolv.conf

Setting host name –   sudo vim /etc/hostname

Editing apache for perl configuration – vi /etc/apache2/sites-enabled/000-default

              Change the sript to 

                            ScriptAlias /cgi-bin/ /var/www/html/cgi-bin/

Reconfiguring apache service – sudo dpkg-reconfigure apache2

Copy one file to other – sudo cp hello.pl hello.cgi

To start swap partition – sudo swapon /swapfile

To start mysql – sudo ./mysql start

Enter into mysql prompt –  mysql -u root

UnTar file to install – tar xvzf install_flash_player_9_linux.tar.gz

Install a file form current directory – ./flashplayer-installer

Copy a file to other meachine – scp flashplayer username@192.9.204.18:/home/anbu/Desktop

Install deb file to ubuntu –  sudo dpkg -i libflashsupport_1.0~2219-1_i386.deb

Installed ubuntu packages will recide in – /var/cache/apt/archives

Count list of files in folder – ls -lh | wc -l
   
To Load apt from cdrom – sudo apt-cdrom add

To look for verison for particular package – dpkg -l packagename

Remove a file recursively – find . -type f -name “FILE-TO-FIND” -exec rm -f {} \;

anbu@mars:~/.mozilla-thunderbird/8zjcfz9w.default$ cp -R Mail/ /home/anbu/.thunderbird/kjxqx2or.default/

To view graph in php we should install the plugin called graphviz – sudo apt-get install graphviz

To view php error file at inelplm project  – tail -f /var/www/html/inel/logs/phperrors

========================================

Cvs update

 Exporting path to /etc/profile

 Example – export CVSROTT=”; ————-“
           export EDITOR-“————“

echo $CVSROOT

Login to CVS

       Command – cvs login

Checking out project command – cvs co

Changing mode to all file – find -type f -exec chmod 666 {} ‘;’
Changing mode to all Folder – find -type d -exec chmod 777 {} ‘;’

=====================================================

Command to romove directory – sudo rm -rf folder name

Change owner ship – sudo chown -R www-data foldername

Configuration to connect with localnetwork system domain update the file –  vim /etc/resolv.conf (e.g search solarsys.com)

Local server domain conifguration – vim /etc/hosts (e.g 192.9.206.17 ltvsmailnet)

List all services at localhost – nmap localhost


Birthday for DebianFrequently Used Ubuntu – Linux Command

January 18, 2010