1. 程式人生 > >第四章:Oracle12c 數據庫在linux環境安裝

第四章:Oracle12c 數據庫在linux環境安裝

ips 5.7 tor ios white file linux環境 station map




一:搭建yum 倉庫

對於新手可以參考此文:《Vmware Workstation _linux yum 倉庫搭建》、《CentOS7.2 創建本地YUM源和局域網YUM源


1)切換至 yum.repo.d 目錄

[root@oracle ~]#  cd /etc/yum.repos.d
[root@oracle yum.repos.d]# ls
packagekit-media.repo  public-yum-ol6.repo
[root@oracle yum.repos.d]# cat 100 public-yum-ol6.repo 
cat: 100: No such file or directory
[public_ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[public_ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_u1_base]
name=Oracle Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_u2_base]
name=Oracle Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_u3_base]
name=Oracle Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/3/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_u4_base]
name=Oracle Linux $releasever Update 4 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_u5_base]
name=Oracle Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/5/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_u6_base]
name=Oracle Linux $releasever Update 6 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/6/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_u7_base]
name=Oracle Linux $releasever Update 7 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/7/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_u8_base]
name=Oracle Linux $releasever Update 8 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/8/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[public_ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for
Oracle Linux $releasever ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=$uek [public_ol6_UEKR3_latest] name=Unbreakable Enterprise Kernel Release 3 for Oracle Linux $releasever ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=$uekr3 [public_ol6_UEKR4] name=Latest Unbreakable Enterprise Kernel Release 4 for
Oracle Linux $releasever ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEKR4/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=$uekr4 [public_ol6_UEK_base] name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEK/base/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_MySQL] name=MySQL 5.5 for
Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/MySQL/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_gdm_multiseat] name=Oracle Linux 6 GDM Multiseat ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/gdm_multiseat/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_MySQL56] name=MySQL 5.6 for Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/MySQL56/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_MySQL57] name=MySQL 5.7 for Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/MySQL57_community/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_ceph10] name=Ceph Storage for Oracle Linux Release 1.0 - Oracle Linux 6.6 or later ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/ceph10/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_spacewalk20_server] name=Spacewalk Server 2.0 for Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk20/server/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_spacewalk20_client] name=Spacewalk Client 2.0 for Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk20/client/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 # the following repositories are only available for x86_64 architecture systems [public_ol6_ofed_UEK] name=OFED supporting tool packages for Unbreakable Enterprise Kernel on Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/ofed_UEK/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 priority=20 [public_ol6_UEKR4_OFED] name=OFED supporting tool packages for Unbreakable Enterprise Kernel Release 4 on Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEKR4/OFED/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 priority=20 [public_ol6_playground_latest] name=Latest mainline stable kernel for Oracle Linux 6 ($basearch) - Unsupported baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/playground/latest/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_spacewalk22_server] name=Spacewalk Server 2.2 for Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk22/server/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_spacewalk22_client] name=Spacewalk Client 2.2 for Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk22/client/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_software_collections] name=Software Collection Library release 1.2 packages for Oracle Linux 6 (x86_64) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/SoftwareCollections12/x86_64/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_spacewalk24_server] name=Spacewalk Server 2.4 for Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk24/server/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [public_ol6_spacewalk24_client] name=Spacewalk Client 2.4 for Oracle Linux 6 ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk24/client/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=0 [root@oracle yum.repos.d]#

2)創建任意名,後綴為.repo 的文件

#查看文件掛載情況
[root@oracle yum.repos.d]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_oracle-lv_root
                       50G  4.2G   43G   9% /
tmpfs                 1.9G  228K  1.9G   1% /dev/shm
/dev/sda1             477M   83M  366M  19% /boot
/dev/mapper/vg_oracle-lv_home
                      955G  288M  906G   1% /home
/dev/sr0              3.8G  3.8G     0 100% /media/OL6.8 x86_64 Disc 1 20160518  #系統光盤默認掛載
[root@oracle yum.repos.d]# 

如果系統沒有默認加載linux系統光盤。的掛載方式。

#制作沒有掛載的環境。先把 public-yum-ol6.repo  文件名修改修改
[root@oracle yum.repos.d]# ls
packagekit-media.repo  public-yum-ol6.repo
[root@oracle yum.repos.d]# mv public-yum-ol6.repo  public-yum-ol6.repo.bak20181222
[root@oracle yum.repos.d]# ls
packagekit-media.repo  public-yum-ol6.repo.bak20181222
[root@oracle yum.repos.d]# 


[root@oracle yum.repos.d]# vi server.repo
[public_ol6_latest]
name=Oracle Linux ###名稱可以任取 
baseurl=file:///mnt/Server ####file:///mnt 本機,網絡:http://,ftp:// 
gpgcheck=1 ###驗證簽名,mdd5 
enabled=1 ####啟用yum倉庫 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle ###驗證簽名 

具體操作如圖:如果 yum list all 顯示沒有錯誤,表示yum 環境安裝成功了 。

技術分享圖片


TIPS:

執行 yum list all 驗證 yum 倉庫是否配置好。若開始配置錯了,用 yum clean all 清理後,再次執行 yum list all













===================================================================================================================

第四章:Oracle12c 數據庫在linux環境安裝