Install oracle10.2 in ubuntu9.04

Source: Internet
Author: User
Tags addgroup oracle documentation
I was going to get an oracle Xe at the beginning, and I had to download the Debian version. It was certainly easy to install it on Ubuntu. I tried it and some problems were puzzling, therefore, we should simply launch a REAL Enterprise Edition installation, which was successfully installed before. Unfortunately, there is no complete summary record, which can be summarized here.

Note:In the Linux version installed in Oracle, RedHat, Suse, unbreakable Linux, and Asianux have passed Oracle certification. If the installed Linux system is one of the above Linux versions, you 'd better go to the official Oracle documentation for reference. This article is only limited to ubuntu9.04, and different versions may be slightly different.

This document describes how to install Oracle 10g enterprise edition on Ubuntu 8.10.
Http://forum.ubuntu.org.cn/viewtopic.php? F = 44 & t = 170399 & SID = 0fcf8acc5269b19e513e2249edacd886 & START = 0
Thank you!

1. Verify the system requirements for installing Oracle Database 10g 2nd

According to the Oracle official guide, you must first verify the size of Ram and swap space
To view the available Ram and swap space, run the following command:
Grep memtotal/proc/meminfo
Grep swaptotal/proc/meminfo

My local example:
Dhn @ dhn-LAPTOP :~ $ Grep memtotal/proc/meminfo
Memtotal: 2060248 KB
Dhn @ dhn-LAPTOP :~ $ Grep swaptotal/proc/meminfo
Swaptotal: 2088408 KB

According to the installation instructions on the official Oracle website, the minimum Ram required is 1,024 MB, and the minimum swap space required is 1 GB. For systems with Ram less than or equal to 2 GB, the swap space should be twice the number of Ram; for systems with Ram greater than 2 GB, the swap space should be one to two times the number of RAM.

Oracle Database version 10g 2nd requires 2.5 GB of available disk space, while the database requires an additional 1.2 GB of available disk space. The/tmp directory requires at least 400 mb of available space. To check available disk space on the system, run the following command:
DF-H
My local example:
Dhn @ dhn-LAPTOP :~ $ DF-H
File System capacity used available % mount point
/Dev/sda7 27G 11g 15g 44%/
Tmpfs 1006 M 0 1006 M 0%/lib/init/RW
Varrun 1006 M 104 K 1006 M 1%/var/run
Varlock 1006 M 0 1006 M 0%/var/lock
Udev 1006 M 188 K 1006 M 1%/dev
Tmpfs 1006 M 208 K 1006 M 1%/dev/SHM
Lrm 1006 M 2.4 m 1004 M 1%/lib/modules/2.6.28-11-generic/volatile

The available space of the root file system is 15 GB, which is greater than required (2.5 + 1.2 + 0.4 = 4.1 GB ).

In addition, the installation package libaio1 may need to be installed in advance, because it was installed at the time of Oracle Xe installation, which was not verified.
In addition, it is best to enable the root user, Because ubuntu disables the root user by default, but during the Oracle installation process, the root user needs to execute two scripts.
To install libaio1, you can install libaio1 as follows:
Dhn @ dhn-LAPTOP :~ $ Sudo apt-Get install libaio1
Enable Root
Dhn @ dhn-LAPTOP :~ $ Sudo passwd Root
Enter the new password as prompted.
2. Create a user
Oracle should be installed by oracle users. After installation, it should also be started by oracle users.
// Create a user group oinstall
Dhn @ dhn-LAPTOP :~ $ Sudo addgroup oinstall
// Create a user group DBA
Dhn @ dhn-LAPTOP :~ $ Sudo addgroup DBA
// Create a user group nobody
Dhn @ dhn-LAPTOP :~ $ Sudo addgroup nobody

// set the initial Oracle group to oinstall and add it to the DBA group. Set the home directory to/home/oracle. this directory is automatically created if it does not exist. Shell is Bash.
dhn @ dhn-LAPTOP :~ $ Sudo useradd-G oinstall-g dba-D/home/Oracle-m-S/bin/bash Oracle
// view the group of nobody users
dhn @ dhn-LAPTOP :~ $ Id nobody
uid = 65534 (nobody) gid = 65534 (nogroup) group = 65534 (nogroup)
// Add the nobody user to the nobody group
dhn @ dhn-LAPTOP :~ $ Sudo usermod-G nobody Nobody
// check that the nobody is added to the group.
dhn @ dhn-LAPTOP :~ $ Id nobody
uid = 65534 (nobody) gid = 65534 (nogroup) group = 65534 (nogroup), 1003 (nobody)
// set the user's Oracle password
dhn @ dhn-LAPTOP :~ $ Sudo passwd Oracle

