您好,登錄后才能下訂單哦!
這篇文章主要介紹如何安裝oracle12c單實例數據庫軟件,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!
一、環境準備
[oracle@localhost ~]$ df -hl 查看內存情況
磁盤空間需要6.4GB,/tmp分區需要1GB
[oracle@localhost ~]$ df -hl /tmp
內存配置4G,swap配置2G
[oracle@localhost ~]$ grep MemTotal /proc/meminfo
[oracle@localhost ~]$ cat /proc/swaps
操作系統: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
創建組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
創建oracle用戶
[root@localhost ~]# /usr/sbin/useradd -g oinstall -G dba,oper oracle
若已有oracle則報錯存在
[root@localhost ~]# passwd oracle
為oracle創建密碼
設置資源限制:
[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
設置安裝用戶的資源限制:
[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
創建oracle安裝目錄并分配權限
[root@localhost ~]# mkdir /u01
[root@localhost ~]# chown -R oracle:oinstall /u01
[root@localhost ~]# chmod -R 775 /u01
為oracle用戶設置環境變量
[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下創建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
執行安裝
[oracle@localhost database]$ ./runInstaller
1、彈出此界面,不勾選選項(如果有也可以填寫)然后next
2、此處選擇僅安裝數據庫軟件,然后next
3、選擇安裝單實例數據庫,然后next
4、選擇安裝企業版,然后next
5、安裝路徑默認安裝
6、默認安裝 next
7、組默認 next
8、這里會檢查是否有安裝相關的包,可以新打開一個窗口yum安裝包,然后檢查
(這里檢查的錯誤最好都想辦法使得沒有錯誤,不然在啟動時會報錯)
9、點擊install開始安裝
10、在root下執行兩條腳本
[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)
執行完腳本,數據庫軟件安裝完成
以上是“如何安裝oracle12c單實例數據庫軟件”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。