MRKAVANA (mrkavana@gmail.com) - www.facebook.com/kavanathai
Showing posts with label install. Show all posts
Showing posts with label install. Show all posts

Aug 25, 2011

Howto install a PHP FileInfo module in Linux?


The steps to install the PHP ‘Fileinfo’ module on a Linux server is as below:
1) Download and untar the package
# wget http://pecl.php.net/get/Fileinfo-1.0.4.tgz
# tar -zxf Fileinfo-1.0.4.tgz
# cd Fileinfo-1.0.4
2) Generate the extension for compiling
# phpize
3) Configure the module
# ./configure
4) generate the install files and install it
# make
# make install
5) Once done, the extension will be available under the /usr/lib64/php/modules directory.
You now need to add the extension somewhere in the php configuration file. Edit /etc/php.ini and add the following:

extension=fileinfo.so
6) Save the file and restart the webserver
# service httpd restart
To check if “fileinfo” is enabled on the server, execute:
# php -i | grep fileinfo
fileinfo
fileinfo support => enabled
Alternate method
Just an FYI, the module can also be installed using the PECL command i.e.
# pecl install fileinfo
Once done, just follow steps 5 and 6 mentioned above. That’s it.

How to install a Perl Module in Linux?


There are various ways to download and install perl modules from CPAN. In general it’s a good idea to download and install the perl module but we will see the different ways of installing the perl module.
1. The easiest way is to use the perl CPAN module. SSH to the server as root and execute:
# cpan
if you are running this for the first time, it will prompt you for a few questions (default answers are fine) before providing you with the “cpan >” prompt. To install a module, say for example “Perl::OSType”, execute
cpan > install Perl::OSType
this will download and compile the module and install it server wide. To know more commands/options of cpan, type question mark ( ? ) at the cpan prompt.
2. The second and the quickest method is to use perl CPAN module from the bash prompt instead of ‘cpan’ prompt. If you are on the command line of Linux, just execute
# perl -MCPAN -e 'install Perl::OSType'
3. The above 2 methods are the easiest one but it is recommended to install the module manually as the above methods may not always work. You can search the module at http://search.cpan.org/ and then wget it on your server. Once done, extract it:
# tar -zxf Perl-OSType-1.002.tar.gz
There is a standard way of installing the perl module, however, you will see a README file inside the extracted directory containing the installation steps. Goto the extracted directory and execute
# perl Makefile.PL
# make
# make test
# make install

How to install PDFlib-Lite & PDFlib on a RedHat/CentOS server?


PDFlib is a free library used for generating and manipulating files in Portable Document Format (PDF). The primiary goal of PDFlib is to create dynamic PDF documents on a Web server OR similar systems and to allow a “save as PDF” capability.
The following steps will help you to install PDFlib-lite and PDFlib on a CentOS server OR even on a cPanel and Plesk servers. SSH to the server as user ‘root’:
1) Download the PDFlib-Lite package required for PDFlib installation in a temporary directory
# cd /usr/local/src
# wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5.tar.gz
2) Unpack the package and goto the PDFlib-Lite directory
# tar -zxf PDFlib-Lite-7-*
# cd PDFlib-Lite-7.0*
3) Now, configure PDFlib-Lite
# ./configure --prefix=/usr/local
4) Create the installation files and install PDFlib-Lite
# make
# make install
5) Once PDFlib-Lite is installed, download ‘PDFlib’ using pecl.
# pecl download pdflib
6) Unpack the package and goto the PDFlib-Lite directory
# tar xvzf pdflib-*.tgz
# cd pdflib-*
7) Create configuration files
# phpize
8 ) Now, configure PDFlib
# ./configure
9) Create the installation files and install PDFlib
# make
# make install
A pdf.so file will be created in the PHPs extension directory which you can locate using the following command. If the file is not created there, copy it from the current location to the extension directory.
# php -i | grep extension_dir
The final step is to add the PDFLib extension in the php.ini file and restart the Web Server.
extension="pdf.so"
Note: Using the above instructions, PDFlib can be installed on the cPanel and Plesk servers as well. Though the location of extension_dir and php.ini are different, they can easily be located using the commands above.

How to install and configure APC Cache on a RedHat/CentOS server?


