操作系統(tǒng)基礎(chǔ)配置
本章節(jié)所有操作使用root用戶
su - root
關(guān)閉防火墻和SELINUX
關(guān)閉運(yùn)行中的防火墻
#service iptables stop
關(guān)閉操作系統(tǒng)自啟動
#chkconfig iptables off
檢查關(guān)閉情況
# chkconfig --list iptables
關(guān)閉selinux:
編輯/etc/selinux/config 文件
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
RPM包安裝
Oracle安裝需要以下RPM包:
compat-libcap1-1.10-1 (x86_64)
gcc-4.4.4-13.el6 (x86_64)
gcc-c+±4.4.4-13.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (x86_64)
libstdc+±devel-4.4.4-13.el6 (x86_64)
sysstat-9.0.4-11.el6 (x86_64)
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libstdc+±33-3.2.3-69.el6 (x86_64)
glibc-2.12-1.7.el6 (x86_64)
libaio-0.3.107-10.el6 (x86_64)
libgcc-4.4.4-13.el6 (x86_64)
libstdc+±4.4.4-13.el6 (x86_64)
make-3.81-19.el6 (x86_64)
compat-libcap1.el6(x86_64)
以上包具體小版本視情況而定,通過rpm –qa| grep 命令查找是否安裝了對應(yīng)的包,例:
[root@hca1 ~]# rpm -qa | grep gcc
安裝包
使用命令
yum install binutils compat-libstdc++-33 compat-libstdc++-296 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make openmotif sysstat unixODBC unixODBC-devel compat-libcap1 -y
或可以使用 rpm –ivh *.rpm
(*表示rpm包名稱)
安裝用戶創(chuàng)建
創(chuàng)建oracle用戶
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle ----修改oracle用戶密碼
oracle用戶環(huán)境變量設(shè)置
su - oracle
oracle用戶:
vi ~/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1
export ORACLE_SID=XXX(根據(jù)具體需要修改)
export ORACLE_HOSTNAME=XXX
export PATH=$ORACLE_HOME/bin:$PATH
切換回root用戶
exit
mkdir -p /u01/app/oracle/product/19.3.0/db_1(由/開頭的文件夾都在根目錄下,所以需要exit到root用戶創(chuàng)建)
chown -R oracle:oinstall /oracle
host修改
注意:如果主機(jī)名是localhost(建議不要使用這個默認(rèn)值),則不需要修改此文件
vi /etc/hosts
主機(jī)ip 主機(jī)名 (增加這行)
RDBMS軟件
上傳介質(zhì)
將oracle的壓縮包上傳到/u01/app/oracle/product/19.3.0/db_1目錄下
解壓介質(zhì)
用oracle用戶解壓提前上傳到目錄下的壓縮包解壓
使用 unzip 命令
解壓后生成database目錄
開始安裝
oracle用戶執(zhí)行安裝:
打開Xmanager-passice
到解壓開后的database目錄執(zhí)行:
export DISPLAY=xxx.xxx.xxx.xxx:0.0(xxx.xxx.xxx.xxx為Windows主機(jī)的IP 0.0為Xmanager-passice的端口)
./runInstaller
安裝截圖如下:
注意這一塊,一般就是缺少RPM包,由于我們之前已經(jīng)所有安裝了,故這一步一般不會報(bào)錯;
到xshell中用root用戶執(zhí)行即可
配置監(jiān)聽
同樣用xstart連接后oracle用戶執(zhí)行
$netca
創(chuàng)建數(shù)據(jù)庫
同樣用xstart連接后oracle用戶執(zhí)行
$ dbca
這里和之前配置的對應(yīng)即可文章來源:http://www.zghlxwxcb.cn/news/detail-432257.html
檢查
[root@host2 ~]# su - oracle
Last login: Mon Oct 31 15:50:20 CST 2022 on pts/3
[oracle@host2 ~]$ sqlplus /nolog
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 31 16:01:11 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
SQL> select
2 *
3 from
4 ;
SP2-0640: Not connected
SQL>
因?yàn)樵诎惭b的時候沒有截圖,所有這里截圖參考了https://blog.csdn.net/bjywxc/article/details/104696121的圖片;
前前后后安裝了5-6次,無數(shù)重裝,終于最后平穩(wěn)的安裝起來了。文章來源地址http://www.zghlxwxcb.cn/news/detail-432257.html
到了這里,關(guān)于Oracle 19c 安裝(Linux)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!