37最佳阵容3232(三势阵最强T0阵容)

37最佳阵容3232(三势阵最强T0阵容)插图

昨天分享了一个单机版本集群的快速安装,具体请点此查看:「实战」开年第一篇,从「Greenplum 6.0」1分钟安装尝鲜开始。今天咱们来一起看看 Greenplum 安装目录分别都有什么内容,具体作用是什么。请大家注意,本文章中介绍的仅仅是软件安装目录的内容,并没有涉及到数据存储目录的内容,二者不能混为一谈

软件包安装位置

Greenplum 6 在安装完成后,与大部分其他应用软件的位置一致,默认的安装位置为 /usr/local 下。

[gpadmin@gp1 local]$ ls -al总用量 4drwxr-xr-x. 14 root root 187 12月 17 11:24 .drwxr-xr-x. 13 root root 155 9月 1 21:55 ..drwxr-xr-x. 2 root root 160 12月 27 17:58 bindrwxr-xr-x. 2 root root 6 4月 11 2018 etcdrwxr-xr-x. 2 root root 6 4月 11 2018 gamesdrwxr-xr-x 10 root root 272 9月 26 02:53 golrwxrwxrwx 1 root root 29 12月 17 11:24 greenplum-db -> /usr/local/greenplum-db-6.2.1drwxr-xr-x 11 root root 187 12月 17 11:24 greenplum-db-6.2.1drwxr-xr-x. 3 root root 20 12月 27 17:58 includedrwxr-xr-x. 3 root root 4096 12月 27 17:58 libdrwxr-xr-x. 3 root root 19 9月 8 04:18 lib64drwxr-xr-x. 2 root root 6 4月 11 2018 libexecdrwxr-xr-x. 2 root root 6 4月 11 2018 sbindrwxr-xr-x. 9 root root 107 12月 27 17:58 sharedrwxr-xr-x. 2 root root 6 4月 11 2018 src[gpadmin@gp1 local]$ pwd/usr/local

从上面的 shell 查询结果可以看到,有两个叫 Greenplum 的东西。[ greenplum-db-6.2.1 ] 是真正的代码目录,软件安装完后,所有与 Greenplum 相关的内容均存储在这个目录下,[ greenplum-db ] 这个则是一个软连接,指向上面目录。这里采用软连接的方式对于系统管理和升级都非常方便,同一大版本,基本可以通过更新软连接指向的方式升级;而采用统一软连接的名称也能避免一些维护程序的修改工作。

软件目录畅游

首先我们来看一下 Greenplum 软件安装目录下的内容都有哪些。

[gpadmin@gp1 greenplum-db]$ ls -al总用量 160drwxr-xr-x 11 root root 187 12月 17 11:24 .drwxr-xr-x. 14 root root 187 12月 17 11:24 ..drwxr-xr-x 7 root root 4096 12月 17 11:24 bindrwxr-xr-x 3 root root 22 12月 17 11:24 docsdrwxr-xr-x 2 root root 60 12月 17 11:24 etcdrwxr-xr-x 3 root root 20 12月 17 11:24 ext-rwxr-xr-x 1 root root 783 12月 17 11:24 greenplum_path.shdrwxr-xr-x 4 root root 4096 12月 17 11:24 includedrwxr-xr-x 6 root root 4096 12月 17 11:24 lib-rw-r--r-- 1 root root 135617 12月 13 02:57 open_source_license_pivotal_greenplum.txtdrwxr-xr-x 7 root root 93 12月 17 11:24 pxfdrwxr-xr-x 2 root root 4096 12月 17 11:24 sbindrwxr-xr-x 5 root root 52 12月 17 11:24 share

bin目录

故名思义,这个目录下的文件基本都是 Greenplum 的可执行命令,与其他 Linux 软件的套路一样,如果想要使用 bin 下面的命令,bin 目录必须被添加到操作系统 PATH 变量,所不同的是,我们不需要手工处理该操作,当你在 source greenplum_path.sh 的时候,这些工作他已经帮你完成了。

