阿里云服务器静默安装Oracle 11.2.0.4.0 -64bit

2024-09-01 06:48

本文主要是介绍阿里云服务器静默安装Oracle 11.2.0.4.0 -64bit,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

阿里云服务器静默安装Oracle 11.2.0.4.0 -64bit

操作系统版本

[root@loneboo software]# cat /etc/redhat-release 

CentOS Linux release 7.4.1708 (Core) 

 

上传文件

[root@loneboo software]# ll

total 2487208

-rwxr-xr-x 1 root root 1395582860 Sep 29 14:22 p13390677_112040_Linux-x86-64_1of7.zip

-rwxr-xr-x 1 root root 1151304589 Sep 29 15:14 p13390677_112040_Linux-x86-64_2of7.zip

 

安装依赖包

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

 

添加swap

[root@loneboo ~]# mkdir /var/swap

[root@loneboo ~]# chmod 700 /var/swap

[root@loneboo ~]# cd /var/swap/

[root@loneboo swap]# dd if=/dev/zero of=./swapfile.swap bs=1M count=8192

8192+0 records out

8589934592 bytes (8.6 GB) copied, 56.534 s, 152 MB/s

[root@loneboo swap]# chmod 0600 swapfile.swap 

[root@loneboo swap]# mkswap swapfile.swap 

Setting up swapspace version 1, size = 8388604 KiB

no label, UUID=d6ed41a8-abd1-4963-9eae-048b2a723e8e

root@loneboo swap]# swapon swapfile.swap 

[root@loneboo swap]# vim /etc/fstab 

/var/swap/swapfile.swap  swap                                     swap    defaults        0 0

 

 

 

修改操作系统核心参数

修改用户的SHELL的限制,修改/etc/security/limits.conf文件

[root@loneboo software]# vi /etc/security/limits.conf

添加以下内容

oracle   soft    nproc    2047

oracle   hard    nproc    16384

oracle   soft    nofile     1024

oracle   hard    nofile    65536

 

修改/etc/pam.d/login 文件

[root@loneboo software]#  vi /etc/pam.d/login

添加以下内容

session   required    pam_limits.so

 

修改/etc/profile

[root@loneboo software]# 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

修改linux内核,修改/etc/sysctl.conf文件。

[root@loneboo ~]# vi /etc/sysctl.conf 

fs.file-max = 6815744 

fs.aio-max-nr = 1048576 

kernel.shmall = 2097152 

kernel.shmmax = 2147483648 

kernel.shmmni = 4096 

kernel.sem = 250 32000 100 128 

net.ipv4.ip_local_port_range = 9000 65500 

net.core.rmem_default = 4194304 

net.core.rmem_max = 4194304 

net.core.wmem_default = 262144 

net.core.wmem_max = 1048576

 

使/etc/sysctl.conf 更改立即生效,执行以下命令。

[root@loneboo ~]# sysctl -p

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

vm.swappiness = 0

net.ipv4.neigh.default.gc_stale_time = 120

net.ipv4.conf.all.rp_filter = 0

net.ipv4.conf.default.rp_filter = 0

net.ipv4.conf.default.arp_announce = 2

net.ipv4.conf.lo.arp_announce = 2

net.ipv4.conf.all.arp_announce = 2

net.ipv4.tcp_max_tw_buckets = 5000

net.ipv4.tcp_syncookies = 1

net.ipv4.tcp_max_syn_backlog = 1024

net.ipv4.tcp_synack_retries = 2

fs.file-max = 6815744

fs.aio-max-nr = 1048576

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

 

[root@loneboo ~]# groupadd oinstall

[root@loneboo ~]# groupadd dba

[root@loneboo ~]# groupadd oper

[root@loneboo ~]# useradd -g oinstall -G dba oracle

[root@loneboo ~]# passwd oracle

Changing password for user oracle.

New password: 

BAD PASSWORD: The password is shorter than 8 characters

Retype new password: 

passwd: all authentication tokens updated successfully.

 

[root@loneboo ~]# mkdir -p /u01/app/oracle/product/11.2.0/db_1

[root@loneboo ~]# mkdir -p /u01/app/oraInventory

[root@loneboo ~]# chown -R oracle:oinstall /u01/

[root@loneboo ~]# chmod -R 775 /u01/

 

[root@loneboo ~]# vi /home/oracle/.bash_profile

 

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

 

# User specific environment and startup programs

 

PATH=$PATH:$HOME/.local/bin:$HOME/bin

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

