Install Oracle 11g R2 on Ubuntu 10.10

Source: Internet
Author: User

1. Preparations
1.1 If the server version is used, a graphical interface must be installed.
$ Sudo apt-get install Ubuntu-desktop

1.2 install necessary library packages
$ Sudo apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm

$ Sudo apt-get install libstdc ++ 5 this step is very important. If you do not install it, The MakefileException error in invoking target 'install' of makefile ins_ctx.mk error may occur. The reason is that ubuntu10 + uses libstdc ++ 6 as the default version by default.

1.3 create a soft connection for some commands
$ Su-
# Ln-sf bash/bin/sh
# Ln-s/usr/bin/awk
# Ln-s/usr/bin/rpm
# Ln-s/usr/bin/basename
# Mkdir/etc/rc. d
# For I in 0 1 2 3 4 5 6 S; do ln-s/etc/rc $ I. d/etc/rc. d/rc $ I. d; done

2. Create Oracle users, user groups, and folders

2.1 create an oinstall and dba User Group
$ Su-
# Addgroup oinstall
# Addgroup dba
 
2.2 create an oracle user and specify the user group created above
 
-- Create an oracle user
# Useradd-g oinstall-G dba-d/home/oracle-s/bin/bash oracle
-- Set Password
# Passwd oracle

2.3 create a folder
-- Create the oracle user home directory
$ Su-
# Mkdir/home/oracle
# Chown-R oracle: dba/home/oracle
 
-- Create the ORACLE_BASE directory
# Mkdir-p/u01/oracle note in this step/u01 occupies "/" file system space by default. This location can be changed, for example, to/opt/oracle

# Chown-R oracle: dba/u01

3. Set System Parameters

3.1 Edit the/etc/sysctl. conf file and add the following parameters to the end. Note: This file should be backed up before modification.
$ Su-
# Cp/etc/sysctl. conf/etc/sysctl. conf. bak
----------------------
Add the following parameters to the end of the sysctl. conf file.
Fs. file-max = 6815744
Fs. aio-max-nr = 1048576
Kernel. shmall = 2097152
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Net. core. rmem_default = 4194304
Net. core. rmem_max = 4194304
Net. core. wmem_default = 1048576
Net. core. wmem_max = 1048576
Net. ipv4.ip _ local_port_range = 9000 65535

3.2 edit/etc/security/limits. conf and add the following parameters to the end of the file.
Note: backup should be performed before editing.
-----------
Oracle soft nproc 2047
Hard nproc 16383
Oracle soft nofile 1023
Oracle hard nofile 65535

3.3 modify the/etc/pam. d/login file and add the following two line parameters:
Session required/lib/security/pam_limits.so
Session required pam_limits.so

3.4 activate configuration in sysctl. conf
$ Su-
# Sysctl-p

3.5 Modify/etc/profile and set Environment Variables
ORACLE_SID = orcl
ORACLE_BASE =/u01/oracle
ORACLE_HOME =/u01/oracle/product/11.0.2
NLS_LANG = AMERICAN_AMERICA.UTF8
PATH = $ ORACLE_HOME/bin: $ PATH
Export ORACLE_BASE ORACLE_SID ORACLE_HOME PATH NLS_LANG

4. Prepare the Installation File

4.1 download the installation file from the official website and copy the file to/u01

$ Unzip linux_11gR2_database_1of2.zip
$ Unzip linux_11gr2_databasesilicate f2.zip

The total size is about 2.2 GB, and the above files are 32-bit.

4.2 After decompression, the database folder will appear, which is the installation file. Specify permissions for the Installation File.

$ Sudo chmod 755 u01/oracle/database
$ Sudo chmod 755 u01/oracle/database /*.*
$ Sudo chmod 755 u01/oracle/database/install/. oui
$ Sudo chmod 755 u01/oracle/database/install /*.*
$ Sudo chmod 755 u01/oracle/database/install/unzip

$ Chown-R oracle: dba/u01/database/

5. Start Installation

5.1 The installation requires a graphical interface. If the cocould not initialize class sun. awt. X11.XToolkit exception occurs, run the following command to configure it.
 
$ Su-
# Xhost + 127.0.0.1
Or
# Export DISPLAY =: 0.0

5.2 Installation started
$ Su-oracle
$ Export LANG = en_US
$ Cd/u01/database
$./RunInstaller-jreLoc/opt/lib/jdk1.6.0 _ 25-ignoreSysPrereqs
Specify the JRE directory and ignore the version check.

----------- End -----------------

Note:

1. When "Database Configuration Assist" is installed, the interface is blank, which is normal. This step takes a long time. After this step is completed, an Instance name, service name, and other information Prompt window will pop up.

2. After the installation is successful, execute sqlplus system/pwd under the oracle user to log on successfully, but an error will be reported after switching to the daily user. Because ORACLE_SID is not specified in the environment variable of daily users. Modify ~ /. Bashrc or ~ /. Bash_profile file, add export ORACLE_SID = orcl.

If the sqlplus command cannot be found under a daily user, a soft connection is created to/bin.
$ Sudo ln-s $ ORACLE_HOME/bin/sqlplus

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.