After restarting the machine, logon to server using ‘root’ user name and password. Check whether all the required rpm packages for Oracle 10g installation are installed in the system. For that issue the following commands in the terminal.
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21
Some required rpms won’t be installed during the CentOS 4.8 Linux installation. To install those rpms insert the CentOS 4.8 DVD in the DVD drive.
Open Terminal window
Type ‘cd /media/cdrom/CentOS/RPMS
Type rpm –ivh “rpm name”
After installing the rpms issue the rpm check command again
3 Configuring Linux for Oracle
3.1 Verifying system requirements
To verify that your system meets the minimum requirements for an Oracle Database 10g Release 2 database, log in as root and run the commands below
To check the amount of RAM and swap space available, run this:
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
Ex:
# grep MemTotal /proc/meminfo
MemTotal: 1034680 kB
# grep SwapTotal /proc/meminfo
SwapTotal: 1534196 kB
The minimum RAM required is 1024MB, and the minimum required swap space is 1GB. Swap space should be twice the amount of RAM for systems with 2GB of RAM or less and between one and two times the amount of RAM for systems with more than 2GB
You also need 2.5GB of available disk space for the Oracle Database 10g Release 2 software and another 1.2GB for the database. The /tmp directory needs at least 400MB of free space. To check the available disk space on your system, run the following command:
df -h
Ex:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 6.8G 1.3G 5.2G 20% /
/dev/sda1 99M 17M 77M 18% /boot
3.2 Create the Oracle Groups and User Account
Ex:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
Set the password on the oracle account:
passwd oracle
Ex:
# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
3.3 Create Directories
Issue the following commands as root:
Ex:
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle
3.4 Configuring the Linux Kernel Parameters
# cat >> /etc/sysctl.conf <
kernel.shmall = 2097152
kernel.shmmax = 536870912
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
EOF
# /sbin/sysctl –p
3.5 Setting Shell Limits for the oracle User
# cat >> /etc/profile <
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF
# cat >> /etc/csh.login <
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
#cat >> /home/oracle/.bash_profile <
umask 022
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$PATH
export PATH LD_LIBRARY_PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID
EOF
3.6 Configuring network and hosts files in Linux
Use the graphical login to log in as root.
Go to Applicationàsystem settingsàNetwork
Network configuration window will come. Click on ‘Edit’ option.
Ethernet Device configuration window will come
Select the ‘Statically ip address’ option.
Enter the values
Address: 192.168.1.XX
Subnet Mask: 255.255.255.0
Default gateway address: 192.168.1.XX
Click on ‘Ok’.
Click on ‘DNS’ Tab in Network configuration window.
Enter the values
Host name: Server name.example.com
Primary DNS: ip address of DNS server.
Click on ‘Activate’ option.
One question window will pop-up. Click on ‘Yes’ Tab.
One information window will pop-up. Click on ‘Ok’ Tab.
Now Go to ComputeràFile systemàetcàsysconfig
Right click on ‘network’ file and open with ‘Text Editor’.
Enter the values as such
NETWORKING=yes
FORWARD_IPV4=false
HOSTNAME=Server name.example.com
DOMAINNAME=example.com
Save the file.
Now Go to ComputeràFile systemàetc
Right click on ‘hosts’ file and open with ‘Text Editor’.
Enter the values as such
Ipaddress Server name.example.com Server name
Ex:
127.0.0.1 localhost
172.20.20.XX Server name.example.com Server name
4 Installing Oracle 10g
Use the graphical login to log in as oracle.
Create a directory to contain the Oracle Database 10g Release 2 distribution:
$mkdir /home/10gR2_db
Copy or download the distribution to /home/10gR2_db folder
Unzip and extract the file:
$cd /home/10gR2_db
$unzip 10201_database_linux32.zip
4.1 Start the Oracle Universal Installer.
$cd /home/10gR2_db/database
$./runInstaller
1. Select installation method
-->Select basic installation
-->Oracle Home Location:/u01/app/oracle/product/10.2.0/db_1
-->Installation Type: Enterprise Edition (1.3GB)
-->UNIX DBA group: oinstall
-->Make sure Create starter database is unchecked.
-->Click on Next.
2. Specify Inventory Directory and Credentials
-->Inventory Directory:/u01/app/oracle/oraInventory
-->Operating System Group Name: oinstall
-->Click on Next.
3. Product specific prerequisite checks
If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
-->Click on Next
4. Summary
-->A summary of the products being installed is presented.
-->Click on Install.
5. Execute Configuration Scripts
-->At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
-->Click on OK when finished.
6. End of Installation
-->Make note of the URLs presented in the summary, and click on Exit.
7. Installation of Oracle 10g on CentOS 4.8 has been finished.
4.2 Post-Installation configuration
4.2.1 Creating a listener using Oracle Net Configuration Assistant.
Use the graphical login to login as oracle
1. Open Terminal and Go to /u01/app/oracle/product/10.2.0/db_1/bin
2. Issue the command ./netca
3. Oracle Net Configuration Assistant window will come
4. Choose the configuration you would like to do:
-->Listener configuration
-->Click on Next
5. Select what you want to do:
-->Add
-->Click on Next
6. Listener Name:
-->Give that name in the text box. Here I have given ‘orcl’.
7. Select protocols
-->TCP will be selected by default.
-->Click on Next
8. Which TCP/IP port number should the listener use
-->Use the standard port number of 1521
9. Would you like to configure another listener
-->No
10. Which listener you want to start
-->Select the listener name which created.
-->Here I selected staborcl listener.
11. Click on ‘Finish’.
4.2.2 Editing tnsnames.ora file
Use the graphical login to login as oracle
1. Go to /u01/app/oracle/product/10.2.0/db_1/network/admin
2. Open the tnsnames.ora using ‘Text editor’.
3. Add the following entries in beginning of the tnsnames.ora file.
STABORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Server name.example.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
4.2.3 Creating database using Database Configuration Assistant
Use the graphical login to login as oracle
1. Open Terminal and Go to /u01/app/oracle/product/10.2.0/db_1/bin
2. Issue the command ./dbca
3. Welcome to Database Configuration Assistant for Oracle Database
-->Click on Next
4. Operations
-->Select ‘Create a database’
-->Click on Next
5. Database template
-->Select ‘General Purpose’
-->Click on Next
6. Database Identification
-->Give the ‘Global Database Name’ this name should be the same name given during the creation of ‘listener’. Here I have given ‘orcl’.
-->SID field will automatically fill with the same name given in the ‘Global Database Name’ field. So the SID field will also be ‘orcl’.
7. Management options
-->Select the default options
-->Click on Next
8. Database Credentials
-->Enter and confirm the password.
-->Here I have given ‘petaluma’. Can change the password later.
9. Storage Options
-->Select the default options
-->Click on Next
10. Database File Locations
-->Select the default options
-->Click on Next
11. Recovery Configuration
-->Select the default options
-->Click on Next
12. Database Content
-->Check the option “Sample Schemas”.
-->Click on Next
13. Initialization Parameters
-->Select ‘Typical-Allocate memory as percentage of the total physical memory’
-->Give the value 50 for the percentage.
-->Click on Next
14. Database Storage
-->Click on Next
15. Creation Options
-->Check ‘Create Database’ option.
-->Click on Finish
16. The confirmation screen will appear
-->Click OK.
17. The Database creation will start. At last ‘Database complete’ confirmation window will appear.
-->Click OK.
5 After restarting Linux server
#export ORACLE_SID=orcl
#export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
#./emctl start dbconsole
#./isqlplusctl start
#./lsnrctl start
#./sqlplus /nolog
SQL>connect as sysdba
User name: system
Password: petaluma (given during the db creation)
>startup
To check status of pmon service
Ps –aef|grep pmon
6 Conclusion
Now the database is up and running. You can begin exploring many new features in Oracle Database 10g.