Installing Oracle 10g on Ubuntu 9.10 (Karmic Koala)

Installing Oracle 10g on Ubuntu 9.10 (Karmic Koala)


Apparently, I need to install Oracle 10g on my Ubuntu, and there is no obstacle that's true. . .  of course if find the exactly guide.
And i think, it's so easy to Installing Oracle 10g on Ubuntu 9.10 (Karmic Koala).

If you encountered some trouble, you can leave the comment or just e-mail me, and i ll try to help you to fix it.

How to Install Oracle 10g on Ubuntu 9.10 (Karmic Koala)?


1. Install the dependency required
sudo apt-get install build-essential libaio1 rpm lesstif2-dev alien
2. Create User and group "Oracle"
sudo groupadd oinstall
sudo groupadd dba
sudo groupadd nobody
sudo useradd -g oinstall -G dba,nobody -m oracle -s /bin/bash
3. Set the User's password
sudo passwd oracle
4. Create the directory to install oracle 10g and set the owner to the "oracle:oinstall"
sudo mkdir -p /u01/app/oracle
sudo chown -R oracle:oinstall /u01/app/oracle
sudo chmod -R 775 /u01/app/oracle
5. Edit the parameter kernel on the file "/etc/sysctl.conf"
sudo gedit /etc/sysctl.conf
and add the parameters bellow :
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
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
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
6. Reboot your Computer or You can active it with run this script :
sudo /sbin/sysctl -p
7. Edit this file too  /etc/security/limits.conf
sudo gedit /etc/security/limits.conf
add the last part of file with this scripts
soft nproc 2047
hard nproc 16384
soft nofile 1024
hard nofile 65536
8. Create the symbolic links to cheating the Oracle 10g that your Ubuntu like  rpm and suitable with requirement, there are red hat enterprise linux (redhat-3 and redhat-4), sles, asianux.
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so
sudo ln -s /usr/bin/basename /bin/basename
sudo touch /etc/redhat-release
sudo chmod 666 /etc/redhat-release
sudo echo redhat-4 > /etc/redhat-release
9. Reboot Your Computer and Logging in as Oracle's user
10. And then create file on the "/home/oracle/.bashrc"
gedit .bashrc
Add the scripts bellow, exit and save the file
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
11. Copy the Master Oracle 10g on the some directory, and extract it. And Run this script bellow on the terminal to install Oracle 10g. and follow the steps till Finish
./runInstaller -ignoresysprereqs
12. During the installation is running, Run this file as root
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh
Oracle is not automatically starting when you re restarting the computer. You need to follow those steps bellow to start the Oracle10g manually.
Log in as oracles user

##Starting Database

- Go into sqlplus as DBA with type this script
sql>sqlplus sys as sysdba
sql>startup
sql>exit

##Starting Listener

- Run the listener
$ lsnrctl start
$ emctl start dbconsole