您的位置:首页 > 运维架构 > Docker

Mac安装docker使用oracle11g

2018-01-03 00:00 316 查看
说明:以下绿底白字的命令请在系统终端内执行,不能直接访问github的请自学轻功,有些$$客户端的全局功能对系统终端无效果。
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.html
2.使用brew cask 安装 docker
brew cask install docker
参考链接: https://yeasy.gitbooks.io/docker_practice/content/install/mac.html 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/29941
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.html
oracle连接信息:
hostname: localhost
port: 1521
sid: xe
username: system
password: oracle
Password for SYS user
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Docker Mac OS X