码迷,mamicode.com
首页 > 数据库 > 详细

第四章:Oracle12c 数据库在linux环境安装

时间:2018-12-22 16:39:06      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:操作   ios   目录   5.7   upd   kernel   packages   环境安装   color   




一:搭建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环境安装

标签:操作   ios   目录   5.7   upd   kernel   packages   环境安装   color   

原文地址:https://www.cnblogs.com/ios9/p/10160983.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!