您好,登錄后才能下訂單哦!
昨天晚上看到蓋總的微信里發布12.2.0.1版本開放下載了,于是立馬登上edelivery去下載,現在只開放了Linux 64位版的。
今天就測試了一下12.2.0.1的rhel7.2上的安裝。
總體的安裝步驟跟12.1版本中沒有太大的區別下面只列出了簡單的配置和安裝步驟
1、修改主機名和配置/etc/hosts
2、安裝依賴包
參考了12.2的官方文檔,現在只提供Oracle Linux上的依賴包,但是手頭沒有OEL7.2,于是選擇了RHEL7.2,沒有太多的差別
yum install -y binutils*
yum install -y compat-libcap1*
yum install -y compat-libstdc++*
yum install -y glibc*
yum install -y glibc-devel*
yum install -y ksh*
yum install -y libX11*
yum install -y libXau*
yum install -y libXi*
yum install -y libXtst*
yum install -y libaio*
yum install -y libaio-devel*
yum install -y libgcc*
yum install -y libstdc++*
yum install -y libstdc++-devel*
yum install -y libxcb*
yum install -y make*
yum install -y net-tools*
yum install -y nfs-utils*
yum install -y smartmontools*
yum install -y sysstat*
yum install -y unixODBC*
yum install -y binutils*686*
yum install -y compat-libcap1*686*
yum install -y compat-libstdc++*686*
yum install -y glibc*686*
yum install -y glibc-devel*686*
yum install -y ksh*686*
yum install -y libX11*686*
yum install -y libXau*686*
yum install -y libXi*686*
yum install -y libXtst*686*
yum install -y libaio*686*
yum install -y libaio-devel*686*
yum install -y libgcc*686*
yum install -y libstdc++*686*
yum install -y libstdc++-devel*686*
yum install -y libxcb*686*
yum install -y make*686*
yum install -y net-tools*686*
yum install -y nfs-utils*686*
yum install -y smartmontools*686*
yum install -y sysstat*686*
yum install -y unixODBC*686*
3、配置內核參數
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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
systemctl -p 應用修改
4、創建oracle用戶和用戶組及創建目錄
groupadd -g 5001 oinstall
groupadd -g 5002 dba
useradd -g oinstall -G dba -u 5001 oracle
passwd oracle
mkdir -p /u01/app/oracle/product/12.2/db1
chown oracle:oinstall -R /u01
5、修改Oracle用戶的系統限制
vi /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32786
6、修改oracle用戶的.bash_profile
vi /home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2/db1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
7、安裝數據庫軟件
./runInstall
執行root.sh
8、創建數據庫
在使用dbca創建包含CDB和PDB的數據庫時報了好幾次錯,都莫名其妙的,比如:
Error while executing "/u01/app/oracle/product/12.2/db1/rdbms/admin/execemx.sql". Refer to "/u01/app/oracle/cfgtoollogs/dbca/orcl/execemx0.log"
查看log日志文件里是空的
還有ORA-00600: internal error code, arguments: [kcrf_make_redokey], [18446744073709551615], [], [], [], [], [], [], [], [], [], []
查了MOS上沒有關于12.2的文檔
于是想到了只不創建CDB的數據庫是否還報錯,結果正常創建成功。
后來與同事討論,他提到了手工創建數據庫是否有問題呢,于是嘗試手工創建包含CDB和PDB的數據庫。
手動創建數據庫簡略步驟:
1、創建pfile
db_name=orcl
enabled_pluggable_database=true #要創建CDB/PDB數據庫必須有這個參數
control_files='/u01/app/oracle/oradata/orcl/control01.ctl'
2、創建spfile
create spfile from pfile;
3、執行CREATE DATABASE語句
CREATE DATABASE orcl
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/orcl/redo01a.log') SIZE 100M BLOCKSIZE 512,
GROUP 2 ('/u01/app/oracle/oradata/orcl/redo02a.log') SIZE 100M BLOCKSIZE 512,
GROUP 3 ('/u01/app/oracle/oradata/orcl/redo03a.log') SIZE 100M BLOCKSIZE 512
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 1024
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/orcl/cdb/system.dbf'
SIZE 700M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SYSAUX DATAFILE '/u01/app/oracle/oradata/orcl/cdb/sysaux.dbf'
SIZE 550M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/orcl/cdb/temp.dbf'
SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
UNDO TABLESPACE undotbs1
DATAFILE '/u01/app/oracle/oradata/orcl/cdb/undo.dbf'
SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
ENABLE PLUGGABLE DATABASE
SEED
FILE_NAME_CONVERT=('/u01/app/oracle/oradata/orcl/cdb/','/u01/app/oracle/oradata/orcl/seed/')
SYSTEM DATAFILES size 125M autoextend on next 10M maxsize unlimited
SYSAUX DATAFILES size 100M autoextend on next 10M maxsize unlimited;
4、執行創建數據字典腳本
1)In SQL*Plus, connect to your Oracle Database instance with the SYSDBA administrative privilege:
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp.sql
2)In SQL*Plus, connect to your Oracle Database instance as SYSTEM user:
@?/sqlplus/admin/pupbld.sql
到此創建完成。
整體過程與12.1版本的安裝沒有多大的區別,就是在dbca時報的錯很奇怪。
官方文檔:http://docs.oracle.com/database/122/LADBI/toc.htm
http://docs.oracle.com/database/122/ADMIN/creating-and-configuring-an-oracle-database.htm#ADMIN-GUID-18B03451-5C74-4B53-A892-656C3E8A2556
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。