Although the oracle 11g Database provides the linux x86 version, only Red Hat, Novell and Solaris versions are supported. debian and ubuntu are not supported, therefore, it is relatively troublesome to install ubuntu. Please follow the steps below to install it step by step. Do not be impatient. Every step should be done carefully (it is a little urgent when I start to install it, simplify the steps and results in your own way .... Installation failed-_-B ).
My system: ubuntu 8.04 desktop (32-bit) memory: 896 M (originally 1G, allocated M to the video card)
This article is a translation and Annotation of "Installing Oracle 11g on Ubuntu 8.04 LTS (hard Heron)", written by a foreign cool man. Original article:
Http://www.pythian.com/blogs/968/installing-oracle-11g-on-ubuntu-804-lts-hardy-heron
If you do not want to read text E, you can see the following translation: Black is the original translation, red is my annotation, blue is the terminal Input and Output
(Reprinted with the source :)
9 steps in total:
Step 1
Download and install Ubuntu 8.04 hard drive (x86-32 bit. .
Step 2
Download Oracle 11g: Download Oracle 11g for Linux (x86, 32-bit ).
Don't rush to decompress it. I will tell you where to decompress it later.
Step 3
Modify the default settings of X server.System-> Administration-> Login Window(System-> Management-> logon window), select the "Security" tab, and deselect the "Deny TCP connections to the Xserver" check, restart Xserver (or restart the system ). Enter the following information on the terminal:
user@hardy:~$ xhost +127.0.0.1127.0.0.1 being added to access control list
Step 4
Open the terminal and convert it to a superuser: (Note that there is a reason to use sudo su-instead of sudo-s:sudo su -
Convert a user to a Super User and start a new session (empty Session), insteadsudo -s
In this way, the current session will be transferred to a new super user to reduce the potential impact and harm of environment variables.
user@hardy:~$ sudo su -[sudo] password for user:
root@hardy:~# apt-get update...root@hardy:~# apt-get dist-upgrade...root@hardy:~# reboot
Step 5
Install some necessary tools with apt:
user@hardy:~$ sudo su -[sudo] password for user:root@hardy:~# apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm...root@hardy:~#
Step 6
After installing those tools, we need to modify some default connections of Ubuntu/bin/sh. Do not skip this step. Otherwise, many errors may occur during installation.
Root @ hard :~ # Cd/bin
Root @ hard:/bin # ls-l/bin/sh
Lrwxrwxrwx 1 root 4 2008-04-28 :59/bin/sh-> dash
Root @ hard:/bin # ln-sf bash/bin/sh
Root @ hard:/bin # ls-l/bin/sh
Lrwxrwxrwx 1 root 4 2008-05-01/bin/sh-> bash
If you want to know why Ubuntu uses dash as the default shell, see a detailed explanation of why dash is the default system shell.
Step 7
Add users and groups and modify some configurations. This step is important! If you are not sure, do not change it. (The row number is added for ease of interpretation ):
01 root@hardy:/bin# cd02 root@hardy:~# pwd /root04 root@hardy:~# addgroup oinstall Adding group `oinstall' (GID 1001) ... Done.07 root@hardy:~# addgroup dba Adding group `dba' (GID 1002) ... Done.10 root@hardy:~# addgroup nobody Adding group `nobody' (GID 1003) ... Done.13 root@hardy:~# usermod -g nobody nobody14 root@hardy:~# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle15 root@hardy:~# passwd -l oracle Password changed.17 root@hardy:~# mkdir /home/oracle18 root@hardy:~# chown -R oracle:dba /home/oracle19 root@hardy:~# ln -s /usr/bin/awk /bin/awk20 root@hardy:~# ln -s /usr/bin/rpm /bin/rpm21 root@hardy:~# ln -s /usr/bin/basename /bin/basename22 root@hardy:~# mkdir /etc/rc.d23 root@hardy:~# for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done24 root@hardy:~# mkdir -p /u01/app/oracle25 root@hardy:~# chown -R oracle:dba /u0126 root@hardy:~#
- Lines 04-12: add the users and groups we need
- Line 13: Change the nobody user group to nobody, so that the Oracle Installation program will not go wrong. The default nobody group of Ubuntu is nogroup.
- Lines 14-18: Create an oracle user and lock the user to prevent others from logging on to the system through the oracle user. Note that the HOME directory of oracle users should not be the same as that of ORACLE_HOME.
- Lines 19-23: create a connection to some tools required by the Oracle installer. Because the Oracle installer is prepared for Red Hat, the location of some tools is different from that of Ubuntu.
- Finally, on lines 24-25 create the ORACLE_BASE directory.
Step 8
Modify system default values. These modifications increase the number of system file descriptors, increase the shared memory size, and modify some network subsystem parameters. I don't know whether these changes will affect your system. Add the following
The end of the/etc/sysctl. conf file:
fs.file-max = 65535kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 1024 65535net.core.rmem_default = 1048576net.core.rmem_max = 1048576net.core.wmem_default = 262144net.core.wmem_max = 262144
Add the following
At the end of the/etc/security/limits. conf file:
oracle soft nproc 2047oracle hard nproc 16383oracle soft nofile 1023oracle hard nofile 65535
To force the use of what we just added, we will add the following
/etc/pam.d/login
File end:
session required /lib/security/pam_limits.sosession required pam_limits.so
Then run the following command:
Sysctl-p let
The added items take effect:
root@hardy:~# sysctl -pkernel.printk = 4 4 1 7kernel.maps_protect = 1fs.inotify.max_user_watches = 524288vm.mmap_min_addr = 65536net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.all.rp_filter = 1fs.file-max = 65535kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 1024 65535net.core.rmem_default = 1048576net.core.rmem_max = 1048576net.core.wmem_default = 262144net.core.wmem_max = 262144root@hardy:~#
Step 9
Now, extract the downloaded oracle11g installation package to the/home/oracle/install/directory. Then go to the directory, set the DISPLAY parameter, and start installation:
root@hardy:~# cd /home/oracleroot@hardy:/home/oracle# chown -R oracle:dba installroot@hardy:/home/oracle# su - oracleYour account has expired; please contact your system administratorsu: User account has expired(Ignored)oracle@hardy:~$ export DISPLAY=127.0.0.1:0.0oracle@hardy:~$ pwd/home/oracleoracle@hardy:~$ ls -ltotal 4drwxr-xr-x 6 oracle dba 4096 2007-09-18 18:50 installoracle@hardy:~$ cd installoracle@hardy:~/install$ ls -ltotal 28drwxr-xr-x 11 oracle dba 4096 2007-08-06 16:02 docdrwxr-xr-x 5 oracle dba 4096 2007-08-03 13:28 installdrwxr-xr-x 2 oracle dba 4096 2007-09-18 18:52 response-rwxr-xr-x 1 oracle dba 2911 2007-08-03 13:28 runInstallerdrwxr-xr-x 14 oracle dba 4096 2007-08-03 13:27 stage-rw-r--r-- 1 oracle dba 4835 2007-08-06 18:19 welcome.htmloracle@hardy:~/install$ ./runInstaller -ignoreSysPrereqs
After the preceding command is entered, the same Oracle Installation Program (OUI) is entered. Do not worry. Continue to install it step by step as follows:
Note: After OUI is installed, it is not completely installed. You still need to finish the final work (which is available at the end), and this is a required job!
Click (Next) Next.
Modify "Specify Operating System group name:" to "dba", and click "Next ".
Follow the settings and click Next.
Select "Enterprise Edition" and then click Next.
Antu settings, next step.
Continue to the next step.
Wait for system check. Do not worry about errors or warnings.
Check all the non-"Succeeded" items that have been checked and click "Next.
Select "Install Software Only" and Install the database through dbca after installation. Next step. You can also select "Create a Database" in this step to install the Database.
Set all groups to dba. Next step.
Click "Install" now. The process will take a long time and the system will slow down. Therefore, you 'd better take a book and have a cup of coffee. Sometimes the system will become very slow, as if it is about to crash, don't worry about it, wait for him to install it slowly.
In this step, do not remember to click "OK". perform the following operations: (start another terminal and use sudo su-to convert it to a Super User)
root@hardy:~# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory to 770.Changing groupname of /u01/app/oraInventory to dba.The execution of the script is completeroot@hardy:~# /u01/app/oracle/product/11.1.0/db_1/root.shRunning Oracle 11g root.sh script...The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.1.0/db_1Enter 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 byDatabase Configuration Assistant when a database is createdFinished running generic part of root.sh script.Now product-specific root actions will be performed.Finished product-specific root actions.root@hardy:~#
OK.
After installing OUI, click "Exit" to Exit OUI. Now, congratulations, OUI has been installed :)
But don't worry. Remember, we still need to finish our work.
Set the access permissions for the database folder and oratab file: (you must add this permission, otherwise there will be some minor issues in use)
$ Sudo chown-R oracle: dba/u01/app/oracle /*
$ Sudo chmod-R g + w/u01/app/oracle /*
$ Sudo chown oracle: dba/etc/oratab
$ Sudo chmod g + w/etc/oratab
Then
Add the following sentence to the/etc/profile file:
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1export PATH=$PATH:/u01/app/oracle/product/11.1.0/db_1/bin
Create an Oracle 11g Database STARTUP script named oracledb. Create a file in/u01/app/oracle/product/11.1.0/db_1/bin: oracledb. content:
#!/bin/bash## /etc/init.d/oracledb## Run-level Startup script for the Oracle Listener and Instances# It relies on the information on /etc/oratabexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1export ORACLE_OWNR=oracleexport PATH=$PATH:$ORACLE_HOME/binif [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]then echo "Oracle startup: cannot start" exit 1ficase "$1" in start) # Oracle listener and instance startup echo -n "Starting Oracle: " su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start" su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" touch /var/lock/oracle echo "OK" ;; stop) # Oracle listener and instance shutdown echo -n "Shutdown Oracle: " su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop" su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" rm -f /var/lock/oracle echo "OK" ;; reload|restart) $0 stop $0 start ;; *) echo "Usage: `basename $0` start|stop|restart|reload" exit 1esacexit 0
The modified script is executable:
root@hardy:~# chmod a+x /u01/app/oracle/product/11.1.0/db_1/bin/oracledb
If you want to automatically start the Oracle 11g Database at startup, do the following:
Root @ hard :~ # Ln-s/u01/app/oracle/product/11.1.0/db_1/bin/oracledb/etc/init. d/oracledbroot @ hard :~ # Sudo sysv-rc-conf -- level 2345 oracledb on if the sysv-rc-conf command is not available, apt-get one.
Finally, add your username to the dba group:
root@hardy:~# usermod -G dba -a user
Now, Oracle 11g is installed. After you log on again, you can use the oracle command.
You can add LISTENER through netca and add database through dbca. Test whether the installation is successful:
(ORACLE_SID = heron is the value you set during installation)
oracle@hardy:~$ export ORACLE_SID=heronoracle@hardy:~$ sqlplus '/as sysdba'SQL*Plus: Release 11.1.0.6.0 - Production on Mon May 5 02:39:27 2008Copyright (c) 1982, 2007, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>
If you see the above results, your oracle installation is successful.
Now the installation is complete :)
Tired of writing...