CentOS Silent Installation Oracle 11gR2 (x64)

Source: Internet
Author: User
Tags chmod dba mkdir sqlplus


Environment

Os:centos 7.4; hosts:l134; ip:192.168.1.134
DB:linux.x64_11gR2_database


Install dependent packages



yum install -y binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl sysstat libXp unixODBC unixODBC-devel

 


Create the directory of the installation files (directory not limited, as long as the space is enough), and upload the installation files






mkdir -p /opt/oracle_install
cd /opt/oracle_install/
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip


Install Pdksh, notice will not conflict with Ksh






wget http://vault.centos.org/5.11/os/i386/CentOS/pdksh-5.2.14-37.el5_8.1.i386.rpm
yum localinstall pdksh-5.2.14-37.el5_8.1.i386.rpm


Create a Linux account






groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle

passwd oracle
123456


Configure kernel parameters (modify or add the following)




vim /etc/sysctl.conf

kernel.shmall = 2097152
# kernel.shmmax minimum: 536870912, maximum: 1 byte less than physical memory, it is recommended to exceed half of physical memory
kernel.shmmax = 2147483648
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 1048576


Configuration takes effect




sysctl -p


Modify User Limits






vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240


hostname corresponds to IP




vim /etc/hosts192.168.1.134 L134


Create an Oracle installation directory






mkdir -p /data/app/oraInventory
chown -R oracle:oinstall /data/app
chmod 755 /data/app


Upload the installation files and unzip






cd /opt/oracle_install
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
Switch users and modify configuration files (the following are configured and executed with Oracle account)




su - oracle
vim /home/oracle/.bash_profile

ORACLE_BASE=/data/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
ORACLE_SID=orcl
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

export NLS_LANG=AMERICAN
export NLS_DATE_FORMAT=‘YYYY-MM-DD HH24:MI:SS‘


source /home/oracle/.bash_profile


Configuring the Silent installation file




mkdir -p / home / oracle / rsp
cp / opt / oracle_install / database / response / * / home / oracle / rsp
cd / home / oracle / rsp
chmod 700 *
vim db_install.rsp

oracle.install.option = INSTALL_DB_SWONLY
ORACLE_HOSTNAME = L134
UNIX_GROUP_NAME = oinstall
INVENTORY_LOCATION = / data / app / oraInventory
SELECTED_LANGUAGES = en
ORACLE_HOME = / data / app / oracle / product / 11.2.0 / db_1
ORACLE_BASE = / data / app / oracle
oracle.install.db.InstallEdition = EE
#Custom installation, no, use default components
oracle.install.db.isCustomInstall = false
oracle.install.db.DBA_GROUP = dba
oracle.install.db.OPER_GROUP = oper
#Database type; the comment says GENERAL_PURPOSE / TRANSACTION_PROCESSING and DATA_WAREHOUSE are candidates,
#But the former can only choose one from the other, so be careful.
oracle.install.db.config.starterdb.type = GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName = orcl
oracle.install.db.config.starterdb.SID = orcl
oracle.install.db.config.starterdb.memoryOption = false
oracle.install.db.config.starterdb.memoryLimit = 2048
#All database users use the same password
oracle.install.db.config.starterdb.password.ALL = root123
DECLINE_SECURITY_UPDATES = true
Start installation


/opt/oracle_install/database/runInstaller -silent -responseFile /home/oracle/rsp/db_install.rsp


Installation successful with the following tips






The following configuration scripts need to be executed as the "root" user. 
#!/bin/sh 
#Root scripts to run

/data/app/oraInventory/orainstRoot.sh
/data/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.


Installation log




/data/app/oracle/oraInventory/logs/installActionsXXXX.log
Execute the following two scripts as root ID (this step needs to be switched to root account execution)




su -
/data/app/oracle/oraInventory/orainstRoot.sh
/data/app/oracle/product/11.2.0/db_1/root.sh
Configure monitoring (switch to Oracle account)



su - oracle
netca /silent /responseFile /home/oracle/rsp/netca.rsp 


Monitor installation Successful There are similar following tips






Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /home/oracle/rsp/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /data/app/oracle/product/11.2.0/db_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
DBCA Build Library Modify answer File




vim /home/oracle/rsp/dbca.rsp

