In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Environmental preparation
Host: CentOS Linux release 7.3.1611
Docker Version: 1.12.5
Oracle 11.2.0.4
Basic image: docker.io/centos
Main steps
1. Run the container using a centos image
Docker run-it-p 192.168.10.51 name os4oracle-v / container_data/oracle_data:/oracle docker.io/centos
PS: extracted the Oracle installation file to / container_data/oracle_data/database on the host
two。 Do the following in the container
Groupadd dba
Groupadd oinstall
Useradd-m-g oinstall-G dba oracle
Passwd oracle
Useradd nobody
Mkdir-p / opt/oracle
Mkdir-p / opt/oracle/product/11.2.0/db_1
Chown-R oracle:dba / opt
Chmod-R 775 / opt
Yum-y install gcc
Yum-y install make
Yum-y install binutils
Yum-y install gcc-c++
Yum-y install compat-libstdc++-33
Yum-y install elfutils-libelf-devel
Yum-y install elfutils-libelf-devel-static
Yum-y install ksh
Yum-y install libaio
Yum-y install libaio-devel
Yum-y install numactl-devel
Yum-y install sysstat
Yum-y install unixODBC
Yum-y install unixODBC-devel
Yum-y install pcre-devel
/ etc/security/limits.conf
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
/ etc/sysctl.conf
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 936870912
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
/ home/oracle/.bash_profile
Export ORACLE_BASE=/opt/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
Export ORACLE_SID=orcl
Export ORACLE_TERM=xterm
Export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
Export LANG=en_US
Export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
3. Prepare the answer files needed for silent installation and the template files needed to create the database (generated in a visual environment)
In this example, the db_install.rsp content is as follows:
Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
Oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/opt/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/opt/oracle/product/11.2.0/db_1
ORACLE_BASE=/opt/oracle
Oracle.install.db.InstallEdition=EE
Oracle.install.db.EEOptionsSelection=true
Oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0
Oracle.install.db.DBA_GROUP=dba
Oracle.install.db.OPER_GROUP=dba
Oracle.install.db.CLUSTER_NODES=
Oracle.install.db.isRACOneInstall=
Oracle.install.db.racOneServiceName=
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.characterSet=ZHS16GBK
Oracle.install.db.config.starterdb.memoryOption=true
Oracle.install.db.config.starterdb.memoryLimit=512
Oracle.install.db.config.starterdb.installExampleSchemas=false
Oracle.install.db.config.starterdb.enableSecuritySettings=true
Oracle.install.db.config.starterdb.password.ALL=oracle
Oracle.install.db.config.starterdb.password.SYS=
Oracle.install.db.config.starterdb.password.SYSTEM=
Oracle.install.db.config.starterdb.password.SYSMAN=
Oracle.install.db.config.starterdb.password.DBSNMP=
Oracle.install.db.config.starterdb.control=DB_CONTROL
Oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
Oracle.install.db.config.starterdb.automatedBackup.enable=false
Oracle.install.db.config.starterdb.automatedBackup.osuid=
Oracle.install.db.config.starterdb.automatedBackup.ospwd=
Oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
Oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/oracle/oracle_data
Oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
Oracle.install.db.config.asm.diskGroup=
Oracle.install.db.config.asm.ASMSNMPPassword=
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
Oracle.installer.autoupdates.option=
Oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
Build database template file
Generate it through dbca in a visual environment, and focus on changing the parameter JAVA_JIT_ENABLED to false.
The contents of the template file generated in this example are as follows:
[root@srv5 oracle_data] # cat orcl.dbc
MULTIPURPOSE
twenty
forty
False
False
{ORACLE_BASE} / admin/ {DB_UNIQUE_NAME} / pfile/init.ora
{ORACLE_HOME} / dbs/spfile {SID} .ora
{ORACLE_HOME} / assistants/dbca/templates/Seed_Database.dfb
Seeddata
{ORACLE_BASE} / oradata/ {DB_UNIQUE_NAME} / system01.dbf
{ORACLE_BASE} / oradata/ {DB_UNIQUE_NAME} / sysaux01.dbf
{ORACLE_BASE} / oradata/ {DB_UNIQUE_NAME} / undotbs01.dbf
{ORACLE_BASE} / oradata/ {DB_UNIQUE_NAME} / users01.dbf
{ORACLE_BASE} / oradata/ {DB_UNIQUE_NAME} / temp01.dbf
one hundred
sixteen
three
one
eight
False
51200
one
False
51200
one
False
51200
one
4. Install oracle software silently
. / runInstaller-ignoreSysPrereqs-ignorePrereq-silent-responseFile / home/oracle/db_install.rsp
5. Silently create a database
Dbca-silent-createDatabase-templateName / home/oracle/orcl.dbc-gdbName orcl-sid orcl-responseFile NO_VALUE-characterSet ZHS16GBK
The script starts to run after entering the password twice on the screen
6. At this point, the database has been successfully installed and can be tested by itself. You can also save the secondary container as a mirror for subsequent use.
PS: if you do not change JAVA_JIT_ENABLED to false in step 3, you will encounter the following problems:
After the database creation script is suspended at 76%, check the log and you will find the following error:
[root@2c9aedc92450 orcl] # cat postDBCreation.log
BEGIN
*
ERROR at line 1:
ORA-29516: Aurora assertion failure: Assertion failure at joez.c:3422
Bulk load of method java/lang/Object. Failed; insufficient shm-object space
ORA-06512: at line 3
IF CatbundleCreateDir (: catbundleLogDir) = 0 THEN
*
ERROR at line 71:
ORA-06550: line 71, column 14:
PLS-00201: identifier 'CATBUNDLECREATEDIR' must be declared
ORA-06550: line 71, column 11:
PL/SQL: Statement ignored
Find out the solution to the problem online:
Http://blog.csdn.net/xiangsir/article/details/18740803
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.