Centos7.6测试环境上Oracle 12.2安装

栏目:eas cloud知识作者:金蝶来源:金蝶云社区发布:2024-09-22浏览:1

Centos7.6测试环境上Oracle 12.2安装

1.    本文档说明:
本文为在win10系统上PC-64位上安装VirtualBox_6.1;并在virtualBox上安装Centos 7.6新环境主机一台, 基于Centos 7.6 环境Oracle 12C非PDB 命令行安装、配置。
2.    本文档适用范围:
仅适用于虚拟机环境下测试使用。
3.    系统安装规划
仅指Linux新环境平台,迁移前规划准备:
操作系统规划准备(oracle规划)

挂载点

卷组

分区大小

/boot

--

1G

swap

vg00

4G

root

vg00

15G

/oracle

vg02

40G

3.1.    操作系统准备
3.1.1.    主机配置
虚拟网卡删除:
 /etc/hosts配置:
3.1.2.    挂载好本地iso光盘:


执行命令mount –t iso9660 /dev/sr0 /mnt;
 3.1.3.    配置本地yum源:
mkdir /etc/yum.repos.d/1
mv /etc/yum.repos.d/* 1
vi /etc/yum.repos.d/1.repo
[local]
name=local
baseurl=file:///mnt
gpgcheck=0
groupcheck=1
执行命令:yum repolist
测试:yum -y install telnet
3.2.    Oracle规划及安装
3.2.1.    磁盘划分
pv/vg/lv创建,格式化lv、创建挂载点并挂载:
 Lv创建并挂载:


写入fstab,vi /etc/fstab

3.2.2.    Oracle安装前准备
上传环境检查配置脚本,直接执行(1.sh到8.sh即可)
Vi /home/oracle/.bash_profile 修改ORACLE_SID值,并将ORACLE_UNQNAME行注掉

 

3.2.3.    Oracle软件包上传并解压

可ftp,可工具,都行:
解压后:
3.2.4.    Oracle软件安装(静默安装)
cd $ORACLE_HOME/database/
vi db.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/oracle/app/oraInventory
ORACLE_HOME=/oracle/app/product/12.2.0/db_1
ORACLE_BASE=/oracle/app/db
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=dba
oracle.install.db.OSDGDBA_GROUP=dba
oracle.install.db.OSKMDBA_GROUP=dba
oracle.install.db.OSRACDBA_GROUP=dba
oracle.install.db.rac.configurationType=
oracle.install.db.CLUSTER_NODES=
oracle.install.db.isRACOneInstall=false
oracle.install.db.racOneServiceName=
oracle.install.db.rac.serverpoolName=
oracle.install.db.rac.serverpoolCardinality=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.ConfigureAsContainerDB=false
oracle.install.db.config.PDBName=
oracle.install.db.config.starterdb.characterSet=
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.password.PDBADMIN=
oracle.install.db.config.starterdb.managementOption=DEFAULT
oracle.install.db.config.starterdb.omsHost=
oracle.install.db.config.starterdb.omsPort=
oracle.install.db.config.starterdb.emAdminUser=
oracle.install.db.config.starterdb.emAdminPassword=
oracle.install.db.config.starterdb.enableRecovery=
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=false
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
COLLECTOR_SUPPORTHUB_URL=
./runInstaller -ignorePrereq -silent -force -responseFile /oracle/app/product/12.2.0/db_1/database/db.rsp  -showProgress
执行完成后,按root提示执行命令:
3.2.5.    Oracle 监听配置
Cd $ORACLE_HOME/network/admin
Vi listener.ora
LISTENER=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.108 )(PORT=1521))
      (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))
    )
 )
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=www111)
      (ORACLE_HOME=/oracle/app/product/12.2.0/db_1)
      (SID_NAME=www111)
    )
 )

tnsnames.ora配置如下:
WWW111=
 (DESCRIPTION=
   (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.108)(PORT=1521))
   (CONNECT_DATA=
     (SERVICE_NAME=www111)
     (SERVER=dedicated)
   )
)
3.2.6.    Oracle数据库配置
可以用dbca建库(建议方法),也可以用户命令行建库:
1)    手工建立参数文件:cat init.ora |grep -v '^#' |strings >initwww111.ora ;  vi initwww111.ora修改如下:
initwww111.ora
db_name='www111'
memory_target=1G
processes = 150
audit_file_dest='/oracle/app/db/admin/www111/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='/oracle/app/db/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/oracle/app/db'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS'
control_files = (/oracle/app/oradata/control01.ctl,/oracle/app/oradata/control02.ctl)
compatible ='12.2.0'
2)    手工建立密码文件:
orapwd   file=orapwwww111 password="Orcl123#" entries=30
3)    创建数据库
Sqlplus / as sysdba
Create spfile from pfile
Startup nomount;
@createdb.sql
@sc.sql
备注:
createdb.sql如下:
CREATE DATABASE www111
   USER SYS IDENTIFIED BY Orcl123#
   USER SYSTEM IDENTIFIED BY Orcl123#
   LOGFILE GROUP 1 ('/oracle/app/oradata/redo01a.log','/oracle/app/oradata/redo01b.log') SIZE 100M BLOCKSIZE 512,
           GROUP 2 ('/oracle/app/oradata/redo02a.log','/oracle/app/oradata/redo02b.log') SIZE 100M BLOCKSIZE 512,
           GROUP 3 ('/oracle/app/oradata/redo03a.log','/oracle/app/oradata/redo03b.log') SIZE 100M BLOCKSIZE 512
   MAXLOGFILES 5
   MAXLOGMEMBERS 5
   MAXLOGHISTORY 1
   MAXDATAFILES 100
   CHARACTER SET UTF8
   NATIONAL CHARACTER SET UTF8
   EXTENT MANAGEMENT LOCAL
   DATAFILE '/oracle/app/oradata/system01.dbf' SIZE 325M REUSE
   SYSAUX DATAFILE '/oracle/app/oradata/sysaux01.dbf' SIZE 325M REUSE
   DEFAULT TABLESPACE users
      DATAFILE '/oracle/app/oradata/users01.dbf'
      SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
   DEFAULT TEMPORARY TABLESPACE temp
      TEMPFILE '/oracle/app/oradata/temp01.dbf'
      SIZE 20M REUSE
   UNDO TABLESPACE undotbs
      DATAFILE '/oracle/app/oradata/undotbs01.dbf'
      SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
运行字典视图(sc.sql):
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp.sql
conn system/Orcl123#
@?/sqlplus/admin/pupbld.sql
到此数据库安装完成,检查如下:

Centos7.6测试环境上Oracle 12.2安装

1. 本文档说明:本文为在win10系统上PC-64位上安装VirtualBox_6.1;并在virtualBox上安装Centos 7.6新环境主机一台, 基于Centos 7....
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息