【笔记】基于Docker在MacBook安装Informix Developer Edition
序言
Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。
Informix是世界*商用数据库之一,能在MacBook上低成本的学习,则能帮助开发者对于数据库有更多的理解和认识。
本文介绍基于Docker,如何在MacBook上快速搭建体验环境。
一、环境准备
1.1下载Mac版Docker
(https://store.docker.com/editions/community/docker-ce-server-centos)
1.2安装运行Mac版Docker
- 双击
Docker.dmg
启动安装程序,拖拽至Application文件夹中。 - 双击应用文件夹中
Docker.app
,启动Docker. 看到下面的图标表示启动完毕。
3、验证安装后的版本
$ docker --version
Docker version 18.03, build c97c6d6
$ docker-compose --version
docker-compose version 1.21.2, build 8dd22a9
$ docker-machine --version
docker-machine version 0.14.0, build 9ba6da9
4、运行样例
$docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
至此Docker安装完毕。
二、查找所需的Image
Docker提供了和苹果、安卓类似的应用商店。https://store.docker.com/
我此次选择的是开发者版,限制如下:
https://www.ibm.com/developerworks/data/library/techarticle/dm-0801doe/index.html
For application development and testing only, this edition packs the full suite of Informix functionality into an attractive price point: free!
The Developer Edition includes all the functionality available in the Informix Enterprise Edition with scalability constraints including processing, memory, storage, and connection limitations .
It is available on a wide range of operating systems in 32- and 64-bit versions where appropriate. Customers can upgrade from the Developer Edition directly to any other edition simply by installing the new database binaries.
Since the intent of the Informix Developer Edition is for system development and test only, it cannot be used in a production environment, and there is no optional support package.
三、基于Docker下载Informix镜像
输入以下命令则启动安装,过程中需要输入密码授权安装程序。
docker pull ibmcom/informix-developer-database
四、初次启动Informix
输入以下命令:
docker run -it --name iif_developer_edition --privileged -p 9088:9088 -p 9089:9089 -p 27017:27017 -p 27018:27018 \
-p 27883:27883 -e LICENSE=accept ibmcom/informix-developer-database:latest
运行效果如下图:
五、查看Informix情况
Informix安装在/opt/IBM/informix,Informix 数据库服务器默认名称为dev,使用onstat了解基本情况。
上一篇: Spring应用手册-InitializingBean接口
下一篇: 1018 骨牌铺方格