1 启动
GBase 8c 通用管理平台的启动运行方式,分为前台运行和后台运行两种。其中前者便于观察平台运行状态,后者更适合平台使用。
使用docker-compose up命令,具体操作为:
[root@gbase8c GBase8cV5_P2.0.0B12_x86_64]# docker-compose up [-d]
使用前台运行方式,则无需使用-d参数;使用后台运行方式,则使用-d参数。
注意:启动运行命令必须在解压的GBase8cV5_P2.0.0B12_x86_64目录下执行,才能生效。
执行返回,即为启动成功。
Creating network "gbase8cv5p200b12x8664_gbase8c-dcp" with the default driver
Creating dcp-log ... done
Creating dcp-web ...
Creating dcp-monitor ...
Creating dcp-postgres ...
Creating dcp-log ...
Creating dcp-rest ...
Creating dcp-autodeploy ...
2 可视化界面访问
在浏览器地址栏输入地址http://:,可访问GBase 8c 通用管理平台的可视化界面。以http://10.0.7.7:8080为例,进入主界面。
图:GBase 8c 通用管理平台可视化界面
3 停止、删除容器
3.1 停止前台运行
如需停止GBase 8c 通用管理平台前台运行状态,只需Ctrl+C键操作。在服务器上返回^C,并显示退出命令行,如下:
^CGracefully stopping... (press Ctrl+C again to force)
Stopping dcp-autodeploy ... done
Stopping dcp-log ... done
Stopping dcp-rest ... done
Stopping dcp-ctl ... done
Stopping dcp-monitor ... done
Stopping dcp-postgres ... done
Stopping dcp-web ... done
注意:停止前台运行后,需删除容器。
3.2 停止后台运行
如需停止GBase 8c 通用管理平台的后台运行,使用docker-compose down停止命令即可。具体操作如下:
[root@gbase8c GBase8cV5_P2.0.0B12_x86_64]# docker-compose down
Stopping dcp-ctl ... done
Stopping dcp-log ... done
Stopping dcp-rest ... done
Stopping dcp-autodeploy ... done
Stopping dcp-postgres ... done
Stopping dcp-monitor ... done
Stopping dcp-web ... done
Removing dcp-ctl ... done
Removing dcp-log ... done
Removing dcp-rest ... done
Removing dcp-autodeploy ... done
Removing dcp-postgres ... done
Removing dcp-monitor ... done
Removing dcp-web ... done
Removing network gbase8cv5p200b12x8664_gbase8c-dcp
注意:停止运行命令也必须在解压的GBase8cV5_P2.0.0B12_x86_64目录下执行,才能生效。
3.3 删除容器
使用docker rm <容器名/容器短ID>命令&#xff0c;可直接删除停止状态的容器。仅前台运行模式的容器可处于停止状态。通过增加使用-f参数&#xff0c;可直接删除运行状态的容器。
查看待删除的容器名或容器短ID&#xff0c;使用docker ps –a命令。例如&#xff1a;
[root&#64;gbase8c GBase8cV5_P2.0.0B12_x86_64]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9e61e6ec431d 10.9.9.50:9527/gbase8c-dcp/dcp-autodeploy "sh -c &#39;java -jar ..." 4 minutes ago Exited (143) About a minute ago dcp-autodeploy
27b0279ef40a 10.9.9.50:9527/basic/ky10_x86_logstash:1.0 "sh /entrypoint.sh" 4 minutes ago Exited (137) About a minute ago dcp-log
01f45c1df244 10.9.9.50:9527/gbase8c-dcp/dcp-rest "sh -c &#39;java -jar ..." 4 minutes ago Exited (143) About a minute ago dcp-rest
f4336cfae514 10.9.9.50:9527/gbase8c-dcp/ctl-server:1.3 "/tmp/entrypoint.s..." 4 minutes ago Exited (0) About a minute ago dcp-ctl
dcb67a18fe51 10.9.9.50:9527/gbase8c-dcp/dcp-monitor:1.0 "sh entrypoint.sh" 4 minutes ago Exited (137) About a minute ago dcp-monitor
5fe0796da2c4 10.9.9.50:9527/basic/kylinx86_postgresql_13.4:1.0 "/usr/local/bin/en..." 4 minutes ago Exited (0) About a minute ago dcp-postgres
8723e71718cb 10.9.9.50:9527/gbase8c-dcp/dcp-web "/usr/local/nginx/..." 4 minutes ago Exited (0) About a minute ago dcp-web
以删除停止运行状态&#xff08;STATUS参数列为Exited&#xff09;的容器dcp-autodeploy为例&#xff0c;使用docker rm命令后&#xff0c;显示返回容器名或容器短ID&#xff0c;即停止操作完毕。
[root&#64;gbase8c ~]# docker rm 9e61e6ec431d
9e61e6ec431d
或为&#xff1a;
[root&#64;gbase8c ~]# docker rm dcp-autodeploy
dcp-autodeploy
4 卸载
对GBase 8c通用管理平台镜像文件的卸载操作&#xff0c;即为删除操作。可使用docker rmi <镜像标签>命令&#xff0c;删除各个镜像文件。