gpadmin@gp1 greenplum-db]$ ls -al bin总用量 122048drwxr-xr-x 7 root root 4096 12月 17 11:24 .drwxr-xr-x 11 root root 187 12月 17 11:24 ..-rwxr-xr-x 1 root root 65125 12月 13 02:57 analyzedb-rwxr-xr-x 1 root root 251160 12月 13 02:57 clusterdb-rwxr-xr-x 1 root root 246904 12月 13 02:57 createdb-rwxr-xr-x 1 root root 383616 12月 13 02:57 createlang-rwxr-xr-x 1 root root 249536 12月 13 02:57 createuser-rwxr-xr-x 1 root root 230096 12月 13 02:57 dropdb-rwxr-xr-x 1 root root 383512 12月 13 02:57 droplang-rwxr-xr-x 1 root root 229880 12月 13 02:57 dropuser-rwxr-xr-x 1 root root 2188616 12月 13 02:57 ecpg-rwxr-xr-x 1 root root 16204 12月 13 02:57 gpactivatestandby-rwxr-xr-x 1 root root 493 12月 13 02:57 gpaddmirrors-rwxr-xr-x 1 root root 166749 12月 13 02:57 gpcheckcatdrwxr-xr-x 2 root root 4096 12月 17 11:24 gpcheckcat_modules-rwxr-xr-x 1 root root 2514288 12月 13 02:57 gpcheckcloud-rwxr-xr-x 1 root root 27480 12月 13 02:57 gpcheckperf-rwxr-xr-x 1 root root 6052 12月 13 02:57 gpcheckresgroupimpl-rwxr-xr-x 1 root root 22604 12月 13 02:57 gpconfigdrwxr-xr-x 2 root root 4096 12月 17 11:24 gpconfig_modules-rwxr-xr-x 1 root root 14497 12月 13 02:57 gpdeletesystem-rwxr-xr-x 1 root root 109833 12月 13 02:57 gpexpand-rwxr-xr-x 1 root root 435688 12月 13 02:57 gpfdist-rwxr-xr-x 1 root root 32095 12月 13 02:57 gpinitstandby-rwxr-xr-x 1 root root 81788 12月 13 02:57 gpinitsystem-rwxr-xr-x 1 root root 6475584 12月 13 02:57 gpkafka-rwxr-xr-x 1 root root 320 12月 13 02:57 gpload-rwxr-xr-x 1 root root 202 12月 13 02:57 gpload.bat-rwxr-xr-x 1 root root 107558 12月 13 02:57 gpload.py-rwxr-xr-x 1 root root 82833 12月 13 02:57 gpload.pyc-rwxr-xr-x 1 root root 20933 12月 13 02:57 gplogfilter-rwxr-xr-x 1 root root 456216 12月 13 02:57 gpmapreduce-rwxr-xr-x 1 root root 373232 12月 13 02:57 gpmmon-rwxr-xr-x 1 root root 20400 12月 13 02:57 gpmovemirrors-rwxr-xr-x 1 root root 1224 12月 13 02:57 gpperfmoncat.sh-rwxr-xr-x 1 root root 7675 12月 13 02:57 gpperfmon_install-rwxr-xr-x 1 root root 339 12月 13 02:57 gppkg-rwxr-xr-x 1 root root 547 12月 13 02:57 gprecoverseg-rwxr-xr-x 1 root root 1149 12月 13 02:57 gpreload-rwxr-xr-x 1 root root 4144 12月 13 02:57 gpscp-rwxr-xr-x 1 root root 9503 12月 13 02:57 gpsd-rwxr-xr-x 1 root root 233960 12月 13 02:57 gpsmon-rwxr-xr-x 1 root root 19323328 12月 13 02:57 gpss-rwxr-xr-x 1 root root 16547104 12月 13 02:57 gpsscli-rwxr-xr-x 1 root root 9173 12月 13 02:57 gpssh-rwxr-xr-x 1 root root 32583 12月 13 02:57 gpssh-exkeysdrwxr-xr-x 2 root root 98 12月 17 11:24 gpssh_modules-rwxr-xr-x 1 root root 35203 12月 13 02:57 gpstart-rwxr-xr-x 1 root root 421 12月 13 02:57 gpstate-rwxr-xr-x 1 root root 46654 12月 13 02:57 gpstop-rwxr-xr-x 1 root root 2731 12月 13 02:57 gpsys1-rwxr-xr-x 1 root root 490216 12月 13 02:57 initdbdrwxr-xr-x 3 root root 4096 12月 17 11:24 lib-rwxr-xr-x 1 root root 15198 12月 13 02:57 minirepro-rwxr-xr-x 1 root root 295288 12月 13 02:57 pg_basebackup-rwxr-xr-x 1 root root 1658352 12月 13 02:57 pgbouncer-rwxr-xr-x 1 root root 102544 12月 13 02:57 pg_config-rwxr-xr-x 1 root root 122920 12月 13 02:57 pg_controldata-rwxr-xr-x 1 root root 156128 12月 13 02:57 pg_ctl-rwxr-xr-x 1 root root 1564928 12月 13 02:57 pg_dump-rwxr-xr-x 1 root root 314808 12月 13 02:57 pg_dumpall-rwxr-xr-x 1 root root 232336 12月 13 02:57 pg_isready-rwxr-xr-x 1 root root 182928 12月 13 02:57 pg_receivexlog-rwxr-xr-x 1 root root 193880 12月 13 02:57 pg_recvlogical-rwxr-xr-x 1 root root 165248 12月 13 02:57 pg_resetxlog-rwxr-xr-x 1 root root 723712 12月 13 02:57 pg_restore-rwxr-xr-x 1 root root 454736 12月 13 02:57 pg_rewind-rwxr-xr-x 1 root root 753768 12月 13 02:57 pg_upgrade-rwxr-xr-x 1 root root 513592 12月 13 02:57 pg_xlogdump-rwxr-xr-x 1 root root 63414200 12月 13 02:57 postgreslrwxrwxrwx 1 root root 8 12月 17 11:24 postmaster -> postgres-rwxr-xr-x 1 root root 1491912 12月 13 02:57 psql-rwxr-xr-x 1 root root 250648 12月 13 02:57 reindexdbdrwxr-xr-x 2 root root 20 12月 17 11:24 stream-rwxr-xr-x 1 root root 259960 12月 13 02:57 vacuumdb[gpadmin@gp1 greenplum-db]$

以上列表具体软件的用途不详细展开了,可以移步官方文档或者部分参考 Greenplum 中文社区的开源GPDB 6中文文档(不包含企业级组件的使用,如gpkafka、gpss等,企业级组件建议购买官方服务或参考官方英文文档),这里简单提一下,从GPDB 5.x开始,已经陆续增加和删除了几个常用的组件,分别如下:

新增 gpkafka,用于对接 kafka 数据;新增 gpbackup 工具用于数据备份,属于单独组件,不在默认安装包中;新增 gpcopy 工具,用于集群数据复制和迁移;删除 gpcheck 工具,该工具原来用于验证操作系统参数配置;删除 gpfilespace 工具,该工具原来用于创建文件空间;删除 gp_dump 和 gpcrondump,该工具原来用于备份GP集群,目前已经被 gpbackup 替代;

未完待续~