APC cache is a PHP caching solution which stands for Alternative PHP Cache. It serves PHP pages from a cache thus helping to reduce server load. APC is an open source software and is updated from time to time.
The following are the steps to install APC cache on a CentOS server OR even on a cPanel and Plesk server. All these commands are executed via SSH as a ‘root’ user.
1) Firstly, goto a temporary directory
# cd /usr/local/src
2) Download the latest APC version
# wget http://pecl.php.net/get/APC-3.1.6.tgz
3) Unpack the version and change to the APC directory
# tar -zxf APC-3.1.6.tgz
# cd APC-*
4) Create configuration files
# phpize
5) Search for the “php-config” file since you need to configure APC with it
# which php-config
6) Now, configure APC
./configure --enable-apc --enable-apc-mmap --with-apxs \
--with-php-config=/usr/local/bin/php-config
7) Create the installation files and install APC
# make
# make install
Now that the APC cache is installed on your server, the final step is to activate the APC extension in the php.ini file. Locate the working php.ini file and edit it
# php -i | grep php.ini
Search for “extension_dir” and place the following code under it:
extension="apc.so"
apc.enabled=1
apc.shm_segments=1
apc.shm_size=256
apc.ttl=3600
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXx
apc.enable_cli=1
Save the file and restart the Apache web server. You can tweak the APC settings by editing the above file but make sure you restart the Apache service for the new changes to take affect.
That’s it. To check if APC is activated, execute
# php -i | grep apc
Note: once APC is installed, make sure the ‘apc.so’ file is created under the directory specified at the “extension_dir” in php.ini. If not, look for the exact path of the file and create a symlink under it.

How to check System Information and vendors of MotherBoard/Processor/RAM in Linux?


To check the system’s information and manufacturers of MotherBoard, Processor, RAM and other hardware from the command line in a Linux machine, install the package “dmidecode”. You can search and install the dmidecode package using yum.
Check your Linux server architecture i.e. 32bit OR 64bit:
# uname -p
Search for the dmidecode package
# yum search dmidecode
Depending on the architecture, install the proper dmidecode package
# yum install dmidecode
You are done. To check all the hardware information of the server, execute
# dmidecode

How to install SuPHP/phpSuExec on Plesk?


How to install SuPHP/phpSuExec on a Plesk server?
SuPHP Or PHPSuExec is a module that increases the security of the server and executes PHP files under the ownership of the owner of the file instead of the Apache user i.e. “apache”.
The advantages of having suPHP are:
1. Files and Directories those need 777 permissions to write into, via the browser will now need a maximum of 755 permissions. The files/directories with 777 permissions will result in an “Internal Server Error”.
2. If you need to manipulate the value of a php directive for a domain, for ex. register_globals, it needs to be placed in the php.ini of a domain instead of the .htaccess file as it will result in an “Internal Server Error”.
3. All the files and directories uploaded using a script will have the ownership of the user instead of user ‘apache’ (i.e. the Apache user).
4. A user can edit/remove the files using Ftp that are uploaded via the browser.
In order to install SuPHP on the server, download and install the atomic script
# wget -q -O - http://www.atomicorp.com/installers/atomic | sh
Once the script is installed, install SuPHP module using yum
# yum install mod_suphp
The next step is to load the SuPHP module with Apache. The suphp installation automatically creates a “suphp.conf” file under the Apache configuration directory, if not create it.
# vi /etc/httpd/conf.d/suphp.conf
and insert the following lines:
#Load the Mod_SuPHP module
LoadModule suphp_module modules/mod_suphp.so
php_admin_value engine off
# Enable handlers
suPHP_AddHandler x-httpd-php
AddHandler x-httpd-php .php .php3 .php4 .php5
#Enable the SuPHP engine
suPHP_Engine on
Apache calls all the configuration files from the /etc/httpd/conf.d directory by default so there is no need to include the module in the httpd.conf file separately.
Now,  configuration file under /etc should be present (if not create it)
vi /etc/suphp.conf
copy/paste the following contents as it is:
[global]
logfile=/var/log/suphp.log
loglevel=info
webserver_user=apache
docroot=/var/www/vhosts
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
check_vhost_docroot=false
errors_to_browser=false
env_path=/bin:/usr/bin
umask=0022
min_uid=500
min_gid=500

[handlers]
x-httpd-php="php:/usr/bin/php-cgi"
x-suphp-cgi="execute:!self"
Make sure the “handle_userdir” directive is commented or removed from the file since it is deprecated from the latest version.
At the end, we have to restart the httpd service for all these changes to take effect
# service httpd restart
Test the SuPHP installation: Create a phpinfo.php file with 777 permission and it should show you an “Internal Server Error” on browsing.


Aug 23, 2011

RPM: Install packet on Redhat/Fedora


