Thursday, February 23, 2012

What is www3,www2,www1?

What is WWW3 or WWW2 or WWW1?

We all know that “WWW” stands for World Wide Web, which is a kind of prefix before normal domain name. Web created around 1990 in Geneva, Switzerland. But what is WWW1 or WWW2?
You must noticed www1 or www2 once in a while when you are visiting a website. WWW1, WWW2 or even WWW3 is nothing but a mirror of the original web server which is typical WWW. Many websites like government, banks even major search engines like Google(www1.google.com or www2.google.com) and Yahoo(www1.yahoo.com or www2.yahoo.com)! uses www1 and www2. The main purpose of this techniques is to reduce server load. Sometimes the original server need to be updated or modified but major websites like .gov, .edu, google.com, yahoo.com cannot just shut their main server down for hours to update their system. Therefore, they need to use www1 or www2 duplication of their mainframe server.
Sometimes this different servers used for the serving users based on their geographical location. Suppose, if someone type www.google.com form US, they might be taken to the original google server which means www.google.com but if someone type www.google.com from Africa, it might take them to www2.google.com or www1.google.com.

Friday, February 17, 2012

Oracle 11g installation on rhel5

Oracle 11g installation on RHEL 5.


Oracle 11g requires at least 1GB RAM
#grep MemTotal   /proc/meminfo
MemTotal:          1027144 kb
#grep SwapTotal  /proc/meminfo
SwapTotal:          1052216 Kb

  • We need  at least 400MB free space in  /tmp
  • About 3.5GB free space for Oracle software
  • The kernel for Red Hat 5 should be 2.6.18 or newer
#uname –r
2.6.18-53.el5

1. Install some packages:


[root@chetan~]#yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel
glibc glibc-common  glibc-devel gcc gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel
 make sysstat  unixODBC unixODBC-devel 
2. Edit Kernel Parameter.
[root@chetan~]# vim /etc/sysctl.conf
# make it comment
#net.bridge.bridge-nf-call-ip6tables = 0
#net.bridge.bridge-nf-call-iptables = 0
#net.bridge.bridge-nf-call-arptables = 0
# add at the last line
net.ipv4.ip_local_port_range = 9000 65500
fs.file-max = 6815744
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
fs.aio-max-nr = 1048576
[root@chetan~]# sysctl –p
net.ipv4.ip_local_port_range = 9000 65500
fs.file-max = 6815744
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
fs.aio-max-nr = 1048576
3. Create a user for oracle.
[root@chetan~]# groupadd -g 200 oinstall 
[root@chetan ~]# groupadd -g 201 dba
[root@chetan ~]# 
useradd -u 440 -g oinstall -G dba -d /usr/oracle oracle 
[root@chetan ~]# vi /etc/pam.d/login
#add at the last line
session    required     pam_limits.so
[root@chetan ~]# vim /etc/security/limit.conf
# add at the last line
oracle   soft   nproc   2047
oracle   hard   nproc   16384
oracle   soft   nofile   1024
oracle   hard   nofile   65536
[root@chetan ~]# vim /etc/profile
# add at the last line
if [ $USER = "oracle" ]; then
      if [ $SHELL = "/bin/ksh" ]; then
           ulimit -p 16384
           ulimit -n 65536
      else
           ulimit -u 16384 -n 65536
      fi
fi
4.  Note: Access control does not allow opening X-windows from any server.
     We will use xhost command to disable this access control.