ORACLE_SID=orcl

PATH=$ORACLE_HOME/bin:$PATH

 

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

 

[root@loneboo ~]# su - oracle

Last login: Mon Oct  8 09:35:36 CST 2018 on pts/2

[oracle@loneboo ~]$ source ~/.bash_profile 

 

检查网络 

/etc/hosts

/etc/sysconfig/network

/etc/sysconfig/network-scripts/ifcfg-eth0

 

[root@loneboo ~]# vim /etc/hosts

127.0.0.1   localhost loneboo

 

解压软件,多个软件包解压 unzip linux.x64_11gR2_database_\*.zip

 

[root@loneboo ~]# cd /software/

[root@loneboo software]# unzip p13390677_112040_Linux-x86-64_\*.zip

 

[root@loneboo software]# ll

total 2487212

drwxr-xr-x 7 root root       4096 Aug 27  2013 database

 

修改安装包权限

[root@loneboo software]# chown -R oracle:oinstall database/

 

配置应答文件db_install.rsp

应答文件模版目录response在解压后database目录下

[root@loneboo software]# cd database/response/

[root@loneboo response]# ls

dbca.rsp  db_install.rsp  netca.rsp

 

oracle修改db_install.rsp

配置内容如下

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

oracle.install.option=INSTALL_DB_SWONLY

ORACLE_HOSTNAME=loneboo

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oraInventory

SELECTED_LANGUAGES=en,zh_CN

ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

ORACLE_BASE=/u01/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.EEOptionsSelection=false

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=oinstall

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=AL32UTF8

oracle.install.db.config.starterdb.memoryOption=true

oracle.install.db.config.starterdb.memoryLimit=

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=

oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=

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=

 

安装数据库

./runInstaller -silent -responseFile /software/database/response/db_install.rsp

[oracle@loneboo database]$ ./runInstaller -silent -responseFile /software/database/response/db_install.rsp

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 120 MB.   Actual 20781 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 8191 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-10-08_10-58-06AM. Please wait ...[oracle@loneboo database]$ [WARNING] [INS-13014] Target environment do not meet some optional requirements.

   CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2018-10-08_10-58-06AM/installActions2018-10-08_10-58-06AM.log

   ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2018-10-08_10-58-06AM/installActions2018-10-08_10-58-06AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.

You can find the log of this install session at:

 /u01/app/oraInventory/logs/installActions2018-10-08_10-58-06AM.log

 

The installation of Oracle Database 11g was successful.

Please check '/u01/app/oraInventory/logs/silentInstall2018-10-08_10-58-06AM.log' for more details.

 

As a root user, execute the following script(s):

        1. /u01/app/oraInventory/orainstRoot.sh

        2. /u01/app/oracle/product/11.2.0/db_1/root.sh

 

 

Successfully Setup Software.

 

[root@loneboo tmp]# sh /u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

[root@loneboo tmp]# sh /u01/app/oracle/product/11.2.0/db_1/root.sh

Check /u01/app/oracle/product/11.2.0/db_1/install/root_loneboo_2018-10-08_11-02-12.log for the output of root script

 

创建监听

[oracle@loneboo ~]$ netca -silent -responsefile /software/database/response/netca.rsp 

 

建立数据库

[oracle@loneboo database]$ cat response/dbca.rsp | grep -v '#' | grep -v '^$'

[GENERAL]

RESPONSEFILE_VERSION = "11.2.0"

OPERATION_TYPE = "createDatabase"

[CREATEDATABASE]

GDBNAME = "orcl"

SID = "orcl"

TEMPLATENAME = "General_Purpose.dbc"

[createTemplateFromDB]

SOURCEDB = "myhost:1521:orcl"

SYSDBAUSERNAME = "system"

TEMPLATENAME = "My Copy TEMPLATE"

[createCloneTemplate]

SOURCEDB = "orcl"

TEMPLATENAME = "My Clone TEMPLATE"

[DELETEDATABASE]

SOURCEDB = "orcl"

[generateScripts]

TEMPLATENAME = "New Database"

GDBNAME = "orcl"

[CONFIGUREDATABASE]

[ADDINSTANCE]

DB_UNIQUE_NAME = "orcl"

NODELIST=

SYSDBAUSERNAME = "sys"

[DELETEINSTANCE]

DB_UNIQUE_NAME = "orcl"

INSTANCENAME = "orcl"

SYSDBAUSERNAME = "sys" 