Purpose
Description / Example
Install an RPM Package
RPM packages have file naming conventions like foo-2.0-4.i386.rpm, which include the package name (foo), version (2.0), release (4), and architecture (i386). Also notice that RPM understands FTP and HTTP protocols for installing and querying remote RPM files.
rpm -ivh foo-2.0-4.i386.rpm
rpm -i ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm
rpm -i http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm
Un-install an RPM Package
To un-install an RPM package, we use the package name foo, not the name of the original package file foo-2.0-4.i386.rpm above.
rpm -e foo
Upgrade an RPM Package
To upgrade an RPM package, RPM automatically un-installs the old version of the foo package and installs the new package. It is safe to always use rpm -Uvh to install and upgrade packages, since it works fine even when there are no previous versions of the package installed! Also notice that RPM understands FTP and HTTP protocols for upgrading from remote RPM files.
rpm -Uvh foo-1.0-2.i386.rpm
rpm -Uvh ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm
rpm -Uvh http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm
Query all Installed Packages
Use RPM to print the names of all installed packages installed on your Linux system.
rpm -qa
Query an RPM Package
Querying an RPM package will print the package name, version, and release number of the package foo only if it is installed. Use this command to verify that a package is or is not installed on your Linux system.
rpm -q foo
Display Package Information
RPM can display package information including the package name, version, and description of the installed program. Use this command to get detailed information about the installed package.
rpm -qi foo
List Files in Installed Package
The following command will list all of files in an installed RPM package. It works only when the package is already installed on your Linux system.
rpm -ql foo
Which package owns a file?
Use the following command to determine which installed package a particular file belongs to.
rpm -qf /usr/bin/mysql
For example:
# rpm -qf /usr/bin/mysql
mysql-3.23.52-3
List Files in RPM File
Use RPM to query a (possibly) un-installed RPM file with the use of the the "-p" option. You can use the "-p" option to operate on an RPM file without actually installing anything. This command lists all files in an RPM file you have in the current directory. Also note that RPM can query remote files through the FTP and HTTP protocols.
rpm -qpl kernel-2.4.20-18.10.1.i686.rpm
rpm -qpl ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm
rpm -qpl http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm
Verify an Installed Package
Use RPM to list all files that do NOT pass the verify tests (done on size, MD5 signature, etc).
rpm --verify mysql
Where a file does NOT pass, the output is listed using the following codes that signify what failed:
S File size
M Mode (includes permissions and file type)
5 MD5 sum
L Symlink
D Device
U User
G Group
T Mtime
Take for example the following:
# rpm --verify mysql
S.5....T c /etc/my.cnf
This example indicates that file /etc/my.cnf failed on:
File size
MD5 Sum
Modified Time
However, the "c" tells us this is a configuration file so that explains the changes. It should still be looked at to determine what the changes were.
Check an RPM Signature Package
RPM can be used to check the PGP signature of specified packages to ensure its integrity and origin. Always use this command first before installing a new RPM package on your system. Also, GnuPG or Pgp software must be already installed on your system before you can use this command.
rpm --checksig foo




How to check if an rpm package is installed on a Red Hat Linux server

$ rpm -qa | grep samba
samba-common-3.0.9-1.3E.14.1
samba-3.0.9-1.3E.14.1
samba-client-3.0.9-1.3E.14.1



Linux rpm list installed package

