這篇文章主要介紹了oracle 12c release2如何安裝,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
創(chuàng)新互聯(lián)建站是一家集網(wǎng)站建設(shè),工布江達企業(yè)網(wǎng)站建設(shè),工布江達品牌網(wǎng)站建設(shè),網(wǎng)站定制,工布江達網(wǎng)站建設(shè)報價,網(wǎng)絡(luò)營銷,網(wǎng)絡(luò)優(yōu)化,工布江達網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強企業(yè)競爭力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時我們時刻保持專業(yè)、時尚、前沿,時刻以成就客戶成長自我,堅持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實用型網(wǎng)站。
0.需要添加如下文件幾內(nèi)容
備注:/etc/oraInst.loc的內(nèi)容為
inventory_loc=/home/oracle/oraInventory
inst_group=oinstall
1. 下載Oracle 12c 的壓縮包,只有一個zip文件
2. 添加用戶組以及創(chuàng)建目錄:
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle
mkdir /u01; mkdir /u02; mkdir /u03;
mkdir -p /u01/app/oracle/product/12.2.0.1/db_1
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /u02
chown -R oracle:oinstall /u03
3. 修改/etc/hosts文件
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.6.128 dbserver
4. 修改/etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
使參數(shù)生效
sysctl -p
5. 配置/etc/security/limits.d/oracle-rdbms-server-12cR2-preinstall.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
6. 修改/etc/pam.d/login
session required pam_limits.so
7. 安裝oracle需要的缺少的 包
yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install make -y
yum install nfs-utils -y
yum install net-tools -y
yum install smartmontools -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install gcc -y
yum install gcc-c++ -y
yum install libXext -y
yum install libXext.i686 -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y
yum install e2fsprogs -y
yum install e2fsprogs-libs -y
yum install libs -y
yum install libxcb.i686 -y
yum install libxcb -y
8. 修改/etc/selinux/config
SELINUX=permissive
修改完后保存執(zhí)行如下
# setenforce Permissive
9. 關(guān)閉防火墻
# systemctl stop firewalld
# systemctl disable firewalld
10. 添加環(huán)境變量
#touch /etc/profile.d/setora.sh
該文件添加如下內(nèi)容:
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
#export oracle.install.db.config.starterdb.globalDBName=oracle.sunyard
export ORACLE_HOSTNAME=dbserver
export GLOBAL_NAME=odb
export ORACLE_UNQNAME=hgs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_SID=hgs
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
11.將linuxx64_12201_database.zip上傳服務(wù)器,并解壓,解壓后目錄為
以靜默方式安裝需要配置responseFile
配置目錄下的database/response/db_install.rsp,關(guān)鍵修改一下配置,否則安裝時會報錯,按照自己著真實配置
INVENTORY_LOCATION=/home/oracle/oraInventory
ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.OSDBA_GROUP=oinstall
oracle.install.db.OSOPER_GROUP=oinstall
oracle.install.db.OSBACKUPDBA_GROUP=oinstall
oracle.install.db.OSDGDBA_GROUP=oinstall
oracle.install.db.OSKMDBA_GROUP=oinstall
oracle.install.db.OSRACDBA_GROUP=oinstall
oracle.install.db.config.starterdb.globalDBName=orcle12c
oracle.install.db.config.starterdb.SID=hgs
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryLimit=1024
oracle.install.db.config.starterdb.password.SYS=HGShgs912122_
oracle.install.db.config.starterdb.password.SYSTEM=HGShgs912122_
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/u02
保存文件
12. 安裝
圖中標識的就是要運行的文件
可以 ./runInstaller --help 查看幫助
運行如下安裝
./runInstaller -silent -responseFile /u03/database/response/db_install.rsp -showProgress
會有進度提示
13.創(chuàng)建數(shù)據(jù)庫
cd $ORACLE_HOME/dbs
cp init.ora inithgs.ora
chown oracle:oinstall inithgs.ora
將 inithgs.ora 修改如下 內(nèi)存大小根據(jù)真實情況調(diào)整
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='11.2.0'
*.control_files='/u01/app/oracle/controls/ora_control1','/u01/app/oracle/controls/ora_control2'
*.db_block_size=8192
*.db_domain=''
*.db_name='hgs'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=2G
*.diagnostic_dest='
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
*.memory_target=3G
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
#*.undo_tablespace='UNDOTBS1'
切換到oracle用戶
su - oracle
sqlplus / as sysdba
startup nomount
CREATE DATABASE hgs
USER SYS IDENTIFIED BY sys_password
USER SYSTEM IDENTIFIED BY system_password
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/hgs/redo01.log') SIZE 1000M,
GROUP 2 ('/u01/app/oracle/oradata/hgs/redo02.log') SIZE 1000M,
GROUP 3 ('/u01/app/oracle/oradata/hgs/redo03.log') SIZE 1000M
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/hgs/system01.dbf' SIZE 1024M REUSE
SYSAUX DATAFILE '/u01/app/oracle/oradata/hgs/sysaux01.dbf' SIZE 1024M REUSE
DEFAULT TABLESPACE users
DATAFILE '/u01/app/oracle/oradata/hgs/users01.dbf'
SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/hgs/temp01.dbf'
SIZE 500M REUSE
UNDO TABLESPACE undotbs
DATAFILE '/u01/app/oracle/oradata/hgs/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
創(chuàng)建完成后需要執(zhí)行幾個sql腳本
sys用戶
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
system 用戶
@?/sqlplus/admin/pupbld.sql
至此,安裝oracle以及創(chuàng)建數(shù)據(jù)庫完畢
感謝你能夠認真閱讀完這篇文章,希望小編分享的“oracle 12c release2如何安裝”這篇文章對大家有幫助,同時也希望大家多多支持創(chuàng)新互聯(lián),關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,更多相關(guān)知識等著你來學(xué)習(xí)!