溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件

發(fā)布時(shí)間:2021-11-10 10:40:32 來源:億速云 閱讀:182 作者:小新 欄目:關(guān)系型數(shù)據(jù)庫

這篇文章主要介紹如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

一、環(huán)境準(zhǔn)備

[oracle@localhost ~]$ df -hl 查看內(nèi)存情況

磁盤空間需要6.4GB,/tmp分區(qū)需要1GB 

[oracle@localhost ~]$ df -hl /tmp 


內(nèi)存配置4G,swap配置2G

[oracle@localhost ~]$ grep MemTotal /proc/meminfo

[oracle@localhost ~]$ cat /proc/swaps

操作系統(tǒng):Red Hat Enterprise Linux Server release 7

[oracle@localhost ~]$ cat /etc/redhat-release

安裝包 yum -y install package*
把所有包安裝

binutils-2.23.52.0.1-12.el7.x86_64 
compat-libcap1-1.10-3.el7.x86_64
compat-libstdc++-33-3.2.3-71.el7.i686 
compat-libstdc++-33-3.2.3-71.el7.x86_64
gcc-4.8.2-3.el7.x86_64 
gcc-c++-4.8.2-3.el7.x86_64 
glibc-2.17-36.el7.i686 
glibc-2.17-36.el7.x86_64 
glibc-devel-2.17-36.el7.i686 
glibc-devel-2.17-36.el7.x86_64 
ksh
libaio-0.3.109-9.el7.i686 
libaio-0.3.109-9.el7.x86_64 
libaio-devel-0.3.109-9.el7.i686 
libaio-devel-0.3.109-9.el7.x86_64 
libgcc-4.8.2-3.el7.i686 
libgcc-4.8.2-3.el7.x86_64 
libstdc++-4.8.2-3.el7.i686 
libstdc++-4.8.2-3.el7.x86_64 
libstdc++-devel-4.8.2-3.el7.i686 
libstdc++-devel-4.8.2-3.el7.x86_64 
libXi-1.7.2-1.el7.i686 
libXi-1.7.2-1.el7.x86_64 
libXtst-1.2.2-1.el7.i686 
libXtst-1.2.2-1.el7.x86_64 
make-3.82-19.el7.x86_64 
sysstat-10.1.5-1.el7.x86_64

查看組是否存在     

[root@localhost ~]# grep oinstall /etc/group

[root@localhost ~]# grep dba /etc/group

創(chuàng)建組oninstall 與 dba

[root@localhost ~]# /usr/sbin/groupadd oinstall

[root@localhost ~]# /usr/sbin/groupadd dba

[root@localhost ~]# /usr/sbin/groupadd oper

查看oracle用戶 是否存在

[root@localhost ~]# id oracle

創(chuàng)建oracle用戶

[root@localhost ~]# /usr/sbin/useradd -g oinstall -G dba,oper oracle

若已有oracle則報(bào)錯(cuò)存在

[root@localhost ~]# passwd oracle

為oracle創(chuàng)建密碼

設(shè)置資源限制:

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

在文末添加:

fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 2097152
#kernel.shmmax = 536870912
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 = 1048586

使更改生效

[root@localhost ~]# /sbin/sysctl -p

設(shè)置安裝用戶的資源限制:

[root@localhost ~]# vi /etc/security/limits.conf

在root下,添加

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 10240

創(chuàng)建oracle安裝目錄并分配權(quán)限

[root@localhost ~]# mkdir /u01

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

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

為oracle用戶設(shè)置環(huán)境變量

[li@localhost ~]$ su - oracle

Password:

[oracle@localhost ~]$

[oracle@localhost ~]$ vi ~/.bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1

export PATH=$ORACLE_HOME/bin:$PATH

export ORACLE_SID=db12c

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

如何切換到oracle用戶

Su – oracle

在temp下創(chuàng)建oracle 然后把12c壓縮包解壓在里面

在oracle用戶下

[li@localhost ~]$ su oracle

Password:

[oracle@localhost ]$ cd /u01/software/database

[oracle@localhost database]$ ls

install  response  rpm  runInstaller  sshsetup  stage  welcome.html

執(zhí)行安裝
[oracle@localhost database]$ ./runInstaller
1、彈出此界面,不勾選選項(xiàng)(如果有也可以填寫)然后next

如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件

2、此處選擇僅安裝數(shù)據(jù)庫軟件,然后next如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件

3、選擇安裝單實(shí)例數(shù)據(jù)庫,然后next如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件

4、選擇安裝企業(yè)版,然后next如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件
5、安裝路徑默認(rèn)安裝
6、默認(rèn)安裝 next如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件


7、組默認(rèn) next如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件


8、這里會檢查是否有安裝相關(guān)的包,可以新打開一個(gè)窗口yum安裝包,然后檢查
(這里檢查的錯(cuò)誤最好都想辦法使得沒有錯(cuò)誤,不然在啟動時(shí)會報(bào)錯(cuò))如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件

9、點(diǎn)擊install開始安裝如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件

10、在root下執(zhí)行兩條腳本
如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件


[root@localhost ~]# /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@localhost ~]# /u01/app/oracle/product/12.2.0/dbhome_1/root.sh

Performing root user operation.

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u01/app/oracle/product/12.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :

yes

Installing Oracle Trace File Analyzer (TFA).

Log File: /u01/app/oracle/product/12.2.0/dbhome_1/install/root_localhost.localdomain_2018-04-30_07-56-19-938348191.log

Finished installing Oracle Trace File Analyzer (TFA)

執(zhí)行完腳本,數(shù)據(jù)庫軟件安裝完成

以上是“如何安裝oracle12c單實(shí)例數(shù)據(jù)庫軟件”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI