In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I read many articles about silently installing Oracle on Linux before, but I always felt that there was a problem during the installation test. Later, I directly found the official English document of Oracle and carefully read and studied the contents of the rsp file. After my own installation test in the virtual machine, I used RedHat 6.5 (kernel version: 2.6.32-431.el6.x86_64) to install Oracle 11gR2 silently (version: 11.2.0.3), and sorted out this article. It mainly includes environmental requirements and preparation, silent installation of Oracle software and monitoring, silent installation of Oracle database, check after installation, setting Oracle boot automatic startup and so on.
I. Environmental requirements and preparation
1. Hardware requirements
(1) memory
Minimum: 1 GB of RAM
Recommended: 2 GB of RAM or more
To determine the RAM size, enter the following command:
# grep MemTotal / proc/meminfo
(2) SWAP
Available RAM Swap Space Required
Between 1 GB and 2 GB 1.5-times the size of the RAM
Between 2 GB and 16 GB-Equal to the size of the RAM
More than 16 GB-16 GB
# grep SwapTotal / proc/meminfo
(3) ASM
Automatic Memory Management feature requires more shared memory (/ dev/shm) and file descriptors
# df-h / dev/shm/
Note: MEMORY_MAX_TARGET and MEMORY_TARGET cannot be used when LOCK_SGA is enabled or with HugePages on Linux.
(4) disk space
At least 1 GB of disk space in the / tmp directory
Enterprise Edition-At least 4.7 GB for Software Files and 1.7 GB for Data Files
Standard Edition-- At least 4.6 GB for Software Files and 1.5 GB for Data Files
2. Software requirements
(1) operating system requirements
■ Asianux Server 3 SP2
■ Asianux Server 4 SP3
■ Oracle Linux 4 Update 7
■ Oracle Linux 5 Update 2 (with Red Hat Compatible Kernel)
■ Oracle Linux 5 Update 5
■ Oracle Linux 6
■ Oracle Linux 6 (with Red Hat Compatible Kernel)
■ Oracle Linux 7
■ Oracle Linux 7 (with the Red Hat Compatible Kernel)
■ Red Hat Enterprise Linux 4 Update 7
■ Red Hat Enterprise Linux 5 Update 2
■ Red Hat Enterprise Linux 6
■ Red Hat Enterprise Linux 7
■ SUSE Linux Enterprise Server 10 SP2
■ SUSE Linux Enterprise Server 11
(2) Kernel requirements
■ On Red Hat Enterprise Linux 5 Update 5
2.6.18 or later
■ On Red Hat Enterprise Linux 6
2.6.32-71.el6.x86_64 or later
■ On Red Hat Enterprise Linux 7
3.10.0-54.0.1.el7.x86_64 or later
(3) dependent package requirements
Note: Starting with Oracle Database 11g Release 2 (11.2.0.2), all the 32-bit packages, except for gcc-32bit-4.3, listed in the following table are no longer required for installing a database on Linux x86-64. Only the 64-bit packages are required. However, for any Oracle Database 11g release before 11.2.0.2, both the 32-bit and 64-bit packages listed in the following table are required.
The following or later version of packages for Oracle Linux 6, Red Hat Enterprise Linux 6, and Asianux Server 4 must be installed:
Binutils-2.20.51.0.2-5.11.el6 (x86 / 64)
Compat-libcap1-1.10-1 (x86x64)
Compat-libstdc++-33-3.2.3-69.el6 (x86x64)
Compat-libstdc++-33-3.2.3-69.el6.i686
Gcc-4.4.4-13.el6 (x86 / 64)
Gcc-c++-4.4.4-13.el6 (x86 / 64)
Glibc-2.12-1.7.el6 (i686)
Glibc-2.12-1.7.el6 (x86 / 64)
Glibc-devel-2.12-1.7.el6 (x86 / 64)
Glibc-devel-2.12-1.7.el6.i686
Ksh
Libgcc-4.4.4-13.el6 (i686)
Libgcc-4.4.4-13.el6 (x86 / 64)
Libstdc++-4.4.4-13.el6 (x86 / 64)
Libstdc++-4.4.4-13.el6.i686
Libstdc++-devel-4.4.4-13.el6 (x86 / 64)
Libstdc++-devel-4.4.4-13.el6.i686
Libaio-0.3.107-10.el6 (x86 / 64)
Libaio-0.3.107-10.el6.i686
Libaio-devel-0.3.107-10.el6 (x86 / 64)
Libaio-devel-0.3.107-10.el6.i686
Make-3.81-19.el6
Sysstat-9.0.4-11.el6 (x86 / 64)
(4) ODBC requirements
On Oracle Linux 6, Red Hat Enterprise Linux 6:
UnixODBC-2.2.14-11.el6 (x86 / 64) or later
UnixODBC-2.2.14-11.el6.i686 or later
UnixODBC-devel-2.2.14-11.el6 (x86 / 64) or later
UnixODBC-devel-2.2.14-11.el6.i686 or later
3. User and group requirements
The following local operating system groups and users are required if you are installing Oracle Database:
■ The Oracle Inventory group (typically, oinstall)
■ The OSDBA group (typically, dba)
■ The Oracle software owner (typically, oracle)
■ The OSOPER group (optional. Typically, oper)
# grep dba / etc/group
# id oracle
# groupadd dba
# groupadd oinstall
If the oracle user exists:
# / usr/sbin/usermod-g oinstall-G dba oracle
If the oracle user does not exist:
# / usr/sbin/useradd-g oinstall-G dba oracle
Set the password:
# passwd oracle
4. Kernel parameter requirements
Note: If the current value of any parameter is higher than the value listed in this table, then do not change the value of that parameter. The original origin of this article: Jiang Jianlong's technology blog http://jiangjianlong.blog.51cto.com/3735273/1832986
Modify method:
Create or edit the / etc/sysctl.conf file, and add or edit lines similar to the following:
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
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
Note: if any of the current values are larger than the
Minimum value, then specify the larger value .
To bring into effect:
# / sbin/sysctl-p or reboot
If you run the # sysctl-p command to report an error
Error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
Error: "net.bridge.bridge-nf-call-iptables" is an unknown key
Error: "net.bridge.bridge-nf-call-arptables" is an unknown key
The solution is to execute the following command:
# modprobe bridge
View:
# / sbin/sysctl-a
5. Resource restriction requirements
After the modification, you must use the Oracle user to log out and then log in.
$ulimit-Sn
4096
$ulimit-Hn
65536
$ulimit-Su
2047
$ulimit-Hu
16384
$ulimit-Ss
10240
$ulimit-Hs
32768
Modify method:
Vi / etc/security/limits.conf
Add the following at the end:
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 4096
Oracle hard nofile 65536
Oracle hard stack 32768
6. Create the installation directory
Oracle_Base directory: / u01/app/oracle/
Oracle_Home directory: / u01/app/oracle/11gr2
Oracle inventory directory: / u01/app/oracle/oraInventory
7. Configure Oracle user environment variables
Vi / home/oracle/.bash_profile
Export EDITOR=vi
Export ORACLE_SID=orcl
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=$ORACLE_BASE/11gr2
Export nls_date_format= "yyyy-mm-dd hh34:mi:ss"
Export PATH=/u01/app/oracle/11gr2/bin:$PATH
Execute the command ource .bash _ profile to make the configuration effective
8. Edit / etc/profile
Vi / etc/profile
Add at the end:
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
The original origin of this article: Jiang Jianlong's technology blog http://jiangjianlong.blog.51cto.com/3735273/1832986
Silent installation of Oracle software and monitoring
1. Silent installation command
$/ directory_path/runInstaller [- silent] [- noconfig]-responseFile responsefilename
■-noconfig suppresses running the configuration assistants during installation
And a software-only installation is performed instead.
■ responsefilename is the full path and filename of the installation response
File that you configured.
2. Edit the answer file db_install.rsp
Change the following contents, others do not need to be changed, marked orange should be combined with the actual environment to change. Oracle version: 11.2.0.3
Oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=rh7
UNIX_GROUP_NAME=oinstall
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/11gr2
ORACLE_BASE=/u01/app/oracle/
INVENTORY_LOCATION=/u01/app/oraInventory
Oracle.install.db.InstallEdition=EE
Oracle.install.db.DBA_GROUP=dba
Oracle.install.db.OPER_GROUP=oinstall
DECLINE_SECURITY_UPDATES=true
Oracle.install.db.EEOptionsSelection=false
3. Execute the silent installation Oracle command
. / runInstaller-silent-noconfig-ignorePrereq-responseFile / oracle11gr2zip/db_install.rsp
4. Use root login to execute the script
5. Execute silent installation monitoring command
There is no need to modify the contents of the answer file, just use the netca.rsp file in the media
[oracle@rh7 database] $netca / silent / responseFile / oracle11gr2zip/database/resp
Onse/netca.rsp
3. Silently install Oracle database
1. Edit dbca.rsp
Change the following content, other do not need to change, marked orange content need to be modified according to their own actual environment
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
GDBNAME = "orcl"
SID = "orcl"
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "p@ssw0rd"
SYSTEMPASSWORD = "p@ssw0rd"
EMCONFIGURATION = "LOCAL"
SYSMANPASSWORD = "p@ssw0rd"
DBSNMPPASSWORD = "p@ssw0rd"
STORAGETYPE=FS
CHARACTERSET = "ZHS16GBK"
NATIONALCHARACTERSET= "AL16UTF16"
MEMORYPERCENTAGE = "40"
TOTALMEMORY = "1024"
2. Execute the silent installation database command
$dbca-silent-responseFile / oracle11gr2zip/dbca.rsp
4. Check after installation is completed
1. Check the monitoring status
$lsnrctl status
2. Check the Oracle process
$ps-ef | grep ora_ | grep-v grep
3. Log in to Oracle database and execute common query commands
4. Log in to EM
Configure Oracle to boot automatically
1. Log in as Oracle and edit oratab
Vi / etc/oratab, change N to Y
The original origin of this article: Jiang Jianlong's technology blog http://jiangjianlong.blog.51cto.com/3735273/1832986
2. Log in to root and create a script
Vi / etc/init.d/oracle, create the oracle file as follows:
#! / bin/sh
# chkconfig: 35 80 10
# description: Oracle auto start-stop script.
#
# Set ORACLE_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut
#
# Set ORACLE_OWNER to the user id of the owner of the
# Oracle database in ORACLE_HOME.
ORACLE_HOME=/u01/app/oracle/11gr2
ORACLE_OWNER=oracle
If [!-f $ORACLE_HOME/bin/dbstart]
Then
Echo "Oracle startup: cannot start"
Exit
Fi
Case "$1" in
'start')
# Start the Oracle databases:
Echo "Starting Oracle Databases..."
Echo "- -" > > / var/log/oracle
Date + "% T% a% D: Starting Oracle Databases as part of system up." > > / var/log/oracle
Echo "- -" > > / var/log/oracle
Su-$ORACLE_OWNER-c "$ORACLE_HOME/bin/dbstart" > > / var/log/oracle
Echo "Done"
# Start the Listener:
Echo "Starting Oracle Listeners..."
Echo "- -" > > / var/log/oracle
Date + "% T% a% D: Starting Oracle Listeners as part of system up." > > / var/log/oracle
Echo "- -" > > / var/log/oracle
Su-$ORACLE_OWNER-c "$ORACLE_HOME/bin/lsnrctl start" > > / var/log/oracle
Echo "Done."
Echo "- -" > > / var/log/oracle
Date + "% T% a% D: Finished." > > / var/log/oracle
Echo "- -" > > / var/log/oracle
Touch / var/lock/subsys/oracle
'stop')
# Stop the Oracle Listener:
Echo "Stoping Oracle Listeners..."
Echo "- -" > > / var/log/oracle
Date + "% T% a% D: Stoping Oracle Listener as part of system down." > > / var/log/oracle
Echo "- -" > > / var/log/oracle
Su-$ORACLE_OWNER-c "$ORACLE_HOME/bin/lsnrctl stop" > > / var/log/oracle
Echo "Done."
Rm-f / var/lock/subsys/oracle
# Stop the Oracle Database:
Echo "Stoping Oracle Databases..."
Echo "- -" > > / var/log/oracle
Date + "% T% a% D: Stoping Oracle Databases as part of system down." > > / var/log/oracle
Echo "- -" > > / var/log/oracle
Su-$ORACLE_OWNER-c "$ORACLE_HOME/bin/dbshut" > > / var/log/oracle
Echo "Done."
Echo ""
Echo "- -" > > / var/log/oracle
Date + "% T% a% D: Finished." > > / var/log/oracle
Echo "- -" > > / var/log/oracle
'restart')
$0 stop
$0 start
Esac
3. Give permission to the script
4. Set up boot boot
5. Test the script effect
(1) close the database
(2) Log in using root and execute the command service oracle start
(3) Log in to the database to check. The database is already running and the monitoring is normal.
(4) execute service oracle stop
(5) check monitoring and database have been closed
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.