Mac安装docker使用oracle11g

说明:如下绿底白字的命令请在系统终端内执行,不能直接访问github的请自学轻功,有些$$客户端的全局功能对系统终端无效果。html

1.安装brew和brew cask
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install caskroom/cask/brew-cask
参考连接:
https://brew.sh/index_zh-cn.html
https://aaaaaashu.gitbooks.io/mac-dev-setup/content/Homebrew/Cask.htmllinux

2.使用brew cask 安装 docker
brew cask install docker
参考连接:
https://yeasy.gitbooks.io/docker_practice/content/install/mac.htmlgit

3.下载docker镜像,启动docker镜像为容器,"oracle"是自定义容器名称
docker pull alexeiled/docker-oracle-xe-11g
docker run -h "oracle" --name "oracle" -d -p 1521:1521 -p 8080:8080 alexeiled/docker-oracle-xe-11g
参考连接:
https://hub.docker.com/r/alexeiled/docker-oracle-xe-11g/
https://yq.aliyun.com/articles/29941github

4.进入容器的bash,更新安装vim,编辑tnsnames.ora修改host为127.0.0.1后重启oracle容器,此步骤若不作,还原dmp会提示IMP-00058: ORACLE error 12545 encountered
docker exec -it oracle /bin/bash
-------------------------------容器内shell开始-----------------------------------
apt-get update
apt-get upgrade
apt-get install vim
vim /u01/app/oracle/product/11.2.0/xe/network/admin/tnsnames.ora

-------------------------------容器内shell结束-----------------------------------
docker restart oracle
参考连接:
http://blog.51cto.com/innocence/1744506
http://www.runoob.com/linux/linux-vim.htmldocker

oracle链接信息:
hostname: localhost
port: 1521
sid: xe
username: system
password: oracle
Password for SYS usershell

相关文章
相关标签/搜索