[root@chetan~]# xhost
Access control enabled,only authorized clients can connect
[root@chetan~]# xhost +
Access control disabled, clients can connect from any host
5. Switch to a user “oracle” and configure some settings.
[oracle@chetan ~]$ chmod 755 /usr/oracle
[oracle@chetan ~]$ 
mkdir /usr/oracle/app
[oracle@chetan ~]$ 
chmod 775 /usr/oracle/app
[oracle@chetan ~]$ 
mkdir /usr/oracle/oradata
[oracle@chetan ~]$ 
chmod 775 /usr/oracle/oradata 
[oracle@chetan ~]$ vi ~/.bash_profile
umask 022
export ORACLE_BASE=/usr/oracle/app
[oracle@chetan ~]$ mkdir tmp                  # create a temporary dir to installation purpose
[oracle@chetan ~]$ cd tmp
[oracle@chetan  tmp~]$ unzip linux_11gR2_database_1of2.zip
[oracle@chetan  tmp~]$ unzip linux_11gR2_database_2of2.zip
[oracle@chetan  tmp~]$ cd database
[oracle@chetan  database ~]$ ./runInstaller
1.Oracle Installer starts like follows. 



2.Select "Install database software only".
  
 3. For this example, select "Single Instance ***".

4. Select your language.
 5. Select which edition you install.
6. Specify base directory and files for Oracle. On this example, keep default and Proceed.
7. Specify directory for installation. On this example, keep default and Proceed.
8.Specify priviledged group. On this example, keep default and Proceed.
9. Checking settings runs automatically for requirements of installing Oracle. Generally, some packages requirements failed like follows, but it's noplobmen because most of them are higher version packages than requirements. Ignore them if the result is the same to the follows.
  
10.The summary is shown for configuration. Click "Finish" if it's OK all.
  
11. Installation starts.
12. Following screen is shown, then open a terminal and execute follwong commands by root user.



[root@chetan ~]#/usr/oracle/oraInventory/orainstRoot.sh 
Changing permissions of /usr/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /usr/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@chetan ~]# /usr/oracle/app/product/11.2.0/dbhome_1/root.sh 
Running Oracle 11g root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /usr/oracle/app/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:                  # Enter

    Copying dbhome to /usr/local/bin ...
    Copying oraenv to /usr/local/bin ...
    Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.



13.Installation completed. click 'close' button.



14. configure some setting for 'oracle' user.
[oracle@chetan~]#vi ~./bash_profile

# add at the last lone
export ORACLE_BASE=/usr/oracle/app
export ORACLE_SID= orcl
export ORACLE_HOME=/usr/oracle/app/oracle/product/11.2.0/dbhome_1/
export PATH=$PATH:$ORACLE_HOME/bin

[oracle@chetan ~]$ source ~/.bash_profile 
[oracle@chetan ~]$ rm -rf tmp
[oracle@chetan ~]$ sqlplus  /  as  sysdba

SQL>

Monday, February 6, 2012

Diffrence Between Power SHELL and CMD

Difference Between PowerShell & CMD



A shell is a type of program that allows users to access kernel services from the GUI layer of the operating system. Every type of operating system has this function, given that the graphical level of the operating system, as in Windows, Linux or MAC OS, is a type of shell. Command-line interface shells are usually preferred by advanced users for some tasks because they are much faster due to less overhead.
Related Searches:
  1. Scripting Language

    • Windows PowerShell's scripting language interacts directly with the .NET framework, processing objects rather than simple text. This language also allows for full control of networked computers within the domain, making it perfect for domain administrators. This makes it much more powerful than the command line accessed from "CMD."

    Batch Language

    • Batch languages are typically a layer of abstraction above scripting languages, using simplified commands that incorporate a large amount of services. CMD is set up this way, in order to be more easily understood and used by users who don't necessarily need as many functions readily available.

    Extensible Interface

    • Since PowerShell extensively uses the .NET framework, new commands, syntax and interactivity with other programs and services can be easily implemented. This flexibility contributes to PowerShell being a much more powerful and flexible shell program than CMD.

    Based on DOS

    • CMD, also called Command Prompt, is designed to resemble MS-DOS, although it is not running MS-DOS, which would be an entirely different operating system running within Windows. The current form of CMD is set up with the syntax of MS-DOS so that it is familiar to legacy users, but users shouldn't expect MS-DOS programs to be automatically compatible in CMD.