docker下安装数据库

docker下安装 Oracle11gR2

这是第二次安装,在第一次安装过程部分内容参考自如下:

http://blog.sina.com.cn/s/blog_d840ff330102v4j0.html docker下oracle11g安装

http://blog.csdn.net/yangyinbo/article/details/6221220 HP-UX静默安装oracle11g过程

http://www.linuxidc.com/Linux/2012-03/56606p4.htm  CentOS 6.2 X64上64位Oracle 11gR2 静默安装

但是并没一次成功,中途遇到好多问题,一个一个逐步解决,最终安装成功。在这里只是做一个总结,欢迎指点和纠正。

这次是在安装的过程中同时记录,以备后续参考。

系统环境:

虚拟机Centos7 64位

docker:1.13.1

oracle:11gR2

容器:centos:6.6

第一次安装时最后能够保证连网,如不能连网需要提前准备好相应的包。

保证虚拟机ok,docker已经安装好,同时将oracle包拷贝至centos6.6的容器中的 /oracle_package目录下。

[root@bogon install_package]# docker cp linux.x64_11gR2_database_1of2.zip 22edf28f349d:/oracle_package
[root@bogon install_package]# docker cp linux.x64_11gR2_database_2of2.zip 22edf28f349d:/oracle_package
[root@22edf28f349d oracle_package]# ls
linux.x64_11gR2_database_1of2.zip  linux.x64_11gR2_database_2of2.zip

 

开始安装

1.安装oracle所需要的 gcc* 、glibc*相关的包 

gcc*在装的时候看到有很多个,每个都不是很大,只要网速不是特别差还是很快的。

[root@22edf28f349d oracle_package]# yum -y install gcc*
[root@22edf28f349d oracle_package]# yum -y install glibc*

也可以指安装所需的包,并且要注意顺序:

Oracle 对GCC的顺序:

复制代码
glibc-common-2.12-1.80.el6.x86_64.rpm
kernel-headers-2.6.32-279.el6.x86_64.rpm
libgcc-4.4.6-4.el6.x86_64.rpm
glibc-2.12-1.80.el6.x86_64.rpm
libgomp-4.4.6-4.el6.x86_64.rpm
nscd-2.12-1.80.el6.x86_64.rpm
glibc-headers-2.12-1.80.el6.x86_64.rpm
glibc-devel-2.12-1.80.el6.x86_64.rpm
mpfr-2.4.1-6.el6.x86_64.rpm
ppl-0.10.2-11.el6.x86_64.rpm
cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
cpp-4.4.6-4.el6.x86_64.rpm
gcc-4.4.6-4.el6.x86_64.rpm
注:以上是安装gcc,软件安装顺序不能错
libstdc++-4.4.6-4.el6.x86_64.rpm
libstdc++-devel-4.4.6-4.el6.x86_64.rpm
gcc-c++-4.4.6-4.el6.x86_64.rpm
注:以上是安装gcc-c++
复制代码

也可以使用yum的方式进行安装

复制代码
 #yum -y install gcc
 #yum -y install make
 #yum -y install binutils
 #yum -y install gcc-c++
 #yum -y install compat-libstdc++-33
 #yum -y install elfutils-libelf-devel
 #yum -y install elfutils-libelf-devel-static
 #yum -y install ksh
 #yum -y install libaio
 #yum -y install libaio-devel
 #yum -y install numactl-devel
 #yum -y install sysstat
 #yum -y install unixODBC
 #yum -y install unixODBC-devel
 #yum -y install pcre-devel
复制代码

 

注意:  

在使用yum安装时如果出现如下错误:

复制代码
[root@d0361c82ec77 oracle_package]# yum -y install gcc*
Loaded plugins: fastestmirror
Setting up Install Process
Examining gcc-4.4.7-4.el6.x86_64.rpm: gcc-4.4.7-4.el6.x86_64
Marking gcc-4.4.7-4.el6.x86_64.rpm to be installed
base                                                     | 3.7 kB     00:00     
base/primary_db                                          | 4.7 MB     00:05     
epel                                                     | 4.3 kB     00:00     
epel/primary_db                                          | 4.6 MB     00:10     
Error: xz compression not available
[root@d0361c82ec77 oracle_package]# 
复制代码

这个错误主要意思是没有epel或者存在错误的epel,可以这样来解决:

  1.remove 错误的epel

有可能会出现如下:说明系统还没有epel

复制代码
[root@d0361c82ec77 oracle_package]# yum remove epel-release
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: epel-release
Determining fastest mirrors
Error: xz compression not available
[root@d0361c82ec77 oracle_package]# 
复制代码

或者:移除epel成功

复制代码
[root@d0361c82ec77 yum]# yum remove epel-release
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package               Arch            Version         Repository          Size
================================================================================
Removing:
 epel-release          noarch          6-8             installed           22 k

Transaction Summary
================================================================================
Remove        1 Package(s)

Installed size: 22 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Erasing    : epel-release-6-8.noarch                                      1/1 
warning: /etc/yum.repos.d/epel.repo saved as /etc/yum.repos.d/epel.repo.rpmsave
  Verifying  : epel-release-6-8.noarch                                      1/1 

Removed:
  epel-release.noarch 0:6-8                                                     

Complete!
复制代码

这两种情况都没有问题,接着执行下面步骤

  2.清理epel 缓存

[root@d0361c82ec77 yum]# rm -rf /var/cache/yum/x86_64/6/epel

  3.重新安装正确的epel:

[root@d0361c82ec77 yum]# rpm -ivh http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.M6IbHz: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

  4.使用 yum search munin 检测是否安装正确

复制代码
[root@d0361c82ec77 yum]# yum search munin
Loaded plugins: fastestmirror base
| 3.7 kB 00:00 base/primary_db | 4.7 MB 00:14 epel/metalink | 5.4 kB 00:00 epel | 4.3 kB 00:00 epel/primary_db | 5.9 MB 00:27 extras | 3.4 kB 00:00 extras/primary_db | 37 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 5.4 MB 00:09 ============================== N/S Matched: munin ============================== PyMunin.noarch : Python Module for developing Munin Multigraph Monitoring : Plugins munin-java-plugins.noarch : java-plugins for munin munin-ruby-plugins.noarch : ruby-plugins for munin munin.noarch : Network-wide graphing framework (grapher/gatherer) munin-async.noarch : Network-wide graphing framework (asynchronous client tools) munin-cgi.noarch : Network-wide graphing framework (cgi files for apache) munin-common.noarch : Network-wide graphing framework (common files) munin-netip-plugins.noarch : Network-wide graphing framework (dhcpd3 and ntp : plugins) munin-nginx.noarch : Network-wide graphing framework (cgi files for nginx) munin-node.noarch : Network-wide graphing framework (node) Name and summary matches only, use "search all" for everything.
复制代码

到此这个问题就已经解决了,如果还有问题可以重复上述1.2.3.4步骤。

再次运行:

复制代码
[root@d0361c82ec77 yum]# yum -y install gcc*
Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
 * epel: mirrors.neusoft.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-17.el6 will be installed
--> Processing Dependency: libgomp = 4.4.7-
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值