[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "orcl"
SID = "orcl"
TEMPLATENAME = "General_Purpose.dbc"
CHARACTERSET = "AL32UTF8"
Start creating a Database


Note under XSHELL5, after executing the DBCA command, will automatically clear the screen, does not display the required input SYS and the system user's password, is actually to enter two times the same password.





dbca -silent -responseFile /home/oracle/rsp/dbca.rsp 
Enter SYS user password: 
Enter SYSTEM user password: 


Tips for creating a complete






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 "/data/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.


As of this, Oracle is already installed and can log on using Sqlplus.





Extended


Enhanced editing capabilities for Sqlplus






su -
cd /opt/oracle_install
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
yum install readline rlwrap -y

su - oracle
echo ‘alias sqlplus=‘"‘"‘rlwrap sqlplus‘"‘" >> /home/oracle/.bash_profile
echo ‘alias rman=‘"‘"‘rlwrap rman‘"‘" >> /home/oracle/.bash_profile


Beautify the display of Sqlplus






echo ‘set linesize 300‘ >> $ORACLE_HOME/sqlplus/admin/glogin.sql
echo ‘set pagesize 50000‘ >> $ORACLE_HOME/sqlplus/admin/glogin.sql
echo ‘set timing on‘ >> $ORACLE_HOME/sqlplus/admin/glogin.sql
Installation failure


Careful review of error hints and installation logs, which can be found in the installation log, usually locates problems such as configuration file errors, dependency package problems, or other prerequisites that are not met.



The completed abort log is not installed under/tmp/orainstallxxxxx/, where xxxx is the installation date,


Fault 1




[[email protected] ~]$ sqlplus
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory


Cause: The environment variable is not configured or has a problem with configuration




[[email protected] ~]$ echo $ORACLE_HOME/data/oracle/11g2a


Find the path of oracle_home wrong, correct and then source once.


Fault 2


No orainstroot.sh files when reinstalling Oracle
Only prompt to run:/data/oracle/product/10.2.0/crs_1/root.sh this file.



Cause: The/etc/orainst.loc file was not deleted


Fault 3


Silent installation of Oracle prompt: "[SEVERE]-Email Address not Specified"
System environment: CentOS 6.3 x86_64 + Oracle 11gR2



Workaround:
Modify the Responsefile file to set the value of decline_security_updates= to TRUE if the null system assumes that the value of false,decline_security_updates= is empty by default.


Fault 4




Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 37373 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4999 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-03-07_07-08-17PM. Please wait ...
Invalid source path ‘../stage/Components/oracle.jdk/1.5.0.17.0/1/DataFiles‘ specified for unzip. Unzip command failed.   
Please check oraparam.ini and specify a valid source path.
No such file or directory


Check:


    1. installation files No problem
    2. The path where the installation files are stored, not the Chinese path
    3. Installation path, do not have Chinese.
Fault 5


[FATAL] [INS-13013] Target Environment does not meet some mandatory requirements.
Cause:some of the mandatory prerequisites is not met.



Workaround:
View the installation log in detail. Search Severe,failed,severity,critical,error These few keywords to see why there is no pass through the checksum.
If there is no way, such as the CentOS 6.x 64-bit, the glibc-2.12-1.209.el6_9.2.x86_64 has been installed, but in the test, the following error occurred. This test can be ignored because oracel requires that the glibc-2.3.4-2.41 (i686) be 32-bit, but the 64-bit updated version is actually installed. Found 32-bit old version of glibc, but dead and alive installed. Finally can only add-ignoreprereq parameters, but it is best to pass the test is better.






955-INFO: *********************************************
956-INFO: Package: glibc-2.3.4-2.41: This is a prerequisite condition to test whether the package "glibc-2.3.4-2.41" is available on the system.
957-INFO: Severity:CRITICAL
958:INFO: OverallStatus:VERIFICATION_FAILED
959-INFO: -----------------------------------------------
960-INFO: Verification Result for Node:oracletest1
961-INFO: Expected Value:glibc-2.3.4-2.41 (i686)
962-INFO: Actual Value:missing
963-INFO: Error Message:PRVF-7532 : Package "glibc-2.3.4-2.41 (i686)" is missing on node "134test"
964-INFO: Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.
965-INFO: Action: Ensure that the required package is installed and available.
966-INFO: -----------------------------------------------
Fault


View the installation log, in addition to some warning, also found a few verification_failed, but all are ignorable. Check carefully that these dependencies are already installed. Here are some of them.




797 INFO: OS Kernel Parameter: semmni: This is a prerequisite condition to test whether the OS kernel parameter "semmni" is properly set.
  798 INFO: Severity:IGNORABLE
  799 INFO: OverallStatus:VERIFICATION_FAILED
  800 INFO: -----------------------------------------------
  801 INFO: Verification Result for Node:134test
  802 INFO: Expected Value:128
  803 INFO: Actual Value:0
  804 INFO: Error Message:PRVF-7543 : OS Kernel parameter "semmni" does not have proper value on node "134test" [Expected = "128" ; Found = "0"].
  805 INFO: Cause: Kernel parameter value does not meet the requirement.
  806 INFO: Action: Modify the kernel parameter value to meet the requirement.
  807 INFO: -----------------------------------------------


  926 INFO: Package: libaio-0.3.105: This is a prerequisite condition to test whether the package "libaio-0.3.105" is available on the system.
  927 INFO: Severity:IGNORABLE
  928 INFO: OverallStatus:VERIFICATION_FAILED
  929 INFO: -----------------------------------------------
  930 INFO: Verification Result for Node:134test
  931 INFO: Expected Value:libaio-0.3.105 (i386)
  932 INFO: Actual Value:missing
  933 INFO: Error Message:PRVF-7532 : Package "libaio-0.3.105 (i386)" is missing on node "134test"
  934 INFO: Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.
  935 INFO: Action: Ensure that the required package is installed and available.
  936 INFO: -----------------------------------------------





CentOS Silent Installation Oracle 11gR2 (x64)


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.