3. Create a directory.
// create the oracle_base directory. If the directory does not exist, create it and install Oracle here.
dhn @ dhn-LAPTOP :~ $ Sudo mkdir-P/opt/oracle10
// change the owner of the Directory and its files or directories to Oracle in the oinstall group.
dhn @ dhn-LAPTOP :~ $ Sudo chown-r ORACLE: oinstall/opt/oracle10/
// set the permission for this directory and its files to 755
dhn @ dhn-LAPTOP :~ $ Sudo chmod-r 775/opt/oracle10/

4. Modify Kernel Parameters
dhn @ dhn-LAPTOP :~ $ Sudo gedit/etc/sysctl. conf
Add the following parts to the end of the file and save them.
# special setting for Oracle Xe
kernel. shmmax = 536870912
kernel. shmmni = 4096
kernel. shmall = 2097152
Kern El. SEM = 250 32000 100 128
FS. file-max = 65536
net. ipv4.ip _ local_port_range = 1024 65000
// make the settings take effect
dhn @ dhn-LAPTOP :~ $ Sudo sysctl-P

dhn @ dhn-LAPTOP :~ $ Sudo gedit/etc/security/limits. conf
Add the following content before the last line at the end of the file # End.
# setting for Oracle 10g
Oracle soft nofile 65536
Oracle hard nofile 65536
Oracle soft nproc 16384
Oracle hard nproc 16384

5. Create a link and Red Hat release:
// Create some Oracle InstallationsProgramThe connection of the required tool. Because the Oracle installer is prepared for Oracle-certified Red Hat, Suse, and other versions, some tools are located differently from ubuntu.
Dhn @ dhn-LAPTOP :~ $ Sudo ln-S/usr/bin/awk
Dhn @ dhn-LAPTOP :~ $ Sudo ln-S/usr/bin/RPM
Dhn @ dhn-LAPTOP :~ $ Sudo ln-S/usr/bin/basename

Create RedHat release
Because Oracle does not support Ubuntu by default, We need to disguise Ubuntu as RedHat.
Dhn @ dhn-LAPTOP:/etc $ sudo touch RedHat-release
Dhn @ dhn-LAPTOP:/etc $ sudo gedit RedHat-release
Add content to the file:
Red Hat Linux release 4.1

6. // enable the Java environment to display Chinese characters normally. In this way, the Chinese characters on the Oracle Installation interface will not be garbled.
$ CD $ java_home/JRE/lib/Fonts
$ Sudo mkdir fallback
$ Ln-S/usr/share/fonts/TrueType/wqy/wqy-zenhei.ttc
$ Sudo mkfontdir
$ Sudo mkfontscale

7. log on to X with an oracle user
Go to the installation file directory
Oracle @ dhn-LAPTOP :~ $./Runinstaller-jreloc $ java_home/JRE/

Note: The-jreloc parameter is added after the installation program, because we just changed the locally installed JRE to support Chinese display, here, we use the modified JRE, so that the Chinese version of the Oracle Installation interface can be displayed normally. Although garbled characters still appear in the pop-up interface when installing Database Config assistant, it does not affect much. I remember there are just two pages.
If you do not add this parameter, Oracle will use their own JRE, but this installation interface appears in Chinese garbled characters, of course, you can also execute the export lc_ctype = en_US.UTF-8, run runinstaller to go to the English installation page.
Oracle @ dhn-LAPTOP :~ $ Export lc_ctype = en_US.UTF-8

My personal settings are as follows:
Complete product list directory path:/opt/oracle10
Operating system group: oinstall
ORACLE_HOME:/opt/oracle10/product/10.2.0/db_1
Global Database Name: orcl
Sid: orcl
Database Character Set: zhs16gbk
Storage option: File System
Data File Location:/opt/oracle10/product/10.2.0/oradata/
Install session log:/opt/oracle10/logs/installActions2009-06-21_08-37-14AM.log

A warning will also appear during the installation process. You can see the log file for details:
Information: GCC:/usr/lib/libstdc ++. so.5: the file or directory does not exist.

// Check whether libstdc ++ in/usr/lib exists
Oracle @ dhn-LAPTOP :~ $ Ls/usr/lib | grep C ++
Libstdc ++. so.6
Libstdc ++. so.6.0.10
There are two, and the main difference is thatLibstdc ++. so.6.0.10,Libstdc ++. so.6 is justLibstdc ++. so.6.0.10.Create a link file.
Root @ dhn-LAPTOP :~ # Ln-S/usr/lib/libstdc ++. so.6/usr/lib/libstdc ++. so.5

Then try again. Everything is OK.

The following figure shows that the Oracle J2EE application has been configured and can be accessed using the URL listed below.
ISQL * Plus URL:
Http: // dhn-LAPTOP: 5560/isqlplus

ISQL * Plus dba url:
Http: // dhn-LAPTOP: 5560/isqlplus/DBA

Enterprise Manager 10g Database Control URL:
Http: // dhn-LAPTOP: 1158/em

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.