In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to silently install Oracle, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to know about it.
Oracle Database, also known as Oracle RDBMS, or Oracle for short. It is a relational database management system of Oracle. It is a leading product in the field of database. It can be said that Oracle database system is a popular relational database management system in the world at present. The system has good portability, easy to use and strong function, and is suitable for all kinds of large, medium, small and microcomputer environments. It is a database solution with high efficiency and good reliability, which adapts to high throughput.
Environment configuration
1. Install centos6.5 operating system
Physical memory is not less than 1G
The hard disk can have no less than 5G of space.
Swap zone space is not less than 2G
Support graphics cards with more than 256 colors
The main frequency of cpu is not less than 550mHZ
2. Download the oracle version of the installation package oracle11g_r2_x64
Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html
3. Configure the hosts file
Format: ip hostname
4. Configure the yum source
Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
Rpm-Uvh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Yum clean all & & yum makecache
5. Close selinux
Sed-I 7s/enforcing/disabled/g / etc/selinux/config
Reboot
Installation and deployment
1. Install oracle dependency package relationship
Yum install binutils compat-libcap1 compat-libstdc++ compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libaio libaio-devel make sysstat unixODBC unixODBC-devel-y
2. Modify kernel parameters
Kernel parameter tuning is reflected in the / etc/sysctl.conf file. It mainly includes some settings related to memory scheduling, port range, the number of open files, I _ swap O requests and so on, and the relevant values should not be lower than the installation requirements. After modification, execute the sysctl-p command to make the new configuration take effect immediately.
Vim / etc/sysctl.conf should be modified according to your actual situation. The kernel parameters are as follows
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 = 1048576
3. Modify kernel limit parameters
Vim / etc/security/limits.conf
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
The first line is to set a soft limit on the number of processes
Line 2 is to set the hard limit on the number of processes.
Line 3 is to set the soft limit on the number of files.
Line 4 is to set the hard limit on the number of files.
4. Create oracle accounts and groups
Groupadd oinstall
Groupadd dba
Useradd-g oinstall-G dba oracle
5. Create relevant database directories
Mkdir / u01
Mkdir / u01/app
Mkdir-p / u01/app/oracle/oradata / / the data directory where the database is stored
Mkdir-p / u01/app/oracle/oradata_back / / stores database backup files
Chmod-R 775 / u01/app
6. Modify the oracle environment variable
Vim / etc/proile (file added last)
Export TMP=/tmp
Export TMPDIR=$TMP
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
Export ORACLE_SID=ora11
Export ORACLE_TERM=xterm
Export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
Export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
7. Oracle resources are limited, and non-configuration will not affect the successful installation of oracle database. However, considering that poor sql statements take up server resources infinitely, resulting in no response to user requests for a long time, it is recommended to limit oracle user resources in advance.
Vim / 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
8. Extract the oracle binary package to the / opt directory (the extracted directory is named database by default)
Cp-rv / root/linux.x86* / opt
Unzip linux.x64_11gR2_database_1of2.zip
Unzip linux.x64_11gR2_database_2of2.zip
9. Modify and copy the configuration file
Extract the oracle file and enter the response directory
# cp * / etc
# vi / etc/db_install.rsp
Profile Settings-> http://blog.chinaunix.net/uid-23886490-id-3565908.html
Modify the response file vim / etc/db_install.rsp for installing Oracle software
Oracle.install.option=INSTALL_DB_SWONLY / / installation type, only database software is installed
ORACLE_HOSTNAME=test / / Host name (hostname query)
UNIX_GROUP_NAME=oinstall / / installation group
INVENTORY_LOCATION=/opt/oracle/oraInventory / / INVENTORY directory (left empty is the default)
SELECTED_LANGUAGES=en,zh_CN,zh_TW / / Select language
ORACLE_HOME=/opt/oracle/product/11.2.0/db_1 / / oracle_home
ORACLE_BASE=/opt/oracle / / oracle_base
Oracle.install.db.InstallEdition=EE / / oracle version
Oracle.install.db.isCustomInstall=false / / Custom installation, No, use default components
Oracle.install.db.DBA_GROUP=dba / / dba user group
Oracle.install.db.OPER_GROUP=oinstall / / oper user group
Oracle.install.db.config.starterdb.type=GENERAL_PURPOSE / / database type
Oracle.install.db.config.starterdb.globalDBName=orcl / / globalDBName
Oracle.install.db.config.starterdb.SID=orcl / / SID
Oracle.install.db.config.starterdb.memoryLimit=81920 / / automatically manage memory (M)
Oracle.install.db.config.starterdb.password.ALL=oracle / / set all database users to use the same password
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false (false written manually)
DECLINE_SECURITY_UPDATES=true / / set security update (there seems to be bug, this must be selected true, otherwise it will infinitely remind you that there is a problem with the email address and terminate the installation. PS: no matter whether the address is correct or not)
10, execute script reminder: switch to oracle user
# / u01/app/oracle/oraInventory/orainstRoot.sh
# / u01/app/oracle/product/11.2.0/db_1/root.sh
11. Silent configuration monitoring reminder: switch to oracle user
Netca / silent / responsefile / etc/netca.rsp
Note: the netca command is a command provided by oracle. If the command cannot be found, please check the environment variable.
12. Use the netstat-tlnp command to view the listening address reminder: switch to the oracle user
Tcp 0 0: 1521: * LISTEN 5477/tnslsnr
13. Silently create a new library reminder: switch to the oracle user (if the following parameters are repeated in the / etc/dbca.rsp file, you can change them all)
Modify / etc/dbca.rsp and set it as follows:
RESPONSEFILE_VERSION = "11.2.0" / / cannot be changed
OPERATION_TYPE = "createDatabase"
GDBNAME = "orcl" / / name of the global database = SID+ host domain name
SID = "orcl" / / corresponding instance name
TEMPLATENAME = "General_Purpose.dbc" / / template file for building the library
SYSPASSWORD = "123456" / / SYS administrator password
SYSTEMPASSWORD = "123456" / / SYSTEM administrator password
DATAFILEDESTINATION = / u01/app/oracle/oradata / / data file storage directory
RECOVERYAREADESTINATION=/u01/app/oracle/oradata_back / / restore the data storage directory
CHARACTERSET = "UTF-8" / / character set, important! Generally speaking, it cannot be changed after the database is built.
TOTALMEMORY = "5120" / / oracle memory 5120MB
14. The silent library building command is as follows (dbca is the oracle command. If the prompt command cannot be found, check the environment variable)
Dbca-silent-responseFile / etc/dbca.rsp
Database information:
Global database name:
System identifier (SID): indicates success if there is a relevant display
15. Check the oracle process status
Ps-ef | grep ora_ | grep-v grep
Lsnrctl status (lsnrctl is the oracle command)
16, login database reminder: switch to oracle user
Sqlplus / as sysdba
17, modify the oracle startup configuration file
After completing the installation of the oracle11g database, the relevant server will be enabled automatically, but it does not mean that the oracle server will still be available after the next boot. The following describes the basic service components of oracle and how to write service scripts to control the automatic operation of the oracle database system.
According to the above installation process, the database software for oracle11g will be installed in the location north of the variable ORACLE_HOME. For example, / opt/oracle/product/11.2.0/dbhome_1/, where the various server component programs (including the sqlplus command) are located in the bin subdirectory.
The basic service components of the Oracle11g database are as follows: (note: oracle service components are best run as oracle users such as: su-oracle)
Lsnrctl: listener program, used to provide database access, listening to TCP 1521 port by default.
Dbstart, dbshut: database control program, which is used to start and stop database instances.
Emctl: manager control tool, which is used to control the opening and closing of OEM platform. OEM platform provides HTTPS access through port 1158 and TCP access through port 5520.
In order to facilitate the execution of the oracle11g service component program, it is recommended to further optimize the environment configuration of all users, supplement the PATH path, oracle terminal type and other variable settings. In addition, the / etc/oratab configuration file should be modified so that the database instance is automatically enabled when running dbstart.
$vim / etc/oratab
Racl:/u01/app/oracle/product/11.2.0/db_1:Y / / change "N" to "Y"
This allows you to start the instance through dbstart or close it through dbshut.
$dbshut / u01/app/oracle/product/11.2.0/db_1/
Processing Database instance "hello": log file / u01/app/oracle/product/11.2.0/db_1/shutdown.log
At this point, all oracle processes shut down and listeners stop.
$dbstart / u01/app/oracle/product/11.2.0/db_1/
Processing Database instance "hello": log file / u01/app/oracle/product/11.2.0/db_1/startup.log
At this point, the listener works and the hello instance runs. Check the listener status again.
Thank you for reading this article carefully. I hope the article "how to install Oracle silently" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.