Type the command as follows:
# rpm -qa
Output:
filesystem-2.4.0-1
comps-extras-11.1-1.1
gnome-mime-data-2.4.2-3.1
glibc-2.5-12
atk-1.12.2-1.fc6
libICE-1.0.1-2.1
db4-4.3.29-9.fc6
elfutils-libelf-0.125-3.el5
ncurses-5.5-24.20060715
libsepol-1.15.2-1.el5
libcap-1.10-26
sqlite-3.3.6-2
pcre-6.6-1.1
gdbm-1.8.0-26.2.1
libsepol-1.15.2-1.el5
libXdmcp-1.0.1-2.1
db4-4.3.29-9.fc6
iptables-1.3.5-1.2.1
libXrender-0.9.1-3.1
libXi-1.0.1-3.1
xorg-x11-font-utils-7.1-2
slang-2.0.6-4.el
.....
..
....
You can display more information about package using following command:
# rpm -qi iptablesOutput:
Name        : iptables                     Relocations: /usr
Version     : 1.3.5                             Vendor: Red Hat, Inc.
Release     : 1.2.1                         Build Date: Thu 13 Jul 2006 07:17:24 PM CDT
Install Date: Tue 10 Jul 2007 08:49:20 AM CDT      Build Host: ls20-bc2-14.build.redhat.com
Group       : System Environment/Base       Source RPM: iptables-1.3.5-1.2.1.src.rpm
Size        : 676805                           License: GPL
Signature   : DSA/SHA1, Thu 18 Jan 2007 09:47:22 AM CST, Key ID 5326810137017186
Packager    : Red Hat, Inc. 
URL         : http://www.netfilter.org/
Summary     : Tools for managing Linux kernel packet filtering capabilities.
Description :
The iptables utility controls the network packet filtering code in the
Linux kernel. If you need to set up firewalls and/or IP masquerading,
you should install this package.
You can list package file using following command:
# rpm -ql iptablesOutput:
/etc/rc.d/init.d/iptables
/etc/sysconfig/iptables-config
/lib64/iptables
/lib64/iptables/libipt_CLASSIFY.so
/lib64/iptables/libipt_CONNMARK.so
/lib64/iptables/libipt_DNAT.so
/lib64/iptables/libipt_DSCP.so
/lib64/iptables/libipt_ECN.so
.....
.......
...





Jul 18, 2011

How to install and configure oracle 10g standalone database server in redhat rhel5 linux

Oracle 10g installation on RHEL5 ( Standalone Server)

This document explains how to install and configure the Oracle 10g database server on a redhat rhel5 linux machine. This steps will work in other redhat distros like Centos, Fedora etc.

System:
VMware VM
OS Redhat enterprise Linux 5.4
32 bit
IP: 192.168.0.56
RAM = 1700Mb
Host machine Dell inspiron 1545

Oracle software:
Oracle 10g
Version 10.2.0.1.0

Other Requirements:
Yum server

Pre - Installation steps:

Setting the hostname:
[root@oracle ~]# hostname
oracle.lap.work

Resolving the hostname:
[root@oracle ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1oracle.lap.work oracle localhost.localdomain localhost
::1localhost6.localdomain6 localhost6
192.168.0.35 oracle.lap.work oracle

Making the hostname permenant:
[root@oracle ~]# cat s/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oracle.lap.work

Changing the OS Name:
Oracle 10g does not support the rhel 5.4. So we've tochange it to rhel4

[root@oracle ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 4 (Tikanga)

Installation:
Installing dependancies:

[root@oracle ~]# yum install compat-db compat-gcc* compat-libstdc++* openmotif* sysstat telnet-server libaio* gcc*

Now creating groups and users for oracle installation:
[root@oracle ~]# [root@oracle ~]# groupadd -g 200 oinstall
[root@oracle ~]# groupadd -g 200 oinstall1 dba
[root@oracle ~]# useradd -g oinstall -G dba oracle-u 200
[root@oracle ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

Creating home directories for oracle:
Crs home:
[root@oracle ~]# mkdir -p /u01/app/oracle/product/10.2.0/crs
Oracle home:
[root@oracle ~]# mkdir -p /u01/app/oracle/product/10.2.0/db_1

Setting Kernel & other parameters for Oracle installation in /etc/sysctl.conf file
[root@oracle ~]# cat >> /etc/sysctl.conf
#Oracle installation parameters
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_fin_timeout = 5
net.ipv4.tcp_keepalive_intvl = 5
net.ipv4.tcp_keepalive_time = 3
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_orphan_retries = 2
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144^[[A 4
kernel.domainname = lap.work #change the domain name as you wish
[root@oracle ~]#

Reloading the sysctl.conf to make effect the above parameters:
[root@oracle ~]# sysctl -p

You can check the errors using
[root@oracle ~]# sysctl -p > /dev/null

Settings for limiting the resource usage of oracle user:
[root@oracle ~]# cat >> /etc/security/limits.conf << EOF
> oracle soft nproc 4096
> oracle hard nproc 16384
> oracle soft nofile 2048
> oracle hard nofile 65536
> EOF

[root@oracle ~]# cat >> /etc/pam.d/login << EOF
> session required /lib/security/pam_limits.so
> EOF

[root@oracle ~]# [root@oracle ~]# cat >> /etc/pam.d/su << EOF
> session required /lib/security/pam_limits.so
> EOF

[root@oracle ~]# cat >> /etc/pam.d/sshd << EOF
> session required /lib/security/pam_limits.so
> EOF

Adding the variables and functions needed for oracle installation into /etc/profile file:

[root@oracle ~]# cat >> /etc/profile
#oracle installation variavl bles and functions
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
CRS_HOME=$ORACLE_BASE/product/10.2.0/crs
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
if [ $USER = .oracle. ]; then
ulimit .u 16384 .n 65536
fi

Sourcing it to make effect:
[root@oracle ~]# source /etc/profile

Adding the variables and functions needed for oracle installation into user oracle's profile file:

cat >> ~oracle/.bash_profile
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
CRS_HOME=$ORACLE_BASE/product/10.2.0/crs
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
Sourcing it to make effect. Or you can logout and log in.

[oracle@oracle ~]$ sourse .bash_profile

Hang Checker Timer:

[root@oracle ~]# cat >> /etc/modprobe.conf
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

Starting the hangcheck driver using the following command

[root@oracle ~]# modprobe hangcheck-timer

Now mount the cd to /media and copy the oracle database directory to /u01/app/oracle:

Now we have :
[root@oracle ~]# cd /u01/app/oracle/
[root@oracle oracle]# ls
database product

Changing the ownership and permissions of oracle files and directories:

[root@oracle oracle]# chown -R oracle:dba /u01/app/oracle/
[root@oracle oracle]# chmod -R 775 /u01/app/oracle/

Now we can start the installation:

You have to do this in runlevel 5, ie graphical mode:
You have to run the command xhost + as root user. As shown below.



Then only you will get access to oracle's graphical installation tool.

Starting the installation:

First we have to switch as user oracle and goto the directory /u01/app/oracle/database.
There you can see a script runInstaller. Execute it. See the pic below.


And you will get the following window.


Set the database password in that. And click next.
Note: It will be the password for the users SYS,SYSTEM,SYSMAN and DBSNMP

Now you will get the next window as follows:


Check the oracle group name is oinstall and click next.

Here you will get the prerequisite check results. There may be some errors. We are lacking enough swap memory here. And network script is not executed. [Its because we have static ip not dhcp]


Creating swap memory:

Sometimes there wont be enough swap memory in your system. So you have to create swap area either by partition or file.

Here we create swap using file.

[root@oracle oracle]# touch /swapfile

Using dd command and dumping zeros to the file:

[root@oracle oracle]# dd if=/dev/zero of=/swapfile bs=1024 count=500000
500000+0 records in
500000+0 records out
512000000 bytes (512 MB) copied, 71.4932 seconds, 7.2 MB/s

Making swap filesystem:

[root@oracle oracle]# mswkswap -v1 /swapfile
Setting up swapspace version 1, size = 511995 kB

Creating entry in fstab:

[root@oracle oracle]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
/swapfile swap swap defaults 0 0

Mounting and enabling it:

[root@oracle oracle]# mount -a
[root@oracle oracle]# swapon -a

Checking the swap status:

[root@oracle oracle]# swapon -s
FilenameTypeSizeUsedPriority
/dev/sda3 partition23535120-1
/swapfile file4999920-2

Now rechecking and continuing installation:




Now Pre-checks are over:


If there was errors, it'll be listed in red color so check for errors.

Now Click on install.


It may take some time.

Some configuration scripts will run during installation:




At the end of installation we have to run two scripts manually as root user:


1st script:

[root@oracle db_1]# ./root.sh

Running Oracle10 root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
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.
[root@oracle db_1]# cd ../../../oraior

2nd script:

[root@oracle oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory to 770.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@oracle oraInventory]#


For using the EM you have to run this command as user oracle:
Switching user as oracle:
[root@oracle oraInventory]# su - oracle

Running the command:
[oracle@oracle ~]$ emctl start dbconsole
TZ set to Asia/Calcutta
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://oracle.lap.work:1158/em/console/aboutApplication
  • An instance of Oracle Enterprise Manager 10g Database Control is already running.
Now installation is over:

Now login using web access:
http://192.168.0.35/em



user :sys
password: same you've given during oracle installation

Accepting the license:


Thats it



Using the command prompt:

Login as user oracle:
[oracle@oracle ~]$ sqlplus / as stysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Nov 16 12:48:40 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from all_users;

USERNAME USER_ID CREATED
------------------------------ ---------- ---------
BI 60 16-NOV-10
PM 59 16-NOV-10
SH 58 16-NOV-10
IX 57 16-NOV-10
OE 56 16-NOV-10
HR 55 16-NOV-10
SCOTT 54 30-JUN-05
****** Output truncated *********

SQL> shutdown
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Thats it. Leave a comment if you like. Enjoy.