If you are not an genius on oracle, Installing oracle on Ubuntu/Linux is really a hard process.Two days ago,I had to undergo though the same installation process and thought of sharing my steps for installation in here (at least to save someones time and effort). By being successful with the installation, wso2 registry team is in the effort of making their SOA registry-repository compatible with oracle.
This guide applies to 10.2.0 linux32 and Ubuntu 7.10.
1.Download and unpack 10201_database_linux32.zip
2.Run the following commands in a terminal
$ sudo ln -s /usr/bin/basename /bin/basename
$ sudo ln -s /usr/bin/awk /bin/awk
The installer relies on some binaries being in /bin instead of /usr/bin so you need to make a few links.
3.Add nobody and dba groups.
sudo addgroup nobody
sudo addgroup dba
4. Add yourself to dba group Useradd -G {group_name} username o
Go to /etc/groups and modify the dba group with your name
in my case "dba:x:1003:krishantha"
5. I recommend you to set ORACLE_HOME and ORACLE_OWNR environment variables before begin the installation. Setting these values may overcome lots of problems that your will have to face when working with oracle instance.I know, it is quite strange to set those values before beging the installation. But better to do it. Noramally oracle takes it home as /product/10.2.0/db_1 with default settings.
so set the env variable in your terminal or .bashrc file as below.
export ORACLE_HOME=/home/krishantha/oracle/product/10.2.0/db_1
export ORACLE_OWNR='krishantha'
6. Before starting with oracle installation start installing following packages, in any case those packages are unavailable on your machine.
-gcc
-make
-binutils
-lesstif2 libc6
-libc6-dev
-rpm
-libaio
-libaio-dev
-libstdc++5
-ibstdc++5-3.3-dev
-build-essential
You can use apt-get install and apt-cache search command for finding and installing missing packages.
7. Now you need to run the installer. Go to zip extracted directory (./product) and issue the below command. Note that you must not run this command as root.
./runInstaller -ignoresysprereqs
ignoresysprereqs option will ignore the process of checking product prerequisite.
(please ignore "sh: /bin/rpm: not found" message on the terminal)
8. In the oracle installation wizard follow the default settings ( You can define your own settings based on your requirement)
Oracle installation wizard.
In one of the step oracle ask global database group, you need to enter dba as the group which you are already a member. By keeping that in mind, follow the wizard.
a. Keep the default path for oraInventory or else you can change it to another.
b. Select installation type as Enterprise edition.
c. Keep the default values for oracle home (make sure to change the ORACLE_HOME value if your are changing the path.
d. Select "create database" in configuration option step.
e. Select database configuration as "General Purpose"
f. Set Global database name and sid as 'orcl' or your own name.( if you want to create database with sample oracle schemas then tick
the sample creation text box
g. Select Use database control for database Management.
h. Select file system.
i. Enable or disable automated backups.
j.Set database schema passwords.
k.After you do that the installer will ask you to run two scripts as root. Paths to these scripts (shown in installer dialogue) depend on your system, for me they were:
$ sudo /home/krishantha/oraInventory/orainstRoot.sh
$ sudo /home/krishantha/oracle/product/10.2.0/db_1/root.sh
9. Finally wizard will display some links to sqlplus and em. Make sure to copy them.
10. Finally set following environmental variables.
export LD_LIBRARY_PATH=/home/taw/oracle/product/10.2.0/db_1/lib/
export ORACLE_SID='orcl'
ORACLE_SID is the database name give in 6th step of the installation wizard. In my case it is 'orcl'.
And also you can check the SID value from /etc/oratab file.
orcl:/home/krishantha/oracle/product/10.2.0/db_1:N
Now you have finished with the installation. It is time to check the new oracle installation is working or not.
Below simple steps will guide your to startup and shut down of oracle instance.
In a new terminal issue
$ sqlplus /nolog
Then
SQL> connect sys/yourpassword as sysdab
Connected.
If it displays "connected to idle instance",means that your oracle instance is not up and running. you can start the oracle instance using startup command.
Issue startup command.
shut command will shut-down the oracle instance.
Now as the sys DBA create simple table and query to see how much you are lucky.
CREATE TABLE TEST (ID NUMBER PRIMARY KEY,NAME VARCHAR2(30));
INSERT INTO TEST(ID,NAME) VALUES ('1','test1');
INSERT INTO TEST(ID,NAME) VALUES ('2','test2');
SELECT * FROM TEST;
Okay you have done!!!. Enjoy with oracle.
Reference:
1 .http://ubuntuforums.org/showthread.php?t=112572
2. http://t-a-w.blogspot.com/2007/11/installing-oracle-10g-enterprise.html
No comments:
Post a Comment