[oracle@loneboo database]$ dbca  -silent -responseFile /software/database/response/dbca.rsp 

Enter SYS user password: 

 

Enter SYSTEM user password: 

 

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

60% complete

62% complete

Completing Database Creation

66% complete

70% complete

73% complete

85% complete

96% complete

100% complete

Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.

[oracle@loneboo database]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 8 11:24:32 2018

 

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> select instance_name,status from v$instance;                                                         

 

INSTANCE_NAME    STATUS

---------------- ------------

orcl             OPEN

这篇关于阿里云服务器静默安装Oracle 11.2.0.4.0 -64bit的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1126246

相关文章

Linux系统中卸载与安装JDK的详细教程

《Linux系统中卸载与安装JDK的详细教程》本文详细介绍了如何在Linux系统中通过Xshell和Xftp工具连接与传输文件,然后进行JDK的安装与卸载,安装步骤包括连接Linux、传输JDK安装包... 目录1、卸载1.1 linux删除自带的JDK1.2 Linux上卸载自己安装的JDK2、安装2.1

Linux卸载自带jdk并安装新jdk版本的图文教程

《Linux卸载自带jdk并安装新jdk版本的图文教程》在Linux系统中,有时需要卸载预装的OpenJDK并安装特定版本的JDK,例如JDK1.8,所以本文给大家详细介绍了Linux卸载自带jdk并... 目录Ⅰ、卸载自带jdkⅡ、安装新版jdkⅠ、卸载自带jdk1、输入命令查看旧jdkrpm -qa

MySQL Workbench 安装教程(保姆级)

《MySQLWorkbench安装教程(保姆级)》MySQLWorkbench是一款强大的数据库设计和管理工具,本文主要介绍了MySQLWorkbench安装教程,文中通过图文介绍的非常详细,对大... 目录前言:详细步骤:一、检查安装的数据库版本二、在官网下载对应的mysql Workbench版本,要是

Linux安装MySQL的教程

《Linux安装MySQL的教程》:本文主要介绍Linux安装MySQL的教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录linux安装mysql1.Mysql官网2.我的存放路径3.解压mysql文件到当前目录4.重命名一下5.创建mysql用户组和用户并修

CentOS 7部署主域名服务器 DNS的方法

《CentOS7部署主域名服务器DNS的方法》文章详细介绍了在CentOS7上部署主域名服务器DNS的步骤,包括安装BIND服务、配置DNS服务、添加域名区域、创建区域文件、配置反向解析、检查配置... 目录1. 安装 BIND 服务和工具2.  配置 BIND 服务3 . 添加你的域名区域配置4.创建区域

pip无法安装osgeo失败的问题解决

《pip无法安装osgeo失败的问题解决》本文主要介绍了pip无法安装osgeo失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 进入官方提供的扩展包下载网站寻找版本适配的whl文件注意:要选择cp(python版本)和你py

Windows Server服务器上配置FileZilla后,FTP连接不上?

《WindowsServer服务器上配置FileZilla后,FTP连接不上?》WindowsServer服务器上配置FileZilla后,FTP连接错误和操作超时的问题,应该如何解决?首先,通过... 目录在Windohttp://www.chinasem.cnws防火墙开启的情况下,遇到的错误如下:无法与

Oracle存储过程里操作BLOB的字节数据的办法

《Oracle存储过程里操作BLOB的字节数据的办法》该篇文章介绍了如何在Oracle存储过程中操作BLOB的字节数据,作者研究了如何获取BLOB的字节长度、如何使用DBMS_LOB包进行BLOB操作... 目录一、缘由二、办法2.1 基本操作2.2 DBMS_LOB包2.3 字节级操作与RAW数据类型2.

Android App安装列表获取方法(实践方案)

《AndroidApp安装列表获取方法(实践方案)》文章介绍了Android11及以上版本获取应用列表的方案调整,包括权限配置、白名单配置和action配置三种方式,并提供了相应的Java和Kotl... 目录前言实现方案         方案概述一、 androidManifest 三种配置方式

查看Oracle数据库中UNDO表空间的使用情况(最新推荐)

《查看Oracle数据库中UNDO表空间的使用情况(最新推荐)》Oracle数据库中查看UNDO表空间使用情况的4种方法:DBA_TABLESPACES和DBA_DATA_FILES提供基本信息,V$... 目录1. 通过 DBjavascriptA_TABLESPACES 和 DBA_DATA_FILES