Linux下安裝Oracle19c(親測可用)
我是自己下載好 安裝oracle19c所需要的的依賴rpm,然后通過u盤copy到虛擬機下安裝oracle19c的!需要下載以下幾個壓縮包;
下載鏈接如下:
鏈接: https://pan.baidu.com/s/1uAmhloft070U-OsgHaRxug 提取碼: 7vss 復制這段內(nèi)容后打開百度網(wǎng)盤手機App,操作更方便哦-
–來自百度網(wǎng)盤超級會員v1的分享
第一步:把u盤中所需依賴復制到虛擬機主目錄下新建一個oracle文件夾中;
[root@localhost oracle]# ls
base.zip oracle-database-ee-19c-1.0-1.x86_64.rpm oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
第二步:在oracle文件夾下打開終端執(zhí)行命令
[root@localhost oracle]# rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
警告:oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID ec551f03: NOKEY
錯誤:依賴檢測失?。? compat-libcap1 被 oracle-database-preinstall-19c-1.0-1.el7.x86_64 需要
compat-libstdc++-33 被 oracle-database-preinstall-19c-1.0-1.el7.x86_64 需要
glibc-devel 被 oracle-database-preinstall-19c-1.0-1.el7.x86_64 需要
ksh 被 oracle-database-preinstall-19c-1.0-1.el7.x86_64 需要
libaio-devel 被 oracle-database-preinstall-19c-1.0-1.el7.x86_64 需要
libstdc++-devel 被 oracle-database-preinstall-19c-1.0-1.el7.x86_64 需要
第三步:根據(jù)他需要的什么內(nèi)容一個個進行下載:
[可能會報的錯誤]:
[root@localhost oracle]# yum install -y compat-libcap1
已加載插件:fastestmirror, langpacks
/var/run/yum.pid 已被鎖定,PID 為 21426 的另一個程序正在運行。
Another app is currently holding the yum lock; waiting for it to exit...
另一個應用程序是:PackageKit
內(nèi)存:145 M RSS (488 MB VSZ)
已啟動: Tue Aug 3 11:59:29 2021 - 04:00之前
狀態(tài) :睡眠中,進程ID:21426
這個時候不要慌!只是有一個進程把端口占用了!干掉他就完事!執(zhí)行以下命令即可:
[root@localhost oracle]# rm -f /var/run/yum.pid
然后在執(zhí)行以下剛才的命令,你會發(fā)現(xiàn)驚奇的成功了!
[root@localhost oracle]# yum install -y compat-libcap1
已加載插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com
正在解決依賴關系
--> 正在檢查事務
---> 軟件包 compat-libcap1.x86_64.0.1.10-7.el7 將被 安裝
--> 解決依賴關系完成
依賴關系解決
=====================================================================================================================================================================================
Package 架構(gòu) 版本 源 大小
=====================================================================================================================================================================================
正在安裝:
compat-libcap1 x86_64 1.10-7.el7 base 19 k
事務概要
=====================================================================================================================================================================================
安裝 1 軟件包
總下載量:19 k
安裝大?。?9 k
Downloading packages:
警告:/var/cache/yum/x86_64/7/base/packages/compat-libcap1-1.10-7.el7.x86_64.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID f4a80eb5: NOKEY===============] 0.0 B/s | 19 kB --:--:-- ETA
compat-libcap1-1.10-7.el7.x86_64.rpm 的公鑰尚未安裝
compat-libcap1-1.10-7.el7.x86_64.rpm | 19 kB 00:00:01
從 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 檢索密鑰
導入 GPG key 0xF4A80EB5:
用戶ID : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
指紋 : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
軟件包 : centos-release-7-6.1810.2.el7.centos.x86_64 (@anaconda)
來自 : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安裝 : compat-libcap1-1.10-7.el7.x86_64 1/1
驗證中 : compat-libcap1-1.10-7.el7.x86_64 1/1
已安裝:
compat-libcap1.x86_64 0:1.10-7.el7
完畢!
接下來把上面所需要的包一個個下載:
[root@localhost oracle]# yum install -y compat-libstdc++-33
---------------------------------------------
[root@localhost oracle]# yum install -y glibc-devel
---------------------------------------------
[root@localhost oracle]# yum install -y ksh
---------------------------------------------
[root@localhost oracle]# yum install -y libaio-devel
-----------------------------------------------
[root@localhost oracle]# yum install -y libstdc++-devel
第四步:執(zhí)行命令(時間會有點長,不慌?。?/h4>
[root@localhost oracle]# rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
----------------------安裝ing------------------------
警告:oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID ec551f03: NOKEY
準備中... ################################# [100%]
正在升級/安裝...
1:oracle-database-preinstall-19c-1.################################# [100%]
[root@localhost oracle]# rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
----------------------安裝ing------------------------
警告:oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID ec551f03: NOKEY
準備中... ################################# [100%]
正在升級/安裝...
1:oracle-database-preinstall-19c-1.################################# [100%]
?
第五步:接著來執(zhí)行命令
[root@localhost oracle]# rpm -ivh oracle-database-ee-19c-1.0-1.x86_64.rpm
--------------------執(zhí)行ing--------------------------
警告:oracle-database-ee-19c-1.0-1.x86_64.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID ec551f03: NOKEY
準備中... ################################# [100%]
正在升級/安裝...
1:oracle-database-ee-19c-1.0-1 ################################# [100%]
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-19c configure
[root@localhost oracle]# rpm -ivh oracle-database-ee-19c-1.0-1.x86_64.rpm
警告:oracle-database-ee-19c-1.0-1.x86_64.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID ec551f03: NOKEY
準備中... ################################# [100%]
軟件包 oracle-database-ee-19c-1.0-1.x86_64 已經(jīng)安裝
第六步:來一個稍長時間的命令(加載oracle19c環(huán)境)
[root@localhost oracle]# /etc/init.d/oracledb_ORCLCDB-19c configure
---------------------------------------------------
Configuring Oracle Database ORCLCDB.
準備執(zhí)行數(shù)據(jù)庫操作
已完成 8%
復制數(shù)據(jù)庫文件
已完成 31%
正在創(chuàng)建并啟動 Oracle 實例
已完成 32%
已完成 36%
已完成 40%
已完成 43%
已完成 46%
正在進行數(shù)據(jù)庫創(chuàng)建
已完成 51%
已完成 54%
正在創(chuàng)建插接式數(shù)據(jù)庫
已完成 58%
已完成 77%
執(zhí)行配置后操作
已完成 100%
數(shù)據(jù)庫創(chuàng)建完成。有關詳細信息, 請查看以下位置的日志文件:
/opt/oracle/cfgtoollogs/dbca/ORCLCDB。
數(shù)據(jù)庫信息:
全局數(shù)據(jù)庫名:ORCLCDB
系統(tǒng)標識符 (SID):ORCLCDB
有關詳細信息, 請參閱日志文件 "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log"。
Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user.
第七步:切換oracle用戶配置環(huán)境變量
[root@localhost oracle]# su - oracle
接著:
[oracle@localhost ~]$ vi ~/.bash_profile
//在里面輸入:
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin export
ORACLE_SID=ORCLCDB
//寫完后按住esc 輸入冒號 wq 保存退出
接著:
[oracle@localhost ~]$ source ~/.bash_profile
//目的是為了加載剛剛修改的變量
接著:
[oracle@localhost ~]$ sqlplus / as sysdba
//管理員登錄
SQL> alter user system identified by system;
??????
//修改system密碼
SQL> create user test_lxx identified by test_lxx;
create user test_lxx identified by test_lxx
//創(chuàng)建test_lxx用戶并設置密碼為test_lxx
SQL> grant dba to test_lxx;
//為自己創(chuàng)建的用戶賦予管理員權(quán)限
SQL> exit
? Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0 ??
[oracle@localhost ~]$ lsnrctl start
//打開監(jiān)聽器
[oracle@localhost ~]$ lsnrctl status
//查看狀態(tài)
第八步:打開PLSQL進行測試連接
文章來源:http://www.zghlxwxcb.cn/news/detail-843979.html
總結(jié):連接的時候報錯信息:
連接超時問題解決:
1、檢查是否開啟監(jiān)聽,
su oracle // 切換到Oracle賬號
lsnrctl start //啟動監(jiān)聽器命令
lsnrctl stop // 停止監(jiān)聽器命令
lsnrctl status // 查看監(jiān)聽器命令
2、檢查防火墻狀態(tài)(原來我的防火墻沒關閉),關閉防火墻!
//查看防火墻狀態(tài)
sudo systemctl status firewalld
//查看后,看到active(running)就意味著防火墻打開了。
//關閉防火墻,命令為:
sudo systemctl stop firewalld。
//關閉后查看是否關閉成功,如果看到inactive(dead)就意味著防火墻關閉了。
再嘗試連接就成功了。文章來源地址http://www.zghlxwxcb.cn/news/detail-843979.html
到了這里,關于Linux下安裝Oracle19c(親測可用!真保姆級安裝教程)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!