"Reprint" "Centos Linux System" command line (silent) install Oracle 11gR2

Source: Internet
Author: User

"Original ": http://blog.chinaunix.net/uid-23886490-id-3565998.html

I. Pre-installation Preparation

1. Memory and Swap requirements

As for how swap is added, the following article will mention

  

grep memtotal/proc/meminfogrep Swaptotal/proc/meminfo

2. Hard disk space

  

3. Change the hostname and IP correspondence

--Set the hostname, or you can directly modify the configuration file/etc/sysconfig/network, but this is a reboot before it works
" s/hostname=localhost.localdomain/hostname=db_2/g " /etc/sysconfig/Network
--If you do not want to restart, use the following command to make the current #hostname db_2

--Add host name and IP correspondence record
#vi/etc/hosts
10.10.0.48 db_2

4. Turn off SELinux

--I have not shut down selinux myself, this is provided online to say need to close the
" s/selinux=enforcing/selinux=disabled/ "/etc/selinux/config 0

5. Download ORACLE11GR2

Official website: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html

Two. modifying kernel parameters

1./etc/sysctl.conf

--Modify or add, specific parameter meaning, please Baidu or refer to Oracle website to explain
#vi/etc/sysctl.conf Net.ipv4.ip_local_port_range=9000 65500
Fs.file-max =6815744Kernel.shmall=10523004Kernel.shmmax=6465333657Kernel.shmmni=4096Kernel.sem= - 32000 100128Net.core.rmem_default=262144Net.core.wmem_default=262144Net.core.rmem_max=4194304Net.core.wmem_max=1048576Fs.aio-MAX-NR =1048576# Sysctl-P #使配置生效

2. User's restricted file/etc/security/limits.conf

#vim/etc/security/limits.conf add Oracle           soft    nproc           2047  Oracle Hard    Nproc            16384 Oracle           Soft    nofile            Oracle hard    nofile            65536  Oracle           soft    stack           10240

--Modify the/etc/pam.d/login file and add the following:
Session required/lib64/security/pam_limits.so//64 for the system, do not write/lib/security/pam_limits.so, otherwise you cannot log in
Session Required Pam_limits.so

Three. Create users and Groups

Create users and Groups
#groupadd Oinstall
#groupadd DBA
#useradd-G oinstall-g dba-d/home/u11 Oracle
#passwd Oracle

Create the installation directory #mkdir-p/opt/app/oracle/product/11.2. 0/dbhome_1
-p/opt/app/oracle/oradata//Data Recovery Catalog
-p/opt/app/oracle/Log directory during the creation and use of recovery_area//database
-p/opt/app/oracle/orainventory

Modify installation directory Permissions
#chown-R oracle:oinstall/opt/app/oracle
#chmod 775/opt/app/oracle
Log in to Oracle user, set environment variables
#su-oracle
$view. Bash_profile

Export Oracle_base=/opt/app/oracle
Export Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1
Export path= $PATH: $ORACLE _home/bin

Export classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib
Export Ld_library_path= $ORACLE _home/lib:/lib64:/usr/lib64:/usr/local/lib64
Export Oracle_sid=wetalk

If you set Nls_lang, it is easy to generate an import SQL or DMP error, because other environments are not UTF8

Export Nls_lang=american_america. Al32utf8

$source. Bash_profile   //Make settings effective

Four. Install Oracle

1. Installing dependent Packages

# yum-y Install gcc gcc-c++ make binutilscompat-libstdc++- elfutils-libelf elfutils-libelf-develglibc Glibc-commonglibc-devel Libaio libaio-devel libgcclibstdc++libstdc++-devel unixODBC unixodbc--y Installbinutils compat-libstdc++- compat-libstdc++-. i686 elfutils- Libelfelfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel Glibc-devel.i686glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcclibgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make Sysstat unixODBCUnixODBC-devel

2. Unzip the installation package

3. Database Installation

DB_INSTALL.RSP Installation Answer profile

DBCA.RSP Creating a Database answer

NETCA.RSP setting up the listening, local service name and other network setup responses

