阿里云服务器静默安装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

相关文章

NFS实现多服务器文件的共享的方法步骤

《NFS实现多服务器文件的共享的方法步骤》NFS允许网络中的计算机之间共享资源,客户端可以透明地读写远端NFS服务器上的文件,本文就来介绍一下NFS实现多服务器文件的共享的方法步骤,感兴趣的可以了解一... 目录一、简介二、部署1、准备1、服务端和客户端:安装nfs-utils2、服务端:创建共享目录3、服

Oracle数据库使用 listagg去重删除重复数据的方法汇总

《Oracle数据库使用listagg去重删除重复数据的方法汇总》文章介绍了在Oracle数据库中使用LISTAGG和XMLAGG函数进行字符串聚合并去重的方法,包括去重聚合、使用XML解析和CLO... 目录案例表第一种:使用wm_concat() + distinct去重聚合第二种:使用listagg,

龙蜥操作系统Anolis OS-23.x安装配置图解教程(保姆级)

《龙蜥操作系统AnolisOS-23.x安装配置图解教程(保姆级)》:本文主要介绍了安装和配置AnolisOS23.2系统,包括分区、软件选择、设置root密码、网络配置、主机名设置和禁用SELinux的步骤,详细内容请阅读本文,希望能对你有所帮助... ‌AnolisOS‌是由阿里云推出的开源操作系统,旨

Ubuntu系统怎么安装Warp? 新一代AI 终端神器安装使用方法

《Ubuntu系统怎么安装Warp?新一代AI终端神器安装使用方法》Warp是一款使用Rust开发的现代化AI终端工具,该怎么再Ubuntu系统中安装使用呢?下面我们就来看看详细教程... Warp Terminal 是一款使用 Rust 开发的现代化「AI 终端」工具。最初它只支持 MACOS,但在 20

mysql-8.0.30压缩包版安装和配置MySQL环境过程

《mysql-8.0.30压缩包版安装和配置MySQL环境过程》该文章介绍了如何在Windows系统中下载、安装和配置MySQL数据库,包括下载地址、解压文件、创建和配置my.ini文件、设置环境变量... 目录压缩包安装配置下载配置环境变量下载和初始化总结压缩包安装配置下载下载地址:https://d

LinuxMint怎么安装? Linux Mint22下载安装图文教程

《LinuxMint怎么安装?LinuxMint22下载安装图文教程》LinuxMint22发布以后,有很多新功能,很多朋友想要下载并安装,该怎么操作呢?下面我们就来看看详细安装指南... linux Mint 是一款基于 Ubuntu 的流行发行版,凭借其现代、精致、易于使用的特性,深受小伙伴们所喜爱。对

Python项目打包部署到服务器的实现

《Python项目打包部署到服务器的实现》本文主要介绍了PyCharm和Ubuntu服务器部署Python项目,包括打包、上传、安装和设置自启动服务的步骤,具有一定的参考价值,感兴趣的可以了解一下... 目录一、准备工作二、项目打包三、部署到服务器四、设置服务自启动一、准备工作开发环境:本文以PyChar

Linux(Centos7)安装Mysql/Redis/MinIO方式

《Linux(Centos7)安装Mysql/Redis/MinIO方式》文章总结:介绍了如何安装MySQL和Redis,以及如何配置它们为开机自启,还详细讲解了如何安装MinIO,包括配置Syste... 目录安装mysql安装Redis安装MinIO总结安装Mysql安装Redis搜索Red

oracle中exists和not exists用法举例详解

《oracle中exists和notexists用法举例详解》:本文主要介绍oracle中exists和notexists用法的相关资料,EXISTS用于检测子查询是否返回任何行,而NOTE... 目录基本概念:举例语法pub_name总结 exists (sql 返回结果集为真)not exists (s

python安装完成后可以进行的后续步骤和注意事项小结

《python安装完成后可以进行的后续步骤和注意事项小结》本文详细介绍了安装Python3后的后续步骤,包括验证安装、配置环境、安装包、创建和运行脚本,以及使用虚拟环境,还强调了注意事项,如系统更新、... 目录验证安装配置环境(可选)安装python包创建和运行Python脚本虚拟环境(可选)注意事项安装