Installing Oracle 10g in Ubuntu 7.10 (Gutsy Gibbon)
This doc isn’t yet perfect, but it would help.
1. Requirements
Your linux swap is set to 2GB
You have the Oracle 10g RC2 installer for Linux
2. Setting Ubuntu
2.1 Install required libraries
Open the Synaptic Package Manager (click System –> Administration)
Click on Settings –> Repositories
Click all the checkbox(main, universe, restricted, multiverse) found in the “Ubuntu Software” Tab
Click the Close button
Click the Reload button
Close the Synaptic Package Manager
Open a terminal
sudo apt-get install gcc make binutils libmotif3 lesstif2 rpm libaio1 zip build-essential rpm lesstif2-dev alien -y
2.2 Users/groups Oracle’s creation
sudo userdel nobody
sudo groupadd oinstall
sudo groupadd dba
sudo groupadd nobody
sudo useradd -g oinstall -G dba -p passwd -d /home/oracle -m oracle -s /bin/bash
sudo useradd -g nobody nobody
sudo passwd oracle
2.3 Deceive Installer that you are using RedHat
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /etc /etc/rc.d
sudo touch /etc/redhat-release
sudo chmod 666 /etc/redhat-release
sudo echo “Red Hat Linux release 3.0 (drupal)” > /etc/redhat-release
sudo mkdir -p /u01/app/oracle
sudo mkdir -p /u02/oradata
sudo mkdir /data/oracle -p
sudo mkdir /data/oracle/10g
2.3.1 mode & ownership modification
sudo chown -R oracle:oinstall /u01 /u02
sudo chmod -R 775 /u01 /u02
sudo chown -R oracle:oinstall /data/oracle
sudo chmod -R 775 /data/oracle
2.4 Configurations
2.4.1 Configuring Kernel Parameters
Oracle instances consume memory and CPU resources on servers, and Ubuntu doesn’t come configured to allow the quantity of resources to be consumed that we’ll end up needing. To fix that, we therefore have to specify a set of new Kernerl Parameters which the operating system should use. That’s easily done by editing one file, like so:
sudo gedit /etc/sysctl.conf
You can substitute in the name of your preferred text editor instead of gedit if you like, but whatever editor you use, you now need to add these lines to the end of that file:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
Don’t make any typing mistakes (it’s best to cut-and-paste from the above, really) and make sure you leave a blank line after the last line of the file (otherwise, the last setting tends not to get read and implemented at all). Normally, the sysctl.conf file is only read at each machine startup, so you’d have to reboot the server to implement the changes, but you can force the server to re-read the file without need for a reboot by now issuing the command:
sudo /sbin/sysctl -p
2.4.2 Security Limits
Finally, we need to set some new security limits for the system, too. Do that by issuing this command:
sudo gedit /etc/security/limits.conf
..and then appending to the end of that file these new values:
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
2.4.3 Setting Up Environment
sudo mkdir /home/oracle
sudo chown oracle:oinstall /home/oracle -R
sudo gedit /home/oracle/.bashrc
ORACLE_HOME=/data/oracle/10g/
ORACLE_SID=orcl
ORATAB=/etc/oratab
ORACLE_HOME_LISTNER=$ORACLE_BASE
ORACLE_BASE=$ORACLE_HOME
export ORACLE_BASE ORACLE_SID ORATAB ORACLE_HOME ORACLE_HOME_LISTNER
PATH=${PATH}:$ORACLE_HOME/bin
Make sure to leave a blank line after the last of those lines.
3. Installing Oracle
3.1 preparing the installer
copy the oracle installer to /home/oracle
sudo chown oracle:oinstall /home/oracle/*.zip
sudo chmod 775 /home/oracle/*.zip
3.2 running the installer
logout of ubuntu
login back as oracle
open a console
unzip the file
cd /home/oracle/database
./runInstaller -ignoreprereq
3.3 Editing Oratab
You should log out as the oracle user, and log yourself back on as yourself (that is, the user you created during the Ubuntu install). That’s a full logout and logon, not merely the use of the su command to become another account, by the way.
Once you’ve done that, you should edit the contents of the /etc/oratab file in the text editor of your choice. You’ll have to have root privileges to edit a file in the /etc directory, of course, and that means it will be necessary to issue a command such as:
sudo gedit /etc/oratab
You’ll find at the moment that the file contains this one line (apart from all the commented-out ones, that is):
orcl:/oracle/10g:N
4. Starting the listener and the database
su - oracle
Password: enter your sudo password
[oracle] $ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-JAN-2006 13:55:02
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/oracle/product/10.2.0/db_1//bin/tnslsnr: please wait…
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/oracle/product/10.2.0/db_1/network/admi n/listener.ora
Log messages written to /u01/app/oracle/oracle/product/10.2.0/db_1/network/log/l istener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(P ORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 19-JAN-2006 13:55:04
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/oracle/product/10.2.0/db_1/network/adm in/listener.ora
Listener Log File /u01/app/oracle/oracle/product/10.2.0/db_1/network/log /listener.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary…
Service “PLSExtProc” has 1 instance(s).
Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully
[oracle] $ sqlplus connect as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 19 13:55:21 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password: enter the DB password
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 92276304 bytes
Database Buffers 188743680 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> exit
—-
Credits:
Much of the content of this document came from dizwell’s site and few of the steps were updated for the Ubuntu 7.10 compatibility. And thanks to those other sites that makes our life easier. (http://www.zjant.com/index.php/date/2007/04/ , http://www.supinfo-projects.com/en/2006/oracle%5Fon%5Fubuntu/3/)
- BROWSE / IN TIMELINE
- « Set Encoding in Eclipse
- » Debugging in Eclipse, calling shell scripts
- BROWSE / IN Oracle Ubuntu
- « Dual Boot Issues: Reinstalled Windows
- » Debugging in Eclipse, calling shell scripts
SPEAK / ADD YOUR COMMENT
Comments are moderated.
You must be logged in to post a comment.

