Oracle 11g Installation

Source: Internet
Author: User
Tags dba mkdir sqlplus

Oracle 11g Installation Readiness

Directory

Oracle 11g Installation Readiness

Oracle 11g:

Oracle 11g online Documentation:

Oracle 11g R2 Database installation hardware configuration requirements:

Linux Platforms

Required Package Support:

Create an Oracle User

modifying kernel parameters

Modify User Limits

Modify user authentication Options

Modify a User Configuration file

Installation directory Configuration

Modify User Bash Shell

Oracle 11g Installation

Installing the Software

Create a database

Oracle Test

To close the database:

Summarize

1. Check the hardware

2. Download software

3. Modify the Host File

4. Install package Check

5, the LIBSTDC package link

Three. Parameter settings

1. Set Core parameters

2, set the shell Limits (System resource limit), improve the efficiency of software operation

3. Create users and groups and related directories

4. Set installation Environment variables

Save exit

Oracle 11g:

Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

Select the desired Oracle installation File Download

Oracle 11g online Documentation:

Http://www.oracle.com/pls/db112/homepage

can download its PDF document reference (where the Linux The Installation Wizard is the most authoritative installation manual)

Oracle 11g R2 Database installation hardware configuration requirements:

Minimum memory 1 GB of RAM

Virtual Memory capacity

Available RAM

Swap Space Required

Between 1 GB and 2 GB

1.5 times the size of RAM

Between 2 GB and GB

Equal to the size of RAM

More than GB

+ GB


Hard disk space requirements

Database software hard disk space requirements:

Installation Type

Requirement for Software Files (GB)

Enterprise Edition

3.95

Standard Edition

3.88

Data file hard disk space requirements:

Installation Type

Requirement for Data Files (GB)

Enterprise Edition

1.7

Standard Edition

1.5

command to check

Memory

# grep Memtotal/proc/meminfo

Swap space

# grep Swaptotal/proc/meminfo

Disk space

# Df-ah

Linux Platforms

Viewing the online documentation, you can see that the Oracle 11g supports the Linux operating system

Http://docs.oracle.com/cd/E11882_01/install.112/e24321/pre_install.htm%23CHDFFBIF

Below is X86 (32-bit) on Linux

where red Hat 4 corresponds to Oracle Linux 4 and corresponds to cent OS 4 (version to correspond)

Required Package Support:

By looking at the package requirements listed in the Oracle installation documentation, you can view the packages required on different platforms, listed below Asianux 3, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux 5.0 requirements, check

If the system has installed these packages, if the corresponding RPM package is not found on the corresponding system CD and installed.

Inspection work: Executed in sequence: Rpm-qa | grep below package

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
Glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixodbc-devel-2.2.11

binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

elfutils-libelf-0.125

elfutils-libelf-devel-0.125

elfutils-libelf-devel-static-0.125

gcc-4.1.2

gcc-c++-4.1.2

Glibc-2.5-24

glibc-common-2.5

glibc-devel-2.5

glibc-headers-2.5

kernel-headers-2.6.18

ksh-20060214

libaio-0.3.106

libaio-devel-0.3.106

libgcc-4.1.2

libgomp-4.1.2

libstdc++-4.1.2

libstdc++-devel-4.1.2

make-3.81

sysstat-7.0.2

unixODBC-2.2.11

unixodbc-devel-2.2.11

Create Oracle User

Root User: Create Oracle Installation Group Oinstall, DBA for DB Administrators group, and Oracle user

#/usr/sbin/groupadd Oinstall
#/usr/sbin/groupadd DBA
#/usr/sbin/useradd-g OINSTALL-G dba Oracle (Primary group Oinstall, other group: DBA)
# passwd Oracle

Modifying kernel parameters

Root User: Modify the/etc/sysctl.conf file, plus the following parameters

FS.AIO-MAX-NR = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 536870912
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.rmem_default = 262144
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048586

For the above configuration to take effect without restarting the system, execute the following command

#/sbin/sysctl-p

Modify User Limits

Root User: Modify the/etc/security/limits.conf file, plus the following parameters

Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536

Modify user authentication Options

Root User: Modify the/etc/pam.d/login file with the following parameters

Session Required Pam_limits.so

Modify a User Configuration file

Root User: Modify the/etc/profile file to include the following parameters:

if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi

Installation directory Configuration

Root User:

# mkdir-p/u01/orainventory
# Chown-r ORACLE:OINSTALL/U01/
# Chmod-r 775/U01/

Modify User Bash Shell

$ VI. bash_profile

Add the following content, mainly to modify

Export ORACLE_BASE=/U01
Export Oracle_home= $ORACLE _base/oracle
Export Oracle_sid=oraclesid
Export path= $ORACLE _home/bin: $PATH: $HOME/bin

After the completion of the execution:

#su –oracle

#env | grep Ora to see if the environment variable is complete

Oracle 11g installation and installation software

Log in with an Oracle user, and then extract the Oracle installation files:

$ unzip Linux_11gr1_database.zip

Then go to the extracted directory and execute

$./runinstaller

Then go to the extracted directory and execute

Choose advanced installation, Advanced is also very simple

The default orainventory is that the Oracle user does not have write permission under the root directory, so warning do the next step without a tube

Modify the Inventory directory directory to/u01/oralinventory, at which point the Oracle user has write permissions and the next step:

Oracle will perform pre-installation checks and, if there are no errors, go directly to the next step.

The errors that may occur are:

(1) Modification of the system configuration file is not effective, the most absolute way to restart the system

(2) Static IP problem, if you use static IP, you should open/etc/hosts add static IP designation: such as 192.168.188.10 localhost.localdomain (routing domain name)

(3) Memory problems, if the intrinsic setting of about 1G, or slightly less, can be ignored

The next step, the installation is complete! However, no database is created at this time.

Create a database

Configure Listener First

$ NETCA (NET configuration)

Note: The following error may be reported at this time

is due to the default host name, modify 2 at

[Email protected] ~]$ cat/etc/sysconfig/network
Networking=yes
hostname=test11g
gateway=192.168.1.254

[Email protected] ~]$ cat/etc/hosts
# don't remove the following line, or various programs
# that require network functionality would fail.
127.0.0.1 localhost.localdomain localhost test11g

Hostname test11g

Allow the Oracle user to log out again to start NETCA normally (reference: http://blog.sina.com.cn/s/blog_470504830100s2fz.html)

Port use 1521 (all port numbers can be used without a firewall enabled), go directly to the next step to completion, and check to see if it starts:

$ PS–EF | grep LISTENER

Create a database

$DBCA (Database configuration)

Next

Select Default, Next

Enter the database name and SID (as in the example: Oraclesid, be sure to match) next

Next

Use a common password, such as: Oracle, Next, until the following:

You need to pay attention to the selection of character sets, for databases that contain Chinese data, you can choose Unicode encoding (if the character set is not selected, it is cumbersome to modify later)

Next, choose to install some sample databases, the next step, you will start to create the database

After the database is created, the corresponding data is created in the/u01/oradata directory, and you can use the command

Ps–ef | grep Oracle

View the Oracle processes that have been started

The Oracle database software and database installation is complete.

Oracle Test

In the next section, you can use Sqlplus to test whether you have successfully installed Oracle, as follows:

$sqlplus/nolog

Sql>conn/as SYSDBA

Sql>create table MyTable (name varchar (ten), age int);

Sql>insert into mytable values (' User1 ', 12);

Sql>select * FROM MyTable;

To close the database:

To view the Oracle process:

Sql>!ps–ef | grep Oracle

Turn off Oracle

Sql>shutdown Immediate

Summarize

The installation process described above is summarized below, Source: Linux Open source commune

1. Check the hardware

Memory

# grep Memtotal/proc/meminfo

Swap space

# grep Swaptotal/proc/meminfo

Disk space

# Df-ah

2. Download software

Oracle Database 10g Release 2 (10.2.0.1) software download location:

Http://otn.oracle.com/software/products/database/oracle10g/index.html

3. Modify the Host File

The view/etc/hosts file must contain a fully qualified name for the server

4. Install package Check

1, check whether the following packages are installed, if not installed, you must first install:

Binutils-2.17.50.0.6-2.el5

compat-libstdc++-33-3.2.3-61

Elfutils-libelf-0.125-3.el5

elfutils-libelf-devel-0.125

Glibc-2.5-12

Glibc-common-2.5-12

Glibc-devel-2.5-12

gcc-4.1.1-52

gcc-c++-4.1.1-52

libaio-0.3.106

libaio-devel-0.3.106

libgcc-4.1.1-52

libstdc++-4.1.1

Libstdc++-devel-4.1.1-52.e15

make-3.81-1.1

sysstat-7.0.0

unixODBC-2.2.11

unixodbc-devel-2.2.11

# Rpm-qa | grep make gcc glibc compat openmotif21 setarch et cetera

5, the LIBSTDC package link

( old version requirements , new version oracle11 do not set ):

Ln-s/usr/lib/libstdc++.so.6.0.3/usr/lib/libstdc++.so.5

# Detection exists If you do not do this link, the installation process to build the database, you will be unable to link to the database problem.

Three. Parameter setting 1, setting core parameters

Add the following line to the/etc/sysctl.conf file:

#kernel. core_uses_pid = 1

Kernel.shmall = 2097152

Kernel.shmmax = 2147483648--(in bytes, number of physical memory *1024*1024*2, twice times of memory)

Kernel.shmmni = 4096

# SEMAPHORES:SEMMSL, Semmns, SEMOPM, Semmni

Kernel.sem = 250 32000 100 128

Fs.file-max = 65536

Net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=8388608

net.core.rmem_max=8388608

net.core.wmem_default=262144

net.core.wmem_max=262144

esc:wq!

# sysctl-p #运行下列命令改变核心参数

2, set the shell Limits (System resource limit), improve the efficiency of software operation

A. Add the following red lines to the/etc/security/limits.conf file:

Oracle Soft Nofile 65536

Oracle Hard Nofile 65536

Oracle Soft Nproc 16384

Oracle Hard Nproc 16384

B. Add the following line to the/etc/pam.d/login file if it is not there:

Session required/lib/security/pam_limits.so

Session Required Pam_limits.so

C. Add the following statement after/etc/profile:

Vi/etc/profile

if [$USER = "Oracle"]; Then

if [$SHELL = "/bin/ksh"]; Then

Ulimit-p 16384

Ulimit-n 65536

Else

Ulimit-u 16384-n 65536

Fi

Fi

3. Create users and groups and related directories

--Create a Dba/oper/oinstall group

/usr/sbin/groupadd DBA

/usr/sbin/groupadd Oper

/usr/sbin/groupadd Oinstall

--Create an Oracle user and set the group to which the user belongs

/USR/SBIN/USERMOD-G oinstall-g dba Oracle

/USR/SBIN/USERADD-G oinstall-g dba Oracle

passwd Oracle

# ID Oracle

uid=501 (Oracle) gid=501 (oinstall) groups=501 (Oinstall), 502 (DBA)

--Create a related installation directory

Mkdir-p/opt/oracle/product

Mkdir-p/opt/oracle/product/orahome

Mkdir-p/opt/orainventory # (the default inventory folder)

Mkdir-p/opt/oracle/oradata # (change the right file owner)

Mkdir-p/var/opt/oracle

--Set directory owner and permissions

Chown-r oracle.oinstall/opt/oracle

Chown-r Oracle.oinstall/opt/oracle/oradata

Chown-r Oracle.oinstall/opt/oracle/product/orahome

Chown-r oracle.dba/opt/orainventory

Chown oracle.dba/var/opt/oracle

Chmod-r 775/opt/oracle

Chmod-r 755/var/opt/oracle

4. Set installation Environment variables

# su-oracle--SU to Oracle user,

Change some of the user's configuration

$vi. Bash_profile

Add the following parameters, mainly to configure the Oracle software operation environment parameters

# Get the aliases and functions

If [-f ~/.BASHRC]; Then

. ~/.bashrc

Fi

Export Oracle_base=/opt/oracle

Export Oracle_home= $ORACLE _base/product/orahome

Export ORACLE_SID=ORCL

Export Oracle_owner=oracle

Export oracle_term=vt100

Export path= $PATH: $ORACLE _home/bin: $HOME/bin

Export path= $ORACLE _home/bin: $ORACLE _home/apache/apache/bin: $PATH

Ld_library_path= $ORACLE _home/lib:/lib:/usr/lib:/usr/local/lib

Export Ld_library_path

Classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib

Classpath= $CLASSPATH: $ORACLE _home/network/jlib

Export CLASSPATH

Note:

11g:ora_nls33= $ORACLE _home/nls/admin/data

10g:ora_nls33= $ORACLE _home/ocommon/nls/admin/data

9i:ora_nls33=/oracle/app/ora92/ocommon/nls/admin/data

Save exit

--Execute the following command to have the configuration take effect immediately or with the Oracle user login to make the settings effective

$ source $HOME/.bash_profile

Oracle 11g Installation

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.