3.1 Modify the configuration file Db_install.rsp and install

Below the main changes in the place, detailed documents, please check another article:

oracle.install.option=Install_db_swonlyoracle_hostname=Db_m2unix_group_name=oinstallinventory_location=/opt/app/oracle/orainventoryselected_languages=En,zh_cnoracle_home=/opt/app/oracle/product/11.2.0/Db_1oracle_base=/opt/app/oracleoracle.install.db.InstallEdition=EEoracle.install.db.DBA_GROUP=Dbaoracle.install.db.OPER_GROUP=Oinstalloracle.install.db.config.starterdb.characterSet=AL32UTF8oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGEoracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/opt/app/oracle/oradataoracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/opt/app/oracle/recovery_datadecline_security_updates=true    //be sure to set to True

Log in to an Oracle user, perform the installation


During the installation, if [WARNING] is not heeded, the installer is still in progress, and if [FATAL] is present, the Setup program has stopped.
Open another terminal, execute the command
#tail -100 F/u01/app/oracle/orainventory/logs/installactions......log

You can track the installation logs in real time to see the progress of the installation.
When it appears


The following configuration script needs to be executed as a "root" user.
#!/bin/sh
#要运行的 Root Script

/u01/app/oracle/orainventory/orainstroot.sh
/u01/app/oracle/product/11.2.0/db_1/root.sh
To perform a configuration script, do the following:
1. Open a terminal window
2. Log in as "root"
3. Run the script
4. Return to this window and press "Enter" key to continue

Successfully Setup software.

If this is the case, the installation is successful, you need to follow the prompts, and return to enter after operation is successful

    

3.2 Configuring the Listener profile RESPONSE/NETCA.RSP

$NETCA/silent/responsefile response/NETCA.RSP is parsing the command-line arguments: Parameters"Silent"=trueParameters"Responsefile"=/home/oracle/response/NETCA.RSP completes parsing of command-line arguments. Oracle Net Services Configuration: Complete profile configuration. Oracle Net Listener Startup: Running monitoring program:/opt/oracle/11.2.0/bin/lsnrctl start LISTENER monitoring program is complete. The listener has successfully started. The listener configuration is complete. Successfully completed Oracle Net Services configuration//after running successfully, generate the Sqlnet.ora and Listener.ora two files in the/opt/oracle/11.2.0/network/admin directory. //after completing the command "NETSTAT-TLNP" you can see that port 1521 is openTcp0   0:::1521:::* LISTEN5477/tnslsnr

3.3 Modifying the configuration file response/dbca.rsp, creating a new library silently

Responsefile_version ="11.2.0"  //cannot be changedOperation_type ="CreateDatabase"Gdbname="hello.dlxg.gov.cn"  //Global database name =sid+ host domain nameSID ="Hello"    //the corresponding instance nameTemplateName ="General_purpose.dbc" //template files for building librariesDatafiledestination =/opt/oracle/oradata//data File storage directoryRecoveryareadestination=/opt/oracle/recovery_data//Recover data Storage directoryCHARACTERSET ="Al32utf8"   //character sets, important!!! After the building of the general can not be changed, so to establish a clear before building the library. TotalMemory ="5120"    //Oracle Memory 5120MB

After the configuration is complete, execute the command

$DBCA-SILENT-RESPONSEFILE/ETC/DBCA.RSP

1% completed
3% completed
11% completed
18% completed
26% completed
37% completed
Creating and Starting Oracle instance
40% completed
45% completed
50% completed
55% completed
56% completed
60% completed
62% completed
Database creation in progress

66% completed
70% completed
73% completed
85% completed
96% completed
100% completed
For more information, see log File "/u01/app/oracle/cfgtoollogs/dbca/wang/wang.log".

viewing log files
$ cat/u01/app/oracle/cfgtoollogs/dbca/wang/wang.log

Five. Open the archive mode and make the archive directory

For more details, please check out another article:

"Reprint" "Centos Linux System" command line (silent) install Oracle 11gR2

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.