Installing Oracle 11g R2 silently in CentOS

Source: Internet
Author: User

Installing Oracle 11g R2 silently in CentOS

I,
Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Oracle 11g online documentation:
Http://www.oracle.com/pls/db112/homepage

Ii. System Requirements
Memory: 1 GB (minimum official requirement: 1 GB)
Hard Disk: 40 GB (4.29G and 1.7G data files required for Enterprise Edition installation)

Check command
Memory
# Grep MemTotal/proc/meminfo
Swap space
# Grep SwapTotal/proc/meminfo
Disk Space
# Df-ah

3. system preparation before installation
1. Add the corresponding host name and IP Address Record (under the root user)

# Vim/etc/hosts
192.168.1.254 Admin-PC

2. Disable Selinux (root User)
# Sed-I "s/SELINUX = enforcing/SELINUX = disabled/"/etc/selinux/config
# Setenforce 0

3. Create users and groups (root users: Create Oracle Installation group oinstall, Database Administrator Group dba, and oracle users)
# Groupadd-g 200 oinstall
# Groupadd-g 201 dba
# Useradd-u 440-g oinstall-G dba oracle (main group oinstall, other group: dba)
# Passwd oracle

4. Modify the kernel parameters (root User: Modify the/etc/sysctl. conf file and add the following parameters)
# Vim/etc/sysctl. conf
Net. ipv4.ip _ local_port_range = 9000 65500
Fs. file-max = 6815744
Kernel. shmall = 10523004
Kernel. shmmax = 6465333657
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100128
Net. core. rmem_default = 262144
Net. core. wmem_default = 262144
Net. core. rmem_max = 4194304
Net. core. wmem_max = 1048576
Fs. aio-max-nr = 1048576

# Modprobe bridge

# Lsmod | grep bridge

# Sysctl-p

5. Modify system resource limits (root User: Modify the/etc/security/limits. conf file, and add the following parameters)
# Vim/etc/security/limits. conf
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
6. Modify the user authentication option (root User: Modify the/etc/pam. d/login file with the following parameters)
# Vim/etc/pam. d/login
Session required pam_limits.so


7. Create the installation directory and Set permissions (under the root user)

# Mkdir-p/app/oracle/
# Chmod 755/app/oracle/
# Chown oracle. oinstall-R/app/oracle/

8. Set the environment variable (root User: add the following parameter to the/etc/profile file)

# Vim/etc/profile

Export ORACLE_BASE =/app/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/db_1
Export PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin
Export ORACLE_SID = ORCL
Export ROACLE_PID = ORCL
Export NLS_LANG = AMERICAN_AMERICA.AL32UTF8
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib

After completion, execute:

# Source/etc/profile # environment variable modification takes effect

# Env | grep ORA # Check whether environment variables are complete

ORACLE_SID = ORCL

ORACLE_BASE =/app/oracle

ORACLE_HOME =/app/oracle/product/11.2.0/db_1

4. Install Oracle

1. Install the dependency package (for root users)

# Yum install binutils compat-libstdc ++-33 elfutils-libelf-devel-static gcc-c ++ glibc-common glibc-devel glibc -headers kernel-headers ksh libaio-devel libgcc libgomp libstdc ++-devel make sysstat unixODBC-devel

2. Install oracle on the Character interface (for root users)
Decompress the oracle software in the/opt directory
# Unzip-o linux.x64_11gR2_database_1of2.zip
# Unzip-o linux.x64_11gr2_database204 f2.zip

# Chown-R oracle: oinstall/opt/database/

Decompress the package and obtain the database Directory, which contains the response directory. The directory contains three rsp files, which are used as the template of the response file for Silent Installation.

The roles of the three files are as follows:
Db_install.rsp: Installation response
Dbca. rsp: Create a database response
Netca. rsp: establishes a listener, a local service name, and other network settings.

3. Edit the installation response script (for root users)

# Vim/opt/database/response/db_install.rsp

4. Silent Oracle Installation (for oracle Users)
$ Chmod-R 755/opt/database
$./RunInstaller-silent-force-responseFile/opt/database/response/db_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB. Actual 165908 MB Passed
Checking swap space: must be greater than 150 MB. Actual 16383 MB Passed
Preparing to launch Oracle Universal Installer from/tmp/OraInstall2015-01-29_03-35-32PM. please wait... [oracle @ oracledb database] $ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
CAUSE: The Central Inventory is located in the Oracle base.
ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
[WARNING] [INS-13014] Target environment do not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details./tmp/OraInstall2015-01-29_03-35-32PM/installActions2015-01-29_03-35-32PM.log
ACTION: Identify the list of failed prerequisite checks from the log:/tmp/OraInstall2015-01-29_03-35-32PM/installActions2015-01-29_03-35-32PM.log. then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
[WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
CAUSE: The Central Inventory is located in the Oracle base.
ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
[WARNING] [INS-13014] Target environment do not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details./tmp/OraInstall2015-01-29_03-35-32PM/installActions2015-01-29_03-35-32PM.log
ACTION: Identify the list of failed prerequisite checks from the log:/tmp/OraInstall2015-01-29_03-35-32PM/installActions2015-01-29_03-35-32PM.log. then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session:
/Opt/app/oracle/oraInventory/logs/installActions2015-01-29_03-35-32PM.log
The following configuration scripts need to be executed as the "root" user.
#! /Bin/sh
# Root scripts to run

/App/oracle/oraInventory/orainstRoot. sh
/App/oracle/product/11.2.0/db_1/root. sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
4. Return to this window and hit "Enter" key to continue

Successfully Setup Software.
Press enter and run root. sh as the root user.

$ Su root

#/App/oracle/product/11.2.0/db_1/root. sh

5. Silent network configuration (for oracle Users)

$ ORACLE_HOME/bin/netca/silent/responseFile/opt/database/response/netca. rsp

Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" =/opt/database/response/netca. rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Listener "LISTENER" already exists.
Oracle Net Services configuration successful. The exit code is 0

6. Modify the script dbca. rsp (for the root user)

# Vim/opt/database/response/dbca. rsp

7. Silent database installation (for oracle Users)
$ ORACLE_HOME/bin/dbca-silent-responseFile/opt/database/response/dbca. rsp
Copying database files

1% complete

3% complete

11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
57% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
74% complete
85% complete
96% complete
100% complete
Look at the log file "/app/oracle/export toollogs/dbca/ora11g/ora11g. log" for further details.
Installation completed...

8. Modify the oracle configuration (for the root user)

# Vim $ ORACLE_HOME/bin/dbstart

ORACLE_HOME_LISTNER = $ ORACLE_HOME

# Vim $ ORACLE_HOME/bin/dbshut

ORACLE_HOME_LISTNER = $ ORACLE_HOME

9. Oracle listeners and instances are automatically started at Linux Startup (under the root user)

# Vim/etc/oratab

ORCL:/app/oracle/product/11.2.0/db_1: Y

# Vim/etc/rc. d/rc. local

Su-oracle-c "lsnrctl start"

Su-oracle-c dbstart

10. Basic commands

Log on to the database: sqlplus/as sysdba

Start listening: lsnrctl start or $ ORACLE_HOME/bin/lsnrctl start

View the listener: lsnrctl status or $ ORACLE_HOME/bin/lsnrctl status

Stop listening: lsnrctl stop

This article permanently updates link: http://www.bkjia.com/Linux/2016-07/133757tm

Related Article

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.