diff --git a/product/en/docs-mogdb/v3.0/installation-guide/ptk-based-installation.md b/product/en/docs-mogdb/v3.0/installation-guide/ptk-based-installation.md index 283aad8a42d0d5ab8fff798d102ae4f3eca37c6e..b9c4b824e195d107276c507b4881baed0b1e2571 100644 --- a/product/en/docs-mogdb/v3.0/installation-guide/ptk-based-installation.md +++ b/product/en/docs-mogdb/v3.0/installation-guide/ptk-based-installation.md @@ -15,30 +15,50 @@ You can run the following command to check operating systems where MogDB can be ```bash [root@hostname ~]# ptk candidate os - software | version ------------+-------------------------------------- - OS | CentOS 7 (x86_64) - | CentOS 8 (arm64) - | CentOS 8 (x86_64) - | EulerOS 2 (arm64) - | EulerOS 2 (x86_64) - | Kylin V10 (arm64) - | Kylin V10 (x86_64) - | NeoKylin V7 (x86_64) - | Oracle Linux 7 (x86_64) - | Oracle Linux 8 (x86_64) - | Red Hat Enterprise Linux 7 (x86_64) - | Red Hat Enterprise Linux 8 (x86_64) - | Rocky Linux 7 (x86_64) - | Rocky Linux 8 (x86_64) - | SLES 12 (arm64) - | UOS 20 (arm64) - | UOS 20 (x86_64) - | Ubuntu 18 (x86_64) - | openEuler 20 (arm64) - | openEuler 20 (x86_64) - | openEuler 22 (arm64) - | openEuler 22 (x86_64) + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **Note**: The PTK tool itself can run on a variety of operating systems, including Linux, macOS, and Windows. However, since MogDB currently only runs on Linux, you need to ensure that the server on which you want to run the MogDB database is a Linux operating system. @@ -49,7 +69,30 @@ For details about environment requirements and operating system configuration, s ## PTK Installation -For details, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). +The following introduces how to perform quick online installation. PTK supports online and offline installation. For details about offline installation, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). + +1. Run the following command to install PTK. + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + Information similar to the following is displayed (the information varies depending on the type of Shell for running PTK). + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. Run the source command or open a terminal to make PTK environment variables take effect. For example, use bash as an example. + + ```bash + source $HOME/.bashrc + ``` ## Installing MogDB Using PTK @@ -132,67 +175,34 @@ After successful installation, you can check the instance information by running ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-3.0.1 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 3.0.1 (build xxxxxxxx) | 2023-11-28T16:41:57 | ``` ### Access MogDB ```shell su - omm -gsql -d postgres -p 26000 +gsql -r ``` ## Uninstalling MogDB Using PTK -> **Note**: Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. +During uninstallation, PTK will check whether the cluster is in the running status. A cluster in the running status cannot be uninstalled. You need to stop the cluster and then uninstall the cluster. -You can run the following command to uninstall the database. +> **Note**: +> Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` - -Before uninstallation, PTK questions you in an interactive way to confirm the topology information of the cluster to be deleted, whether to delete the system user, and whether to delete the database data. Please confirm your answer to each question to avoid data loss due to incorrect operations. +You can run the `ptk uninstall -n CLUSTER_NAME` command on the server where PTK is installed to uninstall a cluster. -Before uninstallation, if you confirm deletion of the data directory, PTK will delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. +To uninstall a cluster, you need to specify the cluster name, you can run the `ptk ls` command to query the cluster name. -If uninstallation is successful, information similar to the following is displayed. +During uninstallation, PTK will ask you whether to delete the cluster topology information, system user, and database data. -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**Please perform operations with cautions, avoiding data loss due to incorrect operations.** -> **Note**: You can specify a database cluster to be uninstalled by config.yaml or the cluster name. The prerequisite of specifying a database cluster by the cluster name is that you can find the cluster by running `ptk ls`. +> If you are sure to delete the data directory, PTK delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. ## Related Page diff --git a/product/en/docs-mogdb/v3.0/quick-start/installation-on-a-single-node.md b/product/en/docs-mogdb/v3.0/quick-start/installation-on-a-single-node.md index 2e0be8fddc2bb01ed0ef600c244adb289beeabce..91dfad64828788ed3317cacf7001ce4c96d62d1d 100644 --- a/product/en/docs-mogdb/v3.0/quick-start/installation-on-a-single-node.md +++ b/product/en/docs-mogdb/v3.0/quick-start/installation-on-a-single-node.md @@ -15,30 +15,50 @@ You can run the following command to check operating systems where MogDB can be ```bash [root@hostname ~]# ptk candidate os - software | version ------------+-------------------------------------- - OS | CentOS 7 (x86_64) - | CentOS 8 (arm64) - | CentOS 8 (x86_64) - | EulerOS 2 (arm64) - | EulerOS 2 (x86_64) - | Kylin V10 (arm64) - | Kylin V10 (x86_64) - | NeoKylin V7 (x86_64) - | Oracle Linux 7 (x86_64) - | Oracle Linux 8 (x86_64) - | Red Hat Enterprise Linux 7 (x86_64) - | Red Hat Enterprise Linux 8 (x86_64) - | Rocky Linux 7 (x86_64) - | Rocky Linux 8 (x86_64) - | SLES 12 (arm64) - | UOS 20 (arm64) - | UOS 20 (x86_64) - | Ubuntu 18 (x86_64) - | openEuler 20 (arm64) - | openEuler 20 (x86_64) - | openEuler 22 (arm64) - | openEuler 22 (x86_64) + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **Note**: The PTK tool itself can run on a variety of operating systems, including Linux, macOS, and Windows. However, since MogDB currently only runs on Linux, you need to ensure that the server on which you want to run the MogDB database is a Linux operating system. @@ -127,67 +147,34 @@ After successful installation, you can check the instance information by running ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-3.0.1 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 3.0.1 (build xxxxxxxx) | 2023-11-28T16:41:57 | ``` ### Access MogDB ```shell su - omm -gsql -d postgres -p 26000 +gsql -r ``` ## Uninstalling MogDB Using PTK -> **Note**: Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. +During uninstallation, PTK will check whether the cluster is in the running status. A cluster in the running status cannot be uninstalled. You need to stop the cluster and then uninstall the cluster. -You can run the following command to uninstall the database. +> **Note**: +> Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +You can run the `ptk uninstall -n CLUSTER_NAME` command on the server where PTK is installed to uninstall a cluster. -Before uninstallation, PTK questions you in an interactive way to confirm the topology information of the cluster to be deleted, whether to delete the system user, and whether to delete the database data. Please confirm your answer to each question to avoid data loss due to incorrect operations. +To uninstall a cluster, you need to specify the cluster name, you can run the `ptk ls` command to query the cluster name. -Before uninstallation, if you confirm deletion of the data directory, PTK will delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. +During uninstallation, PTK will ask you whether to delete the cluster topology information, system user, and database data. -If uninstallation is successful, information similar to the following is displayed. - -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**Please perform operations with cautions, avoiding data loss due to incorrect operations.** -> **Note**: You can specify a database cluster to be uninstalled by config.yaml or the cluster name. The prerequisite of specifying a database cluster by the cluster name is that you can find the cluster by running `ptk ls`. +> If you are sure to delete the data directory, PTK delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. ## Related Page diff --git a/product/en/docs-mogdb/v5.0/installation-guide/ptk-based-installation.md b/product/en/docs-mogdb/v5.0/installation-guide/ptk-based-installation.md index ae5e9d56fdb4fcd2d758055a8aa67942138fa1c7..a5287ba1e1f830724e0cc19eef78d5e1bac77697 100644 --- a/product/en/docs-mogdb/v5.0/installation-guide/ptk-based-installation.md +++ b/product/en/docs-mogdb/v5.0/installation-guide/ptk-based-installation.md @@ -15,50 +15,50 @@ You can run the following command to check operating systems where MogDB can be ```bash [root@hostname ~]# ptk candidate os - ID | OS | Tested Version(s) | Fully Compatibility Tested - | | | (MogDB) -----------+----------------------------------------------+-------------------------------+----------------------------- - 1007010 | CentOS Linux 7 (Core) (x86_64) | 7.6.1810 (Core) | all versions - 1008010 | CentOS 8 (x86_64) | 8.0.1905 (Core) | - 1008020 | CentOS 8 (arm64) | 8.0.1905 (Core) | - 1120010 | openEuler 20 (x86_64) | 20.03 LTS | < 5.0.0 - 1120020 | openEuler 20 (arm64) | 20.03 LTS | < 5.0.0 - 1122010 | openEuler 22 (x86_64) | 22.03 LTS | - 1122020 | openEuler 22 (arm64) | 22.03 LTS | - 1210010 | Kylin V10 (x86_64) | V10 (Tercel) | all versions - 1210020 | Kylin V10 (arm64) | V10 (Tercel) | all versions - 1320010 | UOS 20 A (x86_64) | 1002a/1020a/1050a | - 1320020 | UOS 20 A (arm64) | 1050a (kongzi) | - 1420010 | UOS 20 D/E (x86_64) | 1040d (fou) | - 1420020 | UOS 20 D/E (arm64) | 1040d (fou) | - 1518010 | Ubuntu 18.04.6 LTS (x86_64) | 18.04.6 LTS (Bionic Beaver) | - 1518020 | Ubuntu 18.04.6 LTS (arm64) | 18.04.6 LTS (Bionic Beaver) | - 1520010 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) | - 1520020 | Ubuntu 20 LTS (arm64) | 20.04.5 LTS (Focal Fossa) | - 1522010 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) | - 1522020 | Ubuntu 22 LTS (arm64) | 22.04.1 LTS (Jammy Jellyfish) | - 1607010 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) | - 1608010 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) | - 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | 8.2 (Ootpa) | - 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | 9.0 (Plow) | - 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | 9.0 (Plow) | - 1702010 | EulerOS 2 (x86_64) | 2.0 (SP3) | - 1702020 | EulerOS 2 (arm64) | 2.0 (SP3) | - 1812010 | SLES 12SP5 (x86_64) | 12SP5 | - 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | 15-SP4 | - 1907010 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) | - 1908010 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) | - 2008010 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) | - 2107010 | NeoKylin V7 (x86_64) | V7Update6 | - 2222010 | FusionOS 22 (x86_64) | 22.0.2 | - 2222020 | FusionOS 22 (arm64) | 22.0.2 | - 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | 10 (buster) | - 2310020 | Debian GNU/Linux 10 (buster) (arm64) | 10 (buster) | - 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | 11 (bullseye) | - 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | 11 (bullseye) | - 2407010 | Anolis OS Linux 7 (x86_64) | 7.9 GA (kernel:RHCK) | - 2408010 | Anolis OS 8 (x86_64) | 8.6 GA (kernel:RHCK) | - 2408020 | Anolis OS 8 (arm64) | 8.6 GA (kernel:ANCK) | + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **Note**: The PTK tool itself can run on a variety of operating systems, including Linux, macOS, and Windows. However, since MogDB currently only runs on Linux, you need to ensure that the server on which you want to run the MogDB database is a Linux operating system. @@ -69,7 +69,30 @@ For details about environment requirements and operating system configuration, s ## PTK Installation -For details, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). +The following introduces how to perform quick online installation. PTK supports online and offline installation. For details about offline installation, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). + +1. Run the following command to install PTK. + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + Information similar to the following is displayed (the information varies depending on the type of Shell for running PTK). + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. Run the source command or open a terminal to make PTK environment variables take effect. For example, use bash as an example. + + ```bash + source $HOME/.bashrc + ``` ## Installing MogDB Using PTK @@ -132,7 +155,7 @@ ptk checkos -f config.yaml Make sure the check result includes `OK` or `Warning`. If `Abnormal` occurs, the users needs to modify system parameters based on logs. -If there is an `Abnormal` check result, PTK will automatically generate a root_fix_***.sh file, which can be used to quickly correct system parameters; if there is an `ExecuteError` check result, it represents a PTK execution failure, requiring the user to adjust the system environment based on the error message. +If there is an `Abnormal` check result, PTK will automatically generate a `root_fix_***.sh` file, which can be used to quickly correct system parameters; if there is an `ExecuteError` check result, it represents a PTK execution failure, requiring the user to adjust the system environment based on the error message. ### Install MogDB @@ -152,9 +175,9 @@ After successful installation, you can check the instance information by running ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-5.0.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 5.0.0 (build xxxxxxxx) | 2023-11-28T16:41:57 | ``` ### Access MogDB @@ -166,53 +189,20 @@ gsql -r ## Uninstalling MogDB Using PTK -> **Note**: Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. +During uninstallation, PTK will check whether the cluster is in the running status. A cluster in the running status cannot be uninstalled. You need to stop the cluster and then uninstall the cluster. -You can run the following command to uninstall the database. +> **Note**: +> Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` - -Before uninstallation, PTK questions you in an interactive way to confirm the topology information of the cluster to be deleted, whether to delete the system user, and whether to delete the database data. Please confirm your answer to each question to avoid data loss due to incorrect operations. +You can run the `ptk uninstall -n CLUSTER_NAME` command on the server where PTK is installed to uninstall a cluster. -Before uninstallation, if you confirm deletion of the data directory, PTK will delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. +To uninstall a cluster, you need to specify the cluster name, you can run the `ptk ls` command to query the cluster name. -If uninstallation is successful, information similar to the following is displayed. +During uninstallation, PTK will ask you whether to delete the cluster topology information, system user, and database data. -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**Please perform operations with cautions, avoiding data loss due to incorrect operations.** -> **Note**: You can specify a database cluster to be uninstalled by config.yaml or the cluster name. The prerequisite of specifying a database cluster by the cluster name is that you can find the cluster by running `ptk ls`. +> If you are sure to delete the data directory, PTK delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. ## Related Page diff --git a/product/en/docs-mogdb/v5.0/quick-start/installation-on-a-single-node.md b/product/en/docs-mogdb/v5.0/quick-start/installation-on-a-single-node.md index 3c3330b2d8402ad91e6636f482aa43bd3bde09d2..34f8cfa7754ca650d3a5cc232716234def185b2e 100644 --- a/product/en/docs-mogdb/v5.0/quick-start/installation-on-a-single-node.md +++ b/product/en/docs-mogdb/v5.0/quick-start/installation-on-a-single-node.md @@ -15,50 +15,50 @@ You can run the following command to check operating systems where MogDB can be ```bash [root@hostname ~]# ptk candidate os - ID | OS | Tested Version(s) | Fully Compatibility Tested - | | | (MogDB) -----------+----------------------------------------------+-------------------------------+----------------------------- - 1007010 | CentOS Linux 7 (Core) (x86_64) | 7.6.1810 (Core) | all versions - 1008010 | CentOS 8 (x86_64) | 8.0.1905 (Core) | - 1008020 | CentOS 8 (arm64) | 8.0.1905 (Core) | - 1120010 | openEuler 20 (x86_64) | 20.03 LTS | < 5.0.0 - 1120020 | openEuler 20 (arm64) | 20.03 LTS | < 5.0.0 - 1122010 | openEuler 22 (x86_64) | 22.03 LTS | - 1122020 | openEuler 22 (arm64) | 22.03 LTS | - 1210010 | Kylin V10 (x86_64) | V10 (Tercel) | all versions - 1210020 | Kylin V10 (arm64) | V10 (Tercel) | all versions - 1320010 | UOS 20 A (x86_64) | 1002a/1020a/1050a | - 1320020 | UOS 20 A (arm64) | 1050a (kongzi) | - 1420010 | UOS 20 D/E (x86_64) | 1040d (fou) | - 1420020 | UOS 20 D/E (arm64) | 1040d (fou) | - 1518010 | Ubuntu 18.04.6 LTS (x86_64) | 18.04.6 LTS (Bionic Beaver) | - 1518020 | Ubuntu 18.04.6 LTS (arm64) | 18.04.6 LTS (Bionic Beaver) | - 1520010 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) | - 1520020 | Ubuntu 20 LTS (arm64) | 20.04.5 LTS (Focal Fossa) | - 1522010 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) | - 1522020 | Ubuntu 22 LTS (arm64) | 22.04.1 LTS (Jammy Jellyfish) | - 1607010 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) | - 1608010 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) | - 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | 8.2 (Ootpa) | - 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | 9.0 (Plow) | - 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | 9.0 (Plow) | - 1702010 | EulerOS 2 (x86_64) | 2.0 (SP3) | - 1702020 | EulerOS 2 (arm64) | 2.0 (SP3) | - 1812010 | SLES 12SP5 (x86_64) | 12SP5 | - 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | 15-SP4 | - 1907010 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) | - 1908010 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) | - 2008010 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) | - 2107010 | NeoKylin V7 (x86_64) | V7Update6 | - 2222010 | FusionOS 22 (x86_64) | 22.0.2 | - 2222020 | FusionOS 22 (arm64) | 22.0.2 | - 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | 10 (buster) | - 2310020 | Debian GNU/Linux 10 (buster) (arm64) | 10 (buster) | - 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | 11 (bullseye) | - 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | 11 (bullseye) | - 2407010 | Anolis OS Linux 7 (x86_64) | 7.9 GA (kernel:RHCK) | - 2408010 | Anolis OS 8 (x86_64) | 8.6 GA (kernel:RHCK) | - 2408020 | Anolis OS 8 (arm64) | 8.6 GA (kernel:ANCK) | + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **Note**: The PTK tool itself can run on a variety of operating systems, including Linux, macOS, and Windows. However, since MogDB currently only runs on Linux, you need to ensure that the server on which you want to run the MogDB database is a Linux operating system. @@ -147,9 +147,9 @@ After successful installation, you can check the instance information by running ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-5.0.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 5.0.0 (build xxxxxxxx) | 2023-11-28T16:41:57 | ``` ### Access MogDB @@ -161,53 +161,20 @@ gsql -r ## Uninstalling MogDB Using PTK -> **Note**: Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. +During uninstallation, PTK will check whether the cluster is in the running status. A cluster in the running status cannot be uninstalled. You need to stop the cluster and then uninstall the cluster. -You can run the following command to uninstall the database. +> **Note**: +> Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +You can run the `ptk uninstall -n CLUSTER_NAME` command on the server where PTK is installed to uninstall a cluster. -Before uninstallation, PTK questions you in an interactive way to confirm the topology information of the cluster to be deleted, whether to delete the system user, and whether to delete the database data. Please confirm your answer to each question to avoid data loss due to incorrect operations. +To uninstall a cluster, you need to specify the cluster name, you can run the `ptk ls` command to query the cluster name. -Before uninstallation, if you confirm deletion of the data directory, PTK will delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. +During uninstallation, PTK will ask you whether to delete the cluster topology information, system user, and database data. -If uninstallation is successful, information similar to the following is displayed. - -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**Please perform operations with cautions, avoiding data loss due to incorrect operations.** -> **Note**: You can specify a database cluster to be uninstalled by config.yaml or the cluster name. The prerequisite of specifying a database cluster by the cluster name is that you can find the cluster by running `ptk ls`. +> If you are sure to delete the data directory, PTK delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. ## Related Page diff --git a/product/en/docs-mogdb/v5.1/installation-guide/ptk-based-installation.md b/product/en/docs-mogdb/v5.1/installation-guide/ptk-based-installation.md index ae5e9d56fdb4fcd2d758055a8aa67942138fa1c7..df5b931891e06abf93e76642fa592f79691fdec0 100644 --- a/product/en/docs-mogdb/v5.1/installation-guide/ptk-based-installation.md +++ b/product/en/docs-mogdb/v5.1/installation-guide/ptk-based-installation.md @@ -15,50 +15,50 @@ You can run the following command to check operating systems where MogDB can be ```bash [root@hostname ~]# ptk candidate os - ID | OS | Tested Version(s) | Fully Compatibility Tested - | | | (MogDB) -----------+----------------------------------------------+-------------------------------+----------------------------- - 1007010 | CentOS Linux 7 (Core) (x86_64) | 7.6.1810 (Core) | all versions - 1008010 | CentOS 8 (x86_64) | 8.0.1905 (Core) | - 1008020 | CentOS 8 (arm64) | 8.0.1905 (Core) | - 1120010 | openEuler 20 (x86_64) | 20.03 LTS | < 5.0.0 - 1120020 | openEuler 20 (arm64) | 20.03 LTS | < 5.0.0 - 1122010 | openEuler 22 (x86_64) | 22.03 LTS | - 1122020 | openEuler 22 (arm64) | 22.03 LTS | - 1210010 | Kylin V10 (x86_64) | V10 (Tercel) | all versions - 1210020 | Kylin V10 (arm64) | V10 (Tercel) | all versions - 1320010 | UOS 20 A (x86_64) | 1002a/1020a/1050a | - 1320020 | UOS 20 A (arm64) | 1050a (kongzi) | - 1420010 | UOS 20 D/E (x86_64) | 1040d (fou) | - 1420020 | UOS 20 D/E (arm64) | 1040d (fou) | - 1518010 | Ubuntu 18.04.6 LTS (x86_64) | 18.04.6 LTS (Bionic Beaver) | - 1518020 | Ubuntu 18.04.6 LTS (arm64) | 18.04.6 LTS (Bionic Beaver) | - 1520010 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) | - 1520020 | Ubuntu 20 LTS (arm64) | 20.04.5 LTS (Focal Fossa) | - 1522010 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) | - 1522020 | Ubuntu 22 LTS (arm64) | 22.04.1 LTS (Jammy Jellyfish) | - 1607010 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) | - 1608010 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) | - 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | 8.2 (Ootpa) | - 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | 9.0 (Plow) | - 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | 9.0 (Plow) | - 1702010 | EulerOS 2 (x86_64) | 2.0 (SP3) | - 1702020 | EulerOS 2 (arm64) | 2.0 (SP3) | - 1812010 | SLES 12SP5 (x86_64) | 12SP5 | - 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | 15-SP4 | - 1907010 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) | - 1908010 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) | - 2008010 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) | - 2107010 | NeoKylin V7 (x86_64) | V7Update6 | - 2222010 | FusionOS 22 (x86_64) | 22.0.2 | - 2222020 | FusionOS 22 (arm64) | 22.0.2 | - 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | 10 (buster) | - 2310020 | Debian GNU/Linux 10 (buster) (arm64) | 10 (buster) | - 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | 11 (bullseye) | - 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | 11 (bullseye) | - 2407010 | Anolis OS Linux 7 (x86_64) | 7.9 GA (kernel:RHCK) | - 2408010 | Anolis OS 8 (x86_64) | 8.6 GA (kernel:RHCK) | - 2408020 | Anolis OS 8 (arm64) | 8.6 GA (kernel:ANCK) | + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **Note**: The PTK tool itself can run on a variety of operating systems, including Linux, macOS, and Windows. However, since MogDB currently only runs on Linux, you need to ensure that the server on which you want to run the MogDB database is a Linux operating system. @@ -69,7 +69,30 @@ For details about environment requirements and operating system configuration, s ## PTK Installation -For details, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). +The following introduces how to perform quick online installation. PTK supports online and offline installation. For details about offline installation, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). + +1. Run the following command to install PTK. + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + Information similar to the following is displayed (the information varies depending on the type of Shell for running PTK). + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. Run the source command or open a terminal to make PTK environment variables take effect. For example, use bash as an example. + + ```bash + source $HOME/.bashrc + ``` ## Installing MogDB Using PTK @@ -145,16 +168,16 @@ The MogDB of the latest version will be installed by default. You can check the PTK supports customization of the installation package and manual downloading of the installation package. For example, run the following command to install MogDB using the installation package in the current directory. ```shell -ptk install -f config.yaml --pkg ./MogDB-5.0.0-Kylin-arm64-all.tar.gz +ptk install -f config.yaml --pkg ./MogDB-5.1.0-Kylin-arm64-all.tar.gz ``` After successful installation, you can check the instance information by running the `ptk ls`command. ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-5.0.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 5.1.0 (build xxxxxxxx) | 2023-11-28T16:41:57 | ``` ### Access MogDB @@ -166,53 +189,20 @@ gsql -r ## Uninstalling MogDB Using PTK -> **Note**: Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. +During uninstallation, PTK will check whether the cluster is in the running status. A cluster in the running status cannot be uninstalled. You need to stop the cluster and then uninstall the cluster. -You can run the following command to uninstall the database. +> **Note**: +> Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` - -Before uninstallation, PTK questions you in an interactive way to confirm the topology information of the cluster to be deleted, whether to delete the system user, and whether to delete the database data. Please confirm your answer to each question to avoid data loss due to incorrect operations. +You can run the `ptk uninstall -n CLUSTER_NAME` command on the server where PTK is installed to uninstall a cluster. -Before uninstallation, if you confirm deletion of the data directory, PTK will delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. +To uninstall a cluster, you need to specify the cluster name, you can run the `ptk ls` command to query the cluster name. -If uninstallation is successful, information similar to the following is displayed. +During uninstallation, PTK will ask you whether to delete the cluster topology information, system user, and database data. -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**Please perform operations with cautions, avoiding data loss due to incorrect operations.** -> **Note**: You can specify a database cluster to be uninstalled by config.yaml or the cluster name. The prerequisite of specifying a database cluster by the cluster name is that you can find the cluster by running `ptk ls`. +> If you are sure to delete the data directory, PTK delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. ## Related Page diff --git a/product/en/docs-mogdb/v5.1/quick-start/installation-on-a-single-node.md b/product/en/docs-mogdb/v5.1/quick-start/installation-on-a-single-node.md index 3c3330b2d8402ad91e6636f482aa43bd3bde09d2..76fcf96e37fc4af4fc1dbfac100763d3b65add40 100644 --- a/product/en/docs-mogdb/v5.1/quick-start/installation-on-a-single-node.md +++ b/product/en/docs-mogdb/v5.1/quick-start/installation-on-a-single-node.md @@ -15,50 +15,50 @@ You can run the following command to check operating systems where MogDB can be ```bash [root@hostname ~]# ptk candidate os - ID | OS | Tested Version(s) | Fully Compatibility Tested - | | | (MogDB) -----------+----------------------------------------------+-------------------------------+----------------------------- - 1007010 | CentOS Linux 7 (Core) (x86_64) | 7.6.1810 (Core) | all versions - 1008010 | CentOS 8 (x86_64) | 8.0.1905 (Core) | - 1008020 | CentOS 8 (arm64) | 8.0.1905 (Core) | - 1120010 | openEuler 20 (x86_64) | 20.03 LTS | < 5.0.0 - 1120020 | openEuler 20 (arm64) | 20.03 LTS | < 5.0.0 - 1122010 | openEuler 22 (x86_64) | 22.03 LTS | - 1122020 | openEuler 22 (arm64) | 22.03 LTS | - 1210010 | Kylin V10 (x86_64) | V10 (Tercel) | all versions - 1210020 | Kylin V10 (arm64) | V10 (Tercel) | all versions - 1320010 | UOS 20 A (x86_64) | 1002a/1020a/1050a | - 1320020 | UOS 20 A (arm64) | 1050a (kongzi) | - 1420010 | UOS 20 D/E (x86_64) | 1040d (fou) | - 1420020 | UOS 20 D/E (arm64) | 1040d (fou) | - 1518010 | Ubuntu 18.04.6 LTS (x86_64) | 18.04.6 LTS (Bionic Beaver) | - 1518020 | Ubuntu 18.04.6 LTS (arm64) | 18.04.6 LTS (Bionic Beaver) | - 1520010 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) | - 1520020 | Ubuntu 20 LTS (arm64) | 20.04.5 LTS (Focal Fossa) | - 1522010 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) | - 1522020 | Ubuntu 22 LTS (arm64) | 22.04.1 LTS (Jammy Jellyfish) | - 1607010 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) | - 1608010 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) | - 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | 8.2 (Ootpa) | - 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | 9.0 (Plow) | - 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | 9.0 (Plow) | - 1702010 | EulerOS 2 (x86_64) | 2.0 (SP3) | - 1702020 | EulerOS 2 (arm64) | 2.0 (SP3) | - 1812010 | SLES 12SP5 (x86_64) | 12SP5 | - 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | 15-SP4 | - 1907010 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) | - 1908010 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) | - 2008010 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) | - 2107010 | NeoKylin V7 (x86_64) | V7Update6 | - 2222010 | FusionOS 22 (x86_64) | 22.0.2 | - 2222020 | FusionOS 22 (arm64) | 22.0.2 | - 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | 10 (buster) | - 2310020 | Debian GNU/Linux 10 (buster) (arm64) | 10 (buster) | - 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | 11 (bullseye) | - 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | 11 (bullseye) | - 2407010 | Anolis OS Linux 7 (x86_64) | 7.9 GA (kernel:RHCK) | - 2408010 | Anolis OS 8 (x86_64) | 8.6 GA (kernel:RHCK) | - 2408020 | Anolis OS 8 (arm64) | 8.6 GA (kernel:ANCK) | + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **Note**: The PTK tool itself can run on a variety of operating systems, including Linux, macOS, and Windows. However, since MogDB currently only runs on Linux, you need to ensure that the server on which you want to run the MogDB database is a Linux operating system. @@ -140,16 +140,16 @@ The MogDB of the latest version will be installed by default. You can check the PTK supports customization of the installation package and manual downloading of the installation package. For example, run the following command to install MogDB using the installation package in the current directory. ```shell -ptk install -f config.yaml --pkg ./MogDB-5.0.0-Kylin-arm64-all.tar.gz +ptk install -f config.yaml --pkg ./MogDB-5.1.0-Kylin-arm64-all.tar.gz ``` After successful installation, you can check the instance information by running the `ptk ls`command. ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-5.0.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 5.1.0 (build xxxxxxxx) | 2023-11-28T16:41:57 | ``` ### Access MogDB @@ -161,53 +161,20 @@ gsql -r ## Uninstalling MogDB Using PTK -> **Note**: Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. +During uninstallation, PTK will check whether the cluster is in the running status. A cluster in the running status cannot be uninstalled. You need to stop the cluster and then uninstall the cluster. -You can run the following command to uninstall the database. +> **Note**: +> Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +You can run the `ptk uninstall -n CLUSTER_NAME` command on the server where PTK is installed to uninstall a cluster. -Before uninstallation, PTK questions you in an interactive way to confirm the topology information of the cluster to be deleted, whether to delete the system user, and whether to delete the database data. Please confirm your answer to each question to avoid data loss due to incorrect operations. +To uninstall a cluster, you need to specify the cluster name, you can run the `ptk ls` command to query the cluster name. -Before uninstallation, if you confirm deletion of the data directory, PTK will delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. +During uninstallation, PTK will ask you whether to delete the cluster topology information, system user, and database data. -If uninstallation is successful, information similar to the following is displayed. - -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**Please perform operations with cautions, avoiding data loss due to incorrect operations.** -> **Note**: You can specify a database cluster to be uninstalled by config.yaml or the cluster name. The prerequisite of specifying a database cluster by the cluster name is that you can find the cluster by running `ptk ls`. +> If you are sure to delete the data directory, PTK delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. ## Related Page diff --git a/product/en/docs-uqbar/v1.1/ptk-based-installation.md b/product/en/docs-uqbar/v1.1/ptk-based-installation.md index 898454f36934015ad52feafaccfd4061f8d3562e..64d4431901e0328d616bba561a61670a58f59c7d 100644 --- a/product/en/docs-uqbar/v1.1/ptk-based-installation.md +++ b/product/en/docs-uqbar/v1.1/ptk-based-installation.md @@ -9,39 +9,56 @@ date: 2022-06-02 This document introduces how to install Uqbar using PTK. -PTK (Provisioning Toolkit) is a software installation, and operation and maintenance tool developed for Uqbar to facilitate the installation and deployment of the Uqbar database. +PTK (Provisioning Toolkit) is a software installation, and operation and maintenance tool developed for MogDB to facilitate the installation and deployment of the MogDB database, and also used for Uqbar. You can run the following command to check operating systems where Uqbar can be installed using PTK. ```bash [root@hostname]# ptk candidate os - id | os | tested version(s) ------+-------------------------------------+---------------------------- - 1 | CentOS 7 (x86_64) | 7.6.1810 (Core) - 2 | openEuler 20 (x86_64) | 20.03 LTS - 3 | openEuler 20 (arm64) | 20.03 LTS - 4 | openEuler 22 (x86_64) | 22.03 LTS - 5 | openEuler 22 (arm64) | 22.03 LTS - 6 | Kylin V10 (x86_64) | V10 (Tercel) - 7 | Kylin V10 (arm64) | V10 (Tercel) - 8 | UOS 20 A (x86_64) | 1002a/1020a/1050a - 9 | UOS 20 A (arm64) | 1050a (kongzi) - 10 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) - 11 | CentOS 8 (arm64) | 8.0.1905 (Core) - 12 | CentOS 8 (x86_64) | 8.0.1905 (Core) - 13 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) - 14 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) - 15 | EulerOS 2 (x86_64) | 2.0 (SP3) - 16 | EulerOS 2 (arm64) | 2.0 (SP3) - 18 | SLES 12SP5 (x86_64) | 12SP5 - 19 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) - 20 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) - 21 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) - 22 | NeoKylin V7 (x86_64) | V7Update6 - 23 | UOS 20 D/E (x86_64) | 1040d (fou) - 24 | UOS 20 D/E (arm64) | 1040d (fou) - - 25 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **Note**: @@ -51,11 +68,34 @@ You can run the following command to check operating systems where Uqbar can be ## Installation Preparation -For details about environment requirements and operating system configuration, see [Environment Requirement](https://docs.mogdb.io/en/mogdb/v3.1/environment-requirement) and [Operating System Configuration](https://docs.mogdb.io/en/mogdb/v3.1/os-configuration). +For details about environment requirements and operating system configuration, see [Environment Requirement](https://docs.mogdb.io/en/mogdb/v5.0/environment-requirement) and [Operating System Configuration](https://docs.mogdb.io/en/mogdb/v5.0/os-configuration). ## PTK Installation -For details, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). +The following introduces how to perform quick online installation. PTK supports online and offline installation. For details about offline installation, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). + +1. Run the following command to install PTK. + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + Information similar to the following is displayed (the information varies depending on the type of Shell for running PTK). + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. Run the source command or open a terminal to make PTK environment variables take effect. For example, use bash as an example. + + ```bash + source $HOME/.bashrc + ``` ## Installing Uqbar Using PTK @@ -100,14 +140,14 @@ db_servers: ssh_option: port: 22 user: root - password: [Enter the SSH login password] + password: [Enter the SSH login password, which should be encrypted by `ptk encrypt`.] - host: 192.168.0.2 db_port: 26000 role: standby ssh_option: port: 22 user: root - password: [Enter the SSH login password] + password: [Enter the SSH login password, which should be encrypted by `ptk encrypt`.] ``` ### Perform System Check on the Local Server @@ -118,6 +158,8 @@ ptk checkos -f config.yaml Make sure the check result includes `OK` or `Warning`. If `Abnormal` occurs, the users needs to modify system parameters based on logs. +If there is an `Abnormal` check result, PTK will automatically generate a `root_fix_***.sh` file, which can be used to quickly correct system parameters; if there is an `ExecuteError` check result, it represents a PTK execution failure, requiring the user to adjust the system environment based on the error message. + ### Install Uqbar PTK supports customization of the installation package and manual downloading of the installation package. For example, run the following command to install Uqbar using the installation package in the current directory. During the installation, you will be prompted to enter the initial password of the database user, and make sure that you take a note of the password. After automatic installation of Uqbar using PTK, the database instance will be started. @@ -130,67 +172,34 @@ After successful installation, you can check the instance information by running ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - uqbar1 | 172.16.0.127:26000 | omm | /opt/uqbar/data | Uqbar-1.1.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+----------+------------------------+----------------------------------+---------------------+---------- + uqbar1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/uqbar/data | Uqbar 1.1.0 (build fa071bfa) | 2023-11-30T16:29:46 | ``` ### Access Uqbar ```shell su - omm -gsql -d postgres -p 26000 +gsql -r ``` ## Uninstalling Uqbar Using PTK -> **Note**: Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. +During uninstallation, PTK will check whether the cluster is in the running status. A cluster in the running status cannot be uninstalled. You need to stop the cluster and then uninstall the cluster. -You can run the following command to uninstall the database. +> **Note**: +> Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +You can run the `ptk uninstall -n CLUSTER_NAME` command on the server where PTK is installed to uninstall a cluster. -Before uninstallation, PTK questions you in an interactive way to confirm the topology information of the cluster to be deleted, whether to delete the system user, and whether to delete the database data. Please confirm your answer to each question to avoid data loss due to incorrect operations. +To uninstall a cluster, you need to specify the cluster name, you can run the `ptk ls` command to query the cluster name. -Before uninstallation, if you confirm deletion of the data directory, PTK will delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. +During uninstallation, PTK will ask you whether to delete the cluster topology information, system user, and database data. -If uninstallation is successful, information similar to the following is displayed. - -```bash -[root@hostname]# ptk uninstall -n uqbar1 -============================= -global: - cluster_name: uqbar1 - user: omm - group: omm - app_dir: /opt/uqbar/app - data_dir: /opt/uqbar/data - log_dir: /opt/uqbar/log - tool_dir: /opt/uqbar/tool - tmp_dir: /opt/uqbar/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/uqbar/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/uqbar/app,/opt/uqbar/tool,/opt/uqbar/cm,/opt/uqbar/tmp,/opt/uqbar/data,/opt/uqbar/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**Please perform operations with cautions, avoiding data loss due to incorrect operations.** -> **Note**: You can specify a database cluster to be uninstalled by config.yaml or the cluster name. The prerequisite of specifying a database cluster by the cluster name is that you can find the cluster by running `ptk ls`. +> If you are sure to delete the data directory, PTK delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. ## Related Page diff --git a/product/en/docs-uqbar/v2.0/ptk-based-installation.md b/product/en/docs-uqbar/v2.0/ptk-based-installation.md index 898454f36934015ad52feafaccfd4061f8d3562e..d892bdc935a86c021045dcbc1777f44345cd294d 100644 --- a/product/en/docs-uqbar/v2.0/ptk-based-installation.md +++ b/product/en/docs-uqbar/v2.0/ptk-based-installation.md @@ -9,39 +9,56 @@ date: 2022-06-02 This document introduces how to install Uqbar using PTK. -PTK (Provisioning Toolkit) is a software installation, and operation and maintenance tool developed for Uqbar to facilitate the installation and deployment of the Uqbar database. +PTK (Provisioning Toolkit) is a software installation, and operation and maintenance tool developed for MogDB to facilitate the installation and deployment of the MogDB database, and also used for Uqbar. You can run the following command to check operating systems where Uqbar can be installed using PTK. ```bash [root@hostname]# ptk candidate os - id | os | tested version(s) ------+-------------------------------------+---------------------------- - 1 | CentOS 7 (x86_64) | 7.6.1810 (Core) - 2 | openEuler 20 (x86_64) | 20.03 LTS - 3 | openEuler 20 (arm64) | 20.03 LTS - 4 | openEuler 22 (x86_64) | 22.03 LTS - 5 | openEuler 22 (arm64) | 22.03 LTS - 6 | Kylin V10 (x86_64) | V10 (Tercel) - 7 | Kylin V10 (arm64) | V10 (Tercel) - 8 | UOS 20 A (x86_64) | 1002a/1020a/1050a - 9 | UOS 20 A (arm64) | 1050a (kongzi) - 10 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) - 11 | CentOS 8 (arm64) | 8.0.1905 (Core) - 12 | CentOS 8 (x86_64) | 8.0.1905 (Core) - 13 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) - 14 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) - 15 | EulerOS 2 (x86_64) | 2.0 (SP3) - 16 | EulerOS 2 (arm64) | 2.0 (SP3) - 18 | SLES 12SP5 (x86_64) | 12SP5 - 19 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) - 20 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) - 21 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) - 22 | NeoKylin V7 (x86_64) | V7Update6 - 23 | UOS 20 D/E (x86_64) | 1040d (fou) - 24 | UOS 20 D/E (arm64) | 1040d (fou) - - 25 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **Note**: @@ -51,11 +68,34 @@ You can run the following command to check operating systems where Uqbar can be ## Installation Preparation -For details about environment requirements and operating system configuration, see [Environment Requirement](https://docs.mogdb.io/en/mogdb/v3.1/environment-requirement) and [Operating System Configuration](https://docs.mogdb.io/en/mogdb/v3.1/os-configuration). +For details about environment requirements and operating system configuration, see [Environment Requirement](https://docs.mogdb.io/en/mogdb/v5.0/environment-requirement) and [Operating System Configuration](https://docs.mogdb.io/en/mogdb/v5.0/os-configuration). ## PTK Installation -For details, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). +The following introduces how to perform quick online installation. PTK supports online and offline installation. For details about offline installation, see [PTK Installation](https://docs.mogdb.io/en/ptk/latest/install). + +1. Run the following command to install PTK. + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + Information similar to the following is displayed (the information varies depending on the type of Shell for running PTK). + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. Run the source command or open a terminal to make PTK environment variables take effect. For example, use bash as an example. + + ```bash + source $HOME/.bashrc + ``` ## Installing Uqbar Using PTK @@ -100,14 +140,14 @@ db_servers: ssh_option: port: 22 user: root - password: [Enter the SSH login password] + password: [Enter the SSH login password, which should be encrypted by `ptk encrypt`.] - host: 192.168.0.2 db_port: 26000 role: standby ssh_option: port: 22 user: root - password: [Enter the SSH login password] + password: [Enter the SSH login password, which should be encrypted by `ptk encrypt`.] ``` ### Perform System Check on the Local Server @@ -118,79 +158,48 @@ ptk checkos -f config.yaml Make sure the check result includes `OK` or `Warning`. If `Abnormal` occurs, the users needs to modify system parameters based on logs. +If there is an `Abnormal` check result, PTK will automatically generate a `root_fix_***.sh` file, which can be used to quickly correct system parameters; if there is an `ExecuteError` check result, it represents a PTK execution failure, requiring the user to adjust the system environment based on the error message. + ### Install Uqbar PTK supports customization of the installation package and manual downloading of the installation package. For example, run the following command to install Uqbar using the installation package in the current directory. During the installation, you will be prompted to enter the initial password of the database user, and make sure that you take a note of the password. After automatic installation of Uqbar using PTK, the database instance will be started. ```shell -ptk install -f config.yaml --pkg ./Uqbar-1.1.0-openEuler-arm64.tar.gz +ptk install -f config.yaml --pkg ./Uqbar-2.0.0-Kylin-x86_64-all.tar.gz ``` After successful installation, you can check the instance information by running the `ptk ls`command. ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - uqbar1 | 172.16.0.127:26000 | omm | /opt/uqbar/data | Uqbar-1.1.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+----------+------------------------+----------------------------------+---------------------+---------- + uqbar1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/uqbar/data | Uqbar 2.0.0 (build xxxxxxxx) | 2023-11-30T16:29:46 | ``` ### Access Uqbar ```shell su - omm -gsql -d postgres -p 26000 +gsql -r ``` ## Uninstalling Uqbar Using PTK -> **Note**: Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. +During uninstallation, PTK will check whether the cluster is in the running status. A cluster in the running status cannot be uninstalled. You need to stop the cluster and then uninstall the cluster. -You can run the following command to uninstall the database. +> **Note**: +> Once a database is uninstalled, it cannot be recovered. Please execute operation with caution. -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +You can run the `ptk uninstall -n CLUSTER_NAME` command on the server where PTK is installed to uninstall a cluster. -Before uninstallation, PTK questions you in an interactive way to confirm the topology information of the cluster to be deleted, whether to delete the system user, and whether to delete the database data. Please confirm your answer to each question to avoid data loss due to incorrect operations. +To uninstall a cluster, you need to specify the cluster name, you can run the `ptk ls` command to query the cluster name. -Before uninstallation, if you confirm deletion of the data directory, PTK will delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. +During uninstallation, PTK will ask you whether to delete the cluster topology information, system user, and database data. -If uninstallation is successful, information similar to the following is displayed. - -```bash -[root@hostname]# ptk uninstall -n uqbar1 -============================= -global: - cluster_name: uqbar1 - user: omm - group: omm - app_dir: /opt/uqbar/app - data_dir: /opt/uqbar/data - log_dir: /opt/uqbar/log - tool_dir: /opt/uqbar/tool - tmp_dir: /opt/uqbar/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/uqbar/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/uqbar/app,/opt/uqbar/tool,/opt/uqbar/cm,/opt/uqbar/tmp,/opt/uqbar/data,/opt/uqbar/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**Please perform operations with cautions, avoiding data loss due to incorrect operations.** -> **Note**: You can specify a database cluster to be uninstalled by config.yaml or the cluster name. The prerequisite of specifying a database cluster by the cluster name is that you can find the cluster by running `ptk ls`. +> If you are sure to delete the data directory, PTK delete only the data directory and will not delete its parent directory. You need to manually delete the parent directory. ## Related Page diff --git a/product/zh/docs-mogdb/v3.0/installation-guide/ptk-based-installation.md b/product/zh/docs-mogdb/v3.0/installation-guide/ptk-based-installation.md index 0d9b7decf8fd692e0e3f805f6ae7d7772ba4fe23..43e608fab0f514a2f4c422bd3d5232453c87d9e3 100644 --- a/product/zh/docs-mogdb/v3.0/installation-guide/ptk-based-installation.md +++ b/product/zh/docs-mogdb/v3.0/installation-guide/ptk-based-installation.md @@ -15,30 +15,50 @@ PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装 ```bash [root@hostname ~]# ptk candidate os - software | version ------------+-------------------------------------- - OS | CentOS 7 (x86_64) - | CentOS 8 (arm64) - | CentOS 8 (x86_64) - | EulerOS 2 (arm64) - | EulerOS 2 (x86_64) - | Kylin V10 (arm64) - | Kylin V10 (x86_64) - | NeoKylin V7 (x86_64) - | Oracle Linux 7 (x86_64) - | Oracle Linux 8 (x86_64) - | Red Hat Enterprise Linux 7 (x86_64) - | Red Hat Enterprise Linux 8 (x86_64) - | Rocky Linux 7 (x86_64) - | Rocky Linux 8 (x86_64) - | SLES 12 (arm64) - | UOS 20 (arm64) - | UOS 20 (x86_64) - | Ubuntu 18 (x86_64) - | openEuler 20 (arm64) - | openEuler 20 (x86_64) - | openEuler 22 (arm64) - | openEuler 22 (x86_64) + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **注意**:PTK工具本身可以在多种操作系统中运行,支持Linux,macOS,Windows,但是由于 MogDB 目前仅支持在Linux 系统中运行,因此需确保要运行MogDB数据库的服务器为 Linux 操作系统。 @@ -49,7 +69,30 @@ PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装 ## 下载安装 PTK -有关PTK安装,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 +下面介绍PTK如何快速在线安装。PTK支持在线安装和离线安装。如需了解离线安装详情,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 + +1. 执行以下命令安装PTK: + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + 安装完成后会提示如下信息(根据运行PTK的 SHELL 类型不同,信息会有所差异) + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. 通过提示的 source 指令或打开一个新的终端窗口来使 PTK PATH 环境变量生效。以 bash 为例: + + ```bash + source $HOME/.bashrc + ``` ## 通过PTK安装MogDB @@ -132,67 +175,33 @@ ptk install -f config.yaml --pkg ./MogDB-3.0.1-openEuler-arm64.tar.gz ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-3.0.1 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 3.0.1 (build 86d963ad) | 2023-11-28T16:41:57 | ``` ### 访问数据库 ```shell su - omm -gsql -d postgres -p 26000 +gsql -r ``` ## 通过PTK卸载MogDB -> **注意**:数据库卸载后无法恢复,请谨慎操作。 +卸载时,PTK会检测集群是否处于运行状态,运行中是不允许被卸载的,需先将集群停止后再进行卸载操作。 -执行如下命令卸载数据库: +> 注意: 卸载是一个很严肃的行为,请操作卸载数据库集群之前,反复确认当前集群是否确实可以卸载! -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` - -在卸载前,PTK 会交互式的询问用户,以确认要删除的数据库信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失! +数据库集群的卸载仅需在 PTK 所在的服务器上执行 `ptk uninstall -n CLUSTER_NAME` 指令。 -在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,需用户手动清理父目录。 +执行卸载时需指定要卸载的集群名称,可以通过 `ptk ls` 来查看集群名称。 -卸载成功后,将提示如下信息: +在卸载中,PTK 会和用户确认卸载的内容,以确认要删除的集群拓扑信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。 -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失!** -> **注意**:使用配置文件来卸载的前提是配置文件还存在。使用集群名称来指定的前提是 `ptk ls` 可以正常查询到该集群。 +> 在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,**需用户手动清理父目录**。 ## 相关页面 diff --git a/product/zh/docs-mogdb/v3.0/quick-start/installation-on-a-single-node.md b/product/zh/docs-mogdb/v3.0/quick-start/installation-on-a-single-node.md index c1896f5219284207960f4304bfee5afbdba049aa..dba02244960b1bd94cd3c2feefcdbfdc4df9969c 100644 --- a/product/zh/docs-mogdb/v3.0/quick-start/installation-on-a-single-node.md +++ b/product/zh/docs-mogdb/v3.0/quick-start/installation-on-a-single-node.md @@ -9,36 +9,56 @@ date: 2022-06-02 本文介绍如何使用PTK安装 MogDB 数据库。 -PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署MogDB数据库。PTK支持安装MogDB的操作系统如下表所示。 +PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署MogDB数据库。 可执行如下命令查看PTK支持安装MogDB的操作系统。 ```bash [root@hostname ~]# ptk candidate os - software | version ------------+-------------------------------------- - OS | CentOS 7 (x86_64) - | CentOS 8 (arm64) - | CentOS 8 (x86_64) - | EulerOS 2 (arm64) - | EulerOS 2 (x86_64) - | Kylin V10 (arm64) - | Kylin V10 (x86_64) - | NeoKylin V7 (x86_64) - | Oracle Linux 7 (x86_64) - | Oracle Linux 8 (x86_64) - | Red Hat Enterprise Linux 7 (x86_64) - | Red Hat Enterprise Linux 8 (x86_64) - | Rocky Linux 7 (x86_64) - | Rocky Linux 8 (x86_64) - | SLES 12 (arm64) - | UOS 20 (arm64) - | UOS 20 (x86_64) - | Ubuntu 18 (x86_64) - | openEuler 20 (arm64) - | openEuler 20 (x86_64) - | openEuler 22 (arm64) - | openEuler 22 (x86_64) + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **注意**:PTK工具本身可以在多种操作系统中运行,支持Linux,macOS,Windows,但是由于 MogDB 目前仅支持在Linux 系统中运行,因此需确保要运行MogDB数据库的服务器为 Linux 操作系统。 @@ -107,7 +127,7 @@ ptk checkos -f config.yaml 确保输出的检查结果均为 `OK` 或者 `Warning` ,如果有 `Abnormal` 或 `ExecuteError`出现,需用户根据日志提示先修正系统参数。 -如果有 `Abnormal` 检查项,ptk 会自动生成一个 root_fix_***.sh 文件,可用于快速修正系统参数;如果有 `ExecuteError` 检查项,代表 ptk 执行失败,需要用户根据错误信息调整系统环境。 +如果有 `Abnormal` 检查项,ptk 会自动生成一个`root_fix_***.sh`文件,可用于快速修正系统参数;如果有 `ExecuteError` 检查项,代表 ptk 执行失败,需要用户根据错误信息调整系统环境。 ### 执行安装 @@ -127,67 +147,33 @@ ptk install -f config.yaml --pkg ./MogDB-3.0.1-openEuler-arm64.tar.gz ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-3.0.1 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 3.0.1 (build 86d963ad) | 2023-11-28T16:41:57 | ``` ### 访问数据库 ```shell su - omm -gsql -d postgres -p 26000 +gsql -r ``` ## 通过PTK卸载MogDB -> **注意**:数据库卸载后无法恢复,请谨慎操作。 +卸载时,PTK会检测集群是否处于运行状态,运行中是不允许被卸载的,需先将集群停止后再进行卸载操作。 -执行如下命令卸载数据库: +> 注意: 卸载是一个很严肃的行为,请操作卸载数据库集群之前,反复确认当前集群是否确实可以卸载! -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +数据库集群的卸载仅需在 PTK 所在的服务器上执行 `ptk uninstall -n CLUSTER_NAME` 指令。 -在卸载前,PTK 会交互式的询问用户,以确认要删除的数据库信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失! +执行卸载时需指定要卸载的集群名称,可以通过 `ptk ls` 来查看集群名称。 -在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,需用户手动清理父目录。 +在卸载中,PTK 会和用户确认卸载的内容,以确认要删除的集群拓扑信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。 - 卸载成功后,将提示如下信息: - -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失!** -> **注意**:使用配置文件来卸载的前提是配置文件还存在。使用集群名称来指定的前提是 `ptk ls` 可以正常查询到该集群。 +> 在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,**需用户手动清理父目录**。 ## 相关页面 diff --git a/product/zh/docs-mogdb/v5.0/installation-guide/ptk-based-installation.md b/product/zh/docs-mogdb/v5.0/installation-guide/ptk-based-installation.md index 1af837e5aafdf7520c4a996585425f9ea50899a1..a6c0bc4cd4aaf3add27be6157a6ecf6da8632323 100644 --- a/product/zh/docs-mogdb/v5.0/installation-guide/ptk-based-installation.md +++ b/product/zh/docs-mogdb/v5.0/installation-guide/ptk-based-installation.md @@ -15,50 +15,50 @@ PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装 ```bash [root@hostname ~]# ptk candidate os - ID | OS | Tested Version(s) | Fully Compatibility Tested - | | | (MogDB) -----------+----------------------------------------------+-------------------------------+----------------------------- - 1007010 | CentOS Linux 7 (Core) (x86_64) | 7.6.1810 (Core) | all versions - 1008010 | CentOS 8 (x86_64) | 8.0.1905 (Core) | - 1008020 | CentOS 8 (arm64) | 8.0.1905 (Core) | - 1120010 | openEuler 20 (x86_64) | 20.03 LTS | < 5.0.0 - 1120020 | openEuler 20 (arm64) | 20.03 LTS | < 5.0.0 - 1122010 | openEuler 22 (x86_64) | 22.03 LTS | - 1122020 | openEuler 22 (arm64) | 22.03 LTS | - 1210010 | Kylin V10 (x86_64) | V10 (Tercel) | all versions - 1210020 | Kylin V10 (arm64) | V10 (Tercel) | all versions - 1320010 | UOS 20 A (x86_64) | 1002a/1020a/1050a | - 1320020 | UOS 20 A (arm64) | 1050a (kongzi) | - 1420010 | UOS 20 D/E (x86_64) | 1040d (fou) | - 1420020 | UOS 20 D/E (arm64) | 1040d (fou) | - 1518010 | Ubuntu 18.04.6 LTS (x86_64) | 18.04.6 LTS (Bionic Beaver) | - 1518020 | Ubuntu 18.04.6 LTS (arm64) | 18.04.6 LTS (Bionic Beaver) | - 1520010 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) | - 1520020 | Ubuntu 20 LTS (arm64) | 20.04.5 LTS (Focal Fossa) | - 1522010 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) | - 1522020 | Ubuntu 22 LTS (arm64) | 22.04.1 LTS (Jammy Jellyfish) | - 1607010 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) | - 1608010 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) | - 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | 8.2 (Ootpa) | - 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | 9.0 (Plow) | - 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | 9.0 (Plow) | - 1702010 | EulerOS 2 (x86_64) | 2.0 (SP3) | - 1702020 | EulerOS 2 (arm64) | 2.0 (SP3) | - 1812010 | SLES 12SP5 (x86_64) | 12SP5 | - 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | 15-SP4 | - 1907010 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) | - 1908010 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) | - 2008010 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) | - 2107010 | NeoKylin V7 (x86_64) | V7Update6 | - 2222010 | FusionOS 22 (x86_64) | 22.0.2 | - 2222020 | FusionOS 22 (arm64) | 22.0.2 | - 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | 10 (buster) | - 2310020 | Debian GNU/Linux 10 (buster) (arm64) | 10 (buster) | - 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | 11 (bullseye) | - 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | 11 (bullseye) | - 2407010 | Anolis OS Linux 7 (x86_64) | 7.9 GA (kernel:RHCK) | - 2408010 | Anolis OS 8 (x86_64) | 8.6 GA (kernel:RHCK) | - 2408020 | Anolis OS 8 (arm64) | 8.6 GA (kernel:ANCK) | + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **注意**:PTK工具本身可以在多种操作系统中运行,支持Linux,macOS,Windows,但是由于 MogDB 目前仅支持在Linux 系统中运行,因此需确保要运行MogDB数据库的服务器为 Linux 操作系统。 @@ -69,7 +69,30 @@ PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装 ## 下载安装 PTK -有关PTK安装,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 +下面介绍PTK如何快速在线安装。PTK支持在线安装和离线安装。如需了解离线安装详情,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 + +1. 执行以下命令安装PTK: + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + 安装完成后会提示如下信息(根据运行PTK的 SHELL 类型不同,信息会有所差异) + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. 通过提示的 source 指令或打开一个新的终端窗口来使 PTK PATH 环境变量生效。以 bash 为例: + + ```bash + source $HOME/.bashrc + ``` ## 通过PTK安装MogDB @@ -145,16 +168,16 @@ ptk install -f config.yaml PTK 也支持自定义安装包,可以通过手工下载安装包,指定安装。例如执行以下命令,将使用当前目录下的该安装包进行数据库安装。 ```shell -ptk install -f config.yaml --pkg ./MogDB-5.0.0-Kylin-arm64-all.tar.gz +ptk install -f config.yaml --pkg ./MogDB-5.0.3-Kylin-x86_64-all.tar.gz ``` 安装成功后,可以通过 `ptk ls` 来查看安装的实例信息。 ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-5.0.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 5.0.3 (build 86d963ad) | 2023-11-28T16:41:57 | ``` ### 访问数据库 @@ -166,53 +189,19 @@ gsql -r ## 通过PTK卸载MogDB -> **注意**:数据库卸载后无法恢复,请谨慎操作。 +卸载时,PTK会检测集群是否处于运行状态,运行中是不允许被卸载的,需先将集群停止后再进行卸载操作。 -执行如下命令卸载数据库: +> 注意: 卸载是一个很严肃的行为,请操作卸载数据库集群之前,反复确认当前集群是否确实可以卸载! -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` - -在卸载前,PTK 会交互式的询问用户,以确认要删除的数据库信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失! +数据库集群的卸载仅需在 PTK 所在的服务器上执行 `ptk uninstall -n CLUSTER_NAME` 指令。 -在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,需用户手动清理父目录。 +执行卸载时需指定要卸载的集群名称,可以通过 `ptk ls` 来查看集群名称。 -卸载成功后,将提示如下信息: +在卸载中,PTK 会和用户确认卸载的内容,以确认要删除的集群拓扑信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。 -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失!** -> **注意**:使用配置文件来卸载的前提是配置文件还存在。使用集群名称来指定的前提是 `ptk ls` 可以正常查询到该集群。 +> 在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,**需用户手动清理父目录**。 ## 相关页面 diff --git a/product/zh/docs-mogdb/v5.0/quick-start/installation-on-a-single-node.md b/product/zh/docs-mogdb/v5.0/quick-start/installation-on-a-single-node.md index fee9b6221ffb033b52cb62735f4a60dd72986171..e1e22f6c717a4b4b65345e3e78da3ea739fa72f0 100644 --- a/product/zh/docs-mogdb/v5.0/quick-start/installation-on-a-single-node.md +++ b/product/zh/docs-mogdb/v5.0/quick-start/installation-on-a-single-node.md @@ -9,56 +9,56 @@ date: 2022-06-02 本文介绍如何使用PTK安装 MogDB 数据库。 -PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署MogDB数据库。PTK支持安装MogDB的操作系统如下表所示。 +PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署MogDB数据库。 可执行如下命令查看PTK支持安装MogDB的操作系统。 ```bash [root@hostname ~]# ptk candidate os - ID | OS | Tested Version(s) | Fully Compatibility Tested - | | | (MogDB) -----------+----------------------------------------------+-------------------------------+----------------------------- - 1007010 | CentOS Linux 7 (Core) (x86_64) | 7.6.1810 (Core) | all versions - 1008010 | CentOS 8 (x86_64) | 8.0.1905 (Core) | - 1008020 | CentOS 8 (arm64) | 8.0.1905 (Core) | - 1120010 | openEuler 20 (x86_64) | 20.03 LTS | < 5.0.0 - 1120020 | openEuler 20 (arm64) | 20.03 LTS | < 5.0.0 - 1122010 | openEuler 22 (x86_64) | 22.03 LTS | - 1122020 | openEuler 22 (arm64) | 22.03 LTS | - 1210010 | Kylin V10 (x86_64) | V10 (Tercel) | all versions - 1210020 | Kylin V10 (arm64) | V10 (Tercel) | all versions - 1320010 | UOS 20 A (x86_64) | 1002a/1020a/1050a | - 1320020 | UOS 20 A (arm64) | 1050a (kongzi) | - 1420010 | UOS 20 D/E (x86_64) | 1040d (fou) | - 1420020 | UOS 20 D/E (arm64) | 1040d (fou) | - 1518010 | Ubuntu 18.04.6 LTS (x86_64) | 18.04.6 LTS (Bionic Beaver) | - 1518020 | Ubuntu 18.04.6 LTS (arm64) | 18.04.6 LTS (Bionic Beaver) | - 1520010 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) | - 1520020 | Ubuntu 20 LTS (arm64) | 20.04.5 LTS (Focal Fossa) | - 1522010 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) | - 1522020 | Ubuntu 22 LTS (arm64) | 22.04.1 LTS (Jammy Jellyfish) | - 1607010 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) | - 1608010 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) | - 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | 8.2 (Ootpa) | - 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | 9.0 (Plow) | - 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | 9.0 (Plow) | - 1702010 | EulerOS 2 (x86_64) | 2.0 (SP3) | - 1702020 | EulerOS 2 (arm64) | 2.0 (SP3) | - 1812010 | SLES 12SP5 (x86_64) | 12SP5 | - 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | 15-SP4 | - 1907010 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) | - 1908010 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) | - 2008010 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) | - 2107010 | NeoKylin V7 (x86_64) | V7Update6 | - 2222010 | FusionOS 22 (x86_64) | 22.0.2 | - 2222020 | FusionOS 22 (arm64) | 22.0.2 | - 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | 10 (buster) | - 2310020 | Debian GNU/Linux 10 (buster) (arm64) | 10 (buster) | - 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | 11 (bullseye) | - 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | 11 (bullseye) | - 2407010 | Anolis OS Linux 7 (x86_64) | 7.9 GA (kernel:RHCK) | - 2408010 | Anolis OS 8 (x86_64) | 8.6 GA (kernel:RHCK) | - 2408020 | Anolis OS 8 (arm64) | 8.6 GA (kernel:ANCK) | + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **注意**:PTK工具本身可以在多种操作系统中运行,支持Linux,macOS,Windows,但是由于 MogDB 目前仅支持在Linux 系统中运行,因此需确保要运行MogDB数据库的服务器为 Linux 操作系统。 @@ -140,16 +140,16 @@ ptk install -f config.yaml PTK 也支持自定义安装包,可以通过手工下载安装包,指定安装。例如执行以下命令,将使用当前目录下的该安装包进行数据库安装。 ```shell -ptk install -f config.yaml --pkg ./MogDB-5.0.0-Kylin-arm64-all.tar.gz +ptk install -f config.yaml --pkg ./MogDB-5.0.3-Kylin-x86_64-all.tar.gz ``` 安装成功后,可以通过 `ptk ls` 来查看安装的实例信息。 ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-5.0.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 5.0.3 (build 86d963ad) | 2023-11-28T16:41:57 | ``` ### 访问数据库 @@ -161,53 +161,19 @@ gsql -r ## 通过PTK卸载MogDB -> **注意**:数据库卸载后无法恢复,请谨慎操作。 +卸载时,PTK会检测集群是否处于运行状态,运行中是不允许被卸载的,需先将集群停止后再进行卸载操作。 -执行如下命令卸载数据库: +> 注意: 卸载是一个很严肃的行为,请操作卸载数据库集群之前,反复确认当前集群是否确实可以卸载! -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +数据库集群的卸载仅需在 PTK 所在的服务器上执行 `ptk uninstall -n CLUSTER_NAME` 指令。 -在卸载前,PTK 会交互式的询问用户,以确认要删除的数据库信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失! +执行卸载时需指定要卸载的集群名称,可以通过 `ptk ls` 来查看集群名称。 -在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,需用户手动清理父目录。 +在卸载中,PTK 会和用户确认卸载的内容,以确认要删除的集群拓扑信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。 - 卸载成功后,将提示如下信息: - -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失!** -> **注意**:使用配置文件来卸载的前提是配置文件还存在。使用集群名称来指定的前提是 `ptk ls` 可以正常查询到该集群。 +> 在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,**需用户手动清理父目录**。 ## 相关页面 diff --git a/product/zh/docs-mogdb/v5.1/installation-guide/ptk-based-installation.md b/product/zh/docs-mogdb/v5.1/installation-guide/ptk-based-installation.md index 1c3434b828f68a04da7485e6fe47cd6eeff80785..d48019bf75d8011375bd74e6487535b9ecf614e6 100644 --- a/product/zh/docs-mogdb/v5.1/installation-guide/ptk-based-installation.md +++ b/product/zh/docs-mogdb/v5.1/installation-guide/ptk-based-installation.md @@ -15,50 +15,50 @@ PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装 ```bash [root@hostname ~]# ptk candidate os - ID | OS | Tested Version(s) | Fully Compatibility Tested - | | | (MogDB) -----------+----------------------------------------------+-------------------------------+----------------------------- - 1007010 | CentOS Linux 7 (Core) (x86_64) | 7.6.1810 (Core) | all versions - 1008010 | CentOS 8 (x86_64) | 8.0.1905 (Core) | - 1008020 | CentOS 8 (arm64) | 8.0.1905 (Core) | - 1120010 | openEuler 20 (x86_64) | 20.03 LTS | < 5.0.0 - 1120020 | openEuler 20 (arm64) | 20.03 LTS | < 5.0.0 - 1122010 | openEuler 22 (x86_64) | 22.03 LTS | - 1122020 | openEuler 22 (arm64) | 22.03 LTS | - 1210010 | Kylin V10 (x86_64) | V10 (Tercel) | all versions - 1210020 | Kylin V10 (arm64) | V10 (Tercel) | all versions - 1320010 | UOS 20 A (x86_64) | 1002a/1020a/1050a | - 1320020 | UOS 20 A (arm64) | 1050a (kongzi) | - 1420010 | UOS 20 D/E (x86_64) | 1040d (fou) | - 1420020 | UOS 20 D/E (arm64) | 1040d (fou) | - 1518010 | Ubuntu 18.04.6 LTS (x86_64) | 18.04.6 LTS (Bionic Beaver) | - 1518020 | Ubuntu 18.04.6 LTS (arm64) | 18.04.6 LTS (Bionic Beaver) | - 1520010 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) | - 1520020 | Ubuntu 20 LTS (arm64) | 20.04.5 LTS (Focal Fossa) | - 1522010 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) | - 1522020 | Ubuntu 22 LTS (arm64) | 22.04.1 LTS (Jammy Jellyfish) | - 1607010 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) | - 1608010 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) | - 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | 8.2 (Ootpa) | - 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | 9.0 (Plow) | - 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | 9.0 (Plow) | - 1702010 | EulerOS 2 (x86_64) | 2.0 (SP3) | - 1702020 | EulerOS 2 (arm64) | 2.0 (SP3) | - 1812010 | SLES 12SP5 (x86_64) | 12SP5 | - 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | 15-SP4 | - 1907010 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) | - 1908010 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) | - 2008010 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) | - 2107010 | NeoKylin V7 (x86_64) | V7Update6 | - 2222010 | FusionOS 22 (x86_64) | 22.0.2 | - 2222020 | FusionOS 22 (arm64) | 22.0.2 | - 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | 10 (buster) | - 2310020 | Debian GNU/Linux 10 (buster) (arm64) | 10 (buster) | - 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | 11 (bullseye) | - 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | 11 (bullseye) | - 2407010 | Anolis OS Linux 7 (x86_64) | 7.9 GA (kernel:RHCK) | - 2408010 | Anolis OS 8 (x86_64) | 8.6 GA (kernel:RHCK) | - 2408020 | Anolis OS 8 (arm64) | 8.6 GA (kernel:ANCK) | + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **注意**:PTK工具本身可以在多种操作系统中运行,支持Linux,macOS,Windows,但是由于 MogDB 目前仅支持在Linux 系统中运行,因此需确保要运行MogDB数据库的服务器为 Linux 操作系统。 @@ -69,7 +69,30 @@ PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装 ## 下载安装 PTK -有关PTK安装,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 +下面介绍PTK如何快速在线安装。PTK支持在线安装和离线安装。如需了解离线安装详情,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 + +1. 执行以下命令安装PTK: + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + 安装完成后会提示如下信息(根据运行PTK的 SHELL 类型不同,信息会有所差异) + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. 通过提示的 source 指令或打开一个新的终端窗口来使 PTK PATH 环境变量生效。以 bash 为例: + + ```bash + source $HOME/.bashrc + ``` ## 通过PTK安装MogDB @@ -152,9 +175,9 @@ ptk install -f config.yaml --pkg ./MogDB-5.1.0-Kylin-arm64-all.tar.gz ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-5.1.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 5.1.0 (build xxxxxxxx) | 2023-11-28T16:41:57 | ``` ### 访问数据库 @@ -166,53 +189,19 @@ gsql -r ## 通过PTK卸载MogDB -> **注意**:数据库卸载后无法恢复,请谨慎操作。 +卸载时,PTK会检测集群是否处于运行状态,运行中是不允许被卸载的,需先将集群停止后再进行卸载操作。 -执行如下命令卸载数据库: +> 注意: 卸载是一个很严肃的行为,请操作卸载数据库集群之前,反复确认当前集群是否确实可以卸载! -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` - -在卸载前,PTK 会交互式的询问用户,以确认要删除的数据库信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失! +数据库集群的卸载仅需在 PTK 所在的服务器上执行 `ptk uninstall -n CLUSTER_NAME` 指令。 -在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,需用户手动清理父目录。 +执行卸载时需指定要卸载的集群名称,可以通过 `ptk ls` 来查看集群名称。 -卸载成功后,将提示如下信息: +在卸载中,PTK 会和用户确认卸载的内容,以确认要删除的集群拓扑信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。 -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失!** -> **注意**:使用配置文件来卸载的前提是配置文件还存在。使用集群名称来指定的前提是 `ptk ls` 可以正常查询到该集群。 +> 在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,**需用户手动清理父目录**。 ## 相关页面 diff --git a/product/zh/docs-mogdb/v5.1/quick-start/installation-on-a-single-node.md b/product/zh/docs-mogdb/v5.1/quick-start/installation-on-a-single-node.md index fee9b6221ffb033b52cb62735f4a60dd72986171..e825d2d0eec0579ad646f54c750f5da144a68946 100644 --- a/product/zh/docs-mogdb/v5.1/quick-start/installation-on-a-single-node.md +++ b/product/zh/docs-mogdb/v5.1/quick-start/installation-on-a-single-node.md @@ -9,56 +9,56 @@ date: 2022-06-02 本文介绍如何使用PTK安装 MogDB 数据库。 -PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署MogDB数据库。PTK支持安装MogDB的操作系统如下表所示。 +PTK (Provisioning Toolkit)是一款针对 MogDB 数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署MogDB数据库。 可执行如下命令查看PTK支持安装MogDB的操作系统。 ```bash [root@hostname ~]# ptk candidate os - ID | OS | Tested Version(s) | Fully Compatibility Tested - | | | (MogDB) -----------+----------------------------------------------+-------------------------------+----------------------------- - 1007010 | CentOS Linux 7 (Core) (x86_64) | 7.6.1810 (Core) | all versions - 1008010 | CentOS 8 (x86_64) | 8.0.1905 (Core) | - 1008020 | CentOS 8 (arm64) | 8.0.1905 (Core) | - 1120010 | openEuler 20 (x86_64) | 20.03 LTS | < 5.0.0 - 1120020 | openEuler 20 (arm64) | 20.03 LTS | < 5.0.0 - 1122010 | openEuler 22 (x86_64) | 22.03 LTS | - 1122020 | openEuler 22 (arm64) | 22.03 LTS | - 1210010 | Kylin V10 (x86_64) | V10 (Tercel) | all versions - 1210020 | Kylin V10 (arm64) | V10 (Tercel) | all versions - 1320010 | UOS 20 A (x86_64) | 1002a/1020a/1050a | - 1320020 | UOS 20 A (arm64) | 1050a (kongzi) | - 1420010 | UOS 20 D/E (x86_64) | 1040d (fou) | - 1420020 | UOS 20 D/E (arm64) | 1040d (fou) | - 1518010 | Ubuntu 18.04.6 LTS (x86_64) | 18.04.6 LTS (Bionic Beaver) | - 1518020 | Ubuntu 18.04.6 LTS (arm64) | 18.04.6 LTS (Bionic Beaver) | - 1520010 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) | - 1520020 | Ubuntu 20 LTS (arm64) | 20.04.5 LTS (Focal Fossa) | - 1522010 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) | - 1522020 | Ubuntu 22 LTS (arm64) | 22.04.1 LTS (Jammy Jellyfish) | - 1607010 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) | - 1608010 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) | - 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | 8.2 (Ootpa) | - 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | 9.0 (Plow) | - 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | 9.0 (Plow) | - 1702010 | EulerOS 2 (x86_64) | 2.0 (SP3) | - 1702020 | EulerOS 2 (arm64) | 2.0 (SP3) | - 1812010 | SLES 12SP5 (x86_64) | 12SP5 | - 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | 15-SP4 | - 1907010 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) | - 1908010 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) | - 2008010 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) | - 2107010 | NeoKylin V7 (x86_64) | V7Update6 | - 2222010 | FusionOS 22 (x86_64) | 22.0.2 | - 2222020 | FusionOS 22 (arm64) | 22.0.2 | - 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | 10 (buster) | - 2310020 | Debian GNU/Linux 10 (buster) (arm64) | 10 (buster) | - 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | 11 (bullseye) | - 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | 11 (bullseye) | - 2407010 | Anolis OS Linux 7 (x86_64) | 7.9 GA (kernel:RHCK) | - 2408010 | Anolis OS 8 (x86_64) | 8.6 GA (kernel:RHCK) | - 2408020 | Anolis OS 8 (arm64) | 8.6 GA (kernel:ANCK) | + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **注意**:PTK工具本身可以在多种操作系统中运行,支持Linux,macOS,Windows,但是由于 MogDB 目前仅支持在Linux 系统中运行,因此需确保要运行MogDB数据库的服务器为 Linux 操作系统。 @@ -140,16 +140,16 @@ ptk install -f config.yaml PTK 也支持自定义安装包,可以通过手工下载安装包,指定安装。例如执行以下命令,将使用当前目录下的该安装包进行数据库安装。 ```shell -ptk install -f config.yaml --pkg ./MogDB-5.0.0-Kylin-arm64-all.tar.gz +ptk install -f config.yaml --pkg ./MogDB-5.1.0-Kylin-x86_64-all.tar.gz ``` 安装成功后,可以通过 `ptk ls` 来查看安装的实例信息。 ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - mogdb1 | 172.16.0.127:26000 | omm | /opt/mogdb/data | MogDB-5.0.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+--------+------------------------+----------------------------------+---------------------+---------- + mogdb1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/mogdb/data | MogDB 5.1.0 (build xxxxxxxx) | 2023-11-28T16:41:57 | ``` ### 访问数据库 @@ -161,53 +161,19 @@ gsql -r ## 通过PTK卸载MogDB -> **注意**:数据库卸载后无法恢复,请谨慎操作。 +卸载时,PTK会检测集群是否处于运行状态,运行中是不允许被卸载的,需先将集群停止后再进行卸载操作。 -执行如下命令卸载数据库: +> 注意: 卸载是一个很严肃的行为,请操作卸载数据库集群之前,反复确认当前集群是否确实可以卸载! -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +数据库集群的卸载仅需在 PTK 所在的服务器上执行 `ptk uninstall -n CLUSTER_NAME` 指令。 -在卸载前,PTK 会交互式的询问用户,以确认要删除的数据库信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失! +执行卸载时需指定要卸载的集群名称,可以通过 `ptk ls` 来查看集群名称。 -在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,需用户手动清理父目录。 +在卸载中,PTK 会和用户确认卸载的内容,以确认要删除的集群拓扑信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。 - 卸载成功后,将提示如下信息: - -```bash -[root@hostname]# ptk uninstall -n mogdb1 -============================= -global: - cluster_name: mogdb1 - user: omm - group: omm - app_dir: /opt/mogdb/app - data_dir: /opt/mogdb/data - log_dir: /opt/mogdb/log - tool_dir: /opt/mogdb/tool - tmp_dir: /opt/mogdb/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/mogdb/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/mogdb/app,/opt/mogdb/tool,/opt/mogdb/cm,/opt/mogdb/tmp,/opt/mogdb/data,/opt/mogdb/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失!** -> **注意**:使用配置文件来卸载的前提是配置文件还存在。使用集群名称来指定的前提是 `ptk ls` 可以正常查询到该集群。 +> 在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,**需用户手动清理父目录**。 ## 相关页面 diff --git a/product/zh/docs-uqbar/v1.1/ptk-based-installation.md b/product/zh/docs-uqbar/v1.1/ptk-based-installation.md index 008e227464f6666fed574d619da4e7c7f2dbafe6..d5fd2de87dda5318810c53d70650ab4ac85a90bb 100644 --- a/product/zh/docs-uqbar/v1.1/ptk-based-installation.md +++ b/product/zh/docs-uqbar/v1.1/ptk-based-installation.md @@ -7,40 +7,58 @@ date: 2022-06-02 # PTK方式安装 -本文介绍如何使用PTK安装 Uqbar 数据库。 +本文介绍如何使用PTK安装Uqbar数据库。 -PTK (Provisioning Toolkit)是一款针对 Uqbar 数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署 Uqbar 数据库。 +PTK (Provisioning Toolkit)是一款针对MogDB数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署MogDB数据库,同样也可用于安装部署Uqbar。 -可执行如下命令查看PTK支持安装 Uqbar 的操作系统。 +可执行如下命令查看PTK支持安装Uqbar的操作系统。 ```bash -[root@hostname]# ptk candidate os - id | os | tested version(s) ------+-------------------------------------+---------------------------- - 1 | CentOS 7 (x86_64) | 7.6.1810 (Core) - 2 | openEuler 20 (x86_64) | 20.03 LTS - 3 | openEuler 20 (arm64) | 20.03 LTS - 4 | openEuler 22 (x86_64) | 22.03 LTS - 5 | openEuler 22 (arm64) | 22.03 LTS - 6 | Kylin V10 (x86_64) | V10 (Tercel) - 7 | Kylin V10 (arm64) | V10 (Tercel) - 8 | UOS 20 A (x86_64) | 1002a/1020a/1050a - 9 | UOS 20 A (arm64) | 1050a (kongzi) - 10 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) - 11 | CentOS 8 (arm64) | 8.0.1905 (Core) - 12 | CentOS 8 (x86_64) | 8.0.1905 (Core) - 13 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) - 14 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) - 15 | EulerOS 2 (x86_64) | 2.0 (SP3) - 16 | EulerOS 2 (arm64) | 2.0 (SP3) - 18 | SLES 12SP5 (x86_64) | 12SP5 - 19 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) - 20 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) - 21 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) - 22 | NeoKylin V7 (x86_64) | V7Update6 - 23 | UOS 20 D/E (x86_64) | 1040d (fou) - 24 | UOS 20 D/E (arm64) | 1040d (fou) - 25 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) +[root@hostname ~]# ptk candidate os + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **注意**: @@ -50,11 +68,34 @@ PTK (Provisioning Toolkit)是一款针对 Uqbar 数据库开发的软件安装 ## 安装准备 -有关环境要求和操作系统配置详情,请参见MogDB的[环境要求](https://docs.mogdb.io/en/mogdb/v3.1/environment-requirement)和[操作系统配置](https://docs.mogdb.io/en/mogdb/v3.1/os-configuration)等相关章节。 +有关环境要求和操作系统配置详情,请参见MogDB的[环境要求](https://docs.mogdb.io/zh/mogdb/v5.0/environment-requirement)和[操作系统配置](https://docs.mogdb.io/zh/mogdb/v5.0/os-configuration)等相关章节。 ## 下载安装 PTK -有关PTK安装,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 +下面介绍PTK如何快速在线安装。PTK支持在线安装和离线安装。如需了解离线安装详情,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 + +1. 执行以下命令安装PTK: + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + 安装完成后会提示如下信息(根据运行PTK的 SHELL 类型不同,信息会有所差异) + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. 通过提示的 source 指令或打开一个新的终端窗口来使 PTK PATH 环境变量生效。以 bash 为例: + + ```bash + source $HOME/.bashrc + ``` ## 通过PTK安装Uqbar @@ -99,14 +140,14 @@ db_servers: ssh_option: port: 22 user: root - password: [此处填写SSH登录密码] + password: [此处填写SSH登录密码,密码需要通过 ptk encrypt 加密后填写] - host: 192.168.0.2 db_port: 26000 role: standby ssh_option: port: 22 user: root - password: [此处填写SSH登录密码] + password: [此处填写SSH登录密码,密码需要通过 ptk encrypt 加密后填写] ``` ### 检查本机系统 @@ -117,6 +158,8 @@ ptk checkos -f config.yaml 确保输出的检查结果均为 `OK` 或者 `Warning` ,如果有 `Abnormal` 或 `ExecuteError`出现,需用户根据日志提示先修正系统参数。 +如果有 `Abnormal` 检查项,ptk 会自动生成一个`root_fix_***.sh`文件,可通过 `sh root_fix_***.sh` 命令快速修正系统参数;如果有 `ExecuteError` 检查项,代表 ptk 执行失败,需要用户根据错误信息调整系统环境。 + ### 执行安装 PTK 支持自定义安装包,用户需要手工下载安装包,指定安装。例如执行以下命令,将使用当前目录下的该安装包进行数据库安装。安装过程中会提示用户输入数据库初始用户的密码,请用户自行记录并安全保存。PTK 自动完成所有安装操作后,会启动数据库实例。 @@ -129,67 +172,33 @@ ptk install -f config.yaml --pkg ./Uqbar-1.1.0-openEuler-arm64.tar.gz ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - uqbar1 | 172.16.0.127:26000 | omm | /opt/uqbar/data | Uqbar-1.1.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+----------+------------------------+----------------------------------+---------------------+---------- + uqbar1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/uqbar/data | Uqbar 1.1.0 (build fa071bfa) | 2023-11-30T16:29:46 | ``` ### 访问数据库 ```shell su - omm -gsql -d postgres -p 26000 +gsql -r ``` ## 通过PTK卸载Uqbar -> **注意**:数据库卸载后无法恢复,请谨慎操作。 +卸载时,PTK会检测集群是否处于运行状态,运行中是不允许被卸载的,需先将集群停止后再进行卸载操作。 -执行如下命令卸载数据库: +> 注意: 卸载是一个很严肃的行为,请操作卸载数据库集群之前,反复确认当前集群是否确实可以卸载! -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +数据库集群的卸载仅需在 PTK 所在的服务器上执行 `ptk uninstall -n CLUSTER_NAME` 指令。 -在卸载前,PTK 会交互式的询问用户,以确认要删除的数据库信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失! +执行卸载时需指定要卸载的集群名称,可以通过 `ptk ls` 来查看集群名称。 -在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,需用户手动清理父目录。 +在卸载中,PTK 会和用户确认卸载的内容,以确认要删除的集群拓扑信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。 -卸载成功后,将提示如下信息: - -```bash -[root@hostname]# ptk uninstall -n uqbar1 -============================= -global: - cluster_name: uqbar1 - user: omm - group: omm - app_dir: /opt/uqbar/app - data_dir: /opt/uqbar/data - log_dir: /opt/uqbar/log - tool_dir: /opt/uqbar/tool - tmp_dir: /opt/uqbar/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/uqbar/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/uqbar/app,/opt/uqbar/tool,/opt/uqbar/cm,/opt/uqbar/tmp,/opt/uqbar/data,/opt/uqbar/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失!** -> **注意**:使用配置文件来卸载的前提是配置文件还存在。使用集群名称来指定的前提是 `ptk ls` 可以正常查询到该集群。 +> 在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,**需用户手动清理父目录**。 ## 相关页面 diff --git a/product/zh/docs-uqbar/v2.0/ptk-based-installation.md b/product/zh/docs-uqbar/v2.0/ptk-based-installation.md index 008e227464f6666fed574d619da4e7c7f2dbafe6..804d90df4c44e21b16b19f376fbf9cfa557ac43d 100644 --- a/product/zh/docs-uqbar/v2.0/ptk-based-installation.md +++ b/product/zh/docs-uqbar/v2.0/ptk-based-installation.md @@ -7,40 +7,58 @@ date: 2022-06-02 # PTK方式安装 -本文介绍如何使用PTK安装 Uqbar 数据库。 +本文介绍如何使用PTK安装Uqbar数据库。 -PTK (Provisioning Toolkit)是一款针对 Uqbar 数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署 Uqbar 数据库。 +PTK (Provisioning Toolkit)是一款针对MogDB数据库开发的软件安装和运维工具,旨在帮助用户更便捷地安装部署MogDB数据库,同样也可用于安装部署Uqbar。 -可执行如下命令查看PTK支持安装 Uqbar 的操作系统。 +可执行如下命令查看PTK支持安装Uqbar的操作系统。 ```bash -[root@hostname]# ptk candidate os - id | os | tested version(s) ------+-------------------------------------+---------------------------- - 1 | CentOS 7 (x86_64) | 7.6.1810 (Core) - 2 | openEuler 20 (x86_64) | 20.03 LTS - 3 | openEuler 20 (arm64) | 20.03 LTS - 4 | openEuler 22 (x86_64) | 22.03 LTS - 5 | openEuler 22 (arm64) | 22.03 LTS - 6 | Kylin V10 (x86_64) | V10 (Tercel) - 7 | Kylin V10 (arm64) | V10 (Tercel) - 8 | UOS 20 A (x86_64) | 1002a/1020a/1050a - 9 | UOS 20 A (arm64) | 1050a (kongzi) - 10 | Ubuntu 20 (x86_64) | 20.04.3 LTS (Focal Fossa) - 11 | CentOS 8 (arm64) | 8.0.1905 (Core) - 12 | CentOS 8 (x86_64) | 8.0.1905 (Core) - 13 | Red Hat Enterprise Linux 7 (x86_64) | 7.5 (Maipo) - 14 | Red Hat Enterprise Linux 8 (x86_64) | 8.5 (Ootpa) - 15 | EulerOS 2 (x86_64) | 2.0 (SP3) - 16 | EulerOS 2 (arm64) | 2.0 (SP3) - 18 | SLES 12SP5 (x86_64) | 12SP5 - 19 | Oracle Linux 7 (x86_64) | 7.9 (Maipo) - 20 | Oracle Linux 8 (x86_64) | 8.6 (Ootpa) - 21 | Rocky Linux 8 (x86_64) | 8.5 (Green Obsidian) - 22 | NeoKylin V7 (x86_64) | V7Update6 - 23 | UOS 20 D/E (x86_64) | 1040d (fou) - 24 | UOS 20 D/E (arm64) | 1040d (fou) - 25 | Ubuntu 22 (x86_64) | 22.04 (Jammy Jellyfish) +[root@hostname ~]# ptk candidate os + ID | OS | Installation package | Deploy tested | Fully compatibility tested + | | | (OS Version) | (MogDB Version) +----------+----------------------------------------------+----------------------+----------------------+----------------------------- + 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions + 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 | + 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 | + 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 || > 5.0.1 + 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 | + 1122020 | openEuler 22 (arm64) | openEuler | 22.03 | + 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions + 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions + 1320010 | UOS 20 A (x86_64) | openEuler | 1050a | + 1320020 | UOS 20 A (arm64) | openEuler | 1050a | + 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e | + 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d | + 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 | + 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 | + 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 | + 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 | + 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 | + 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 | + 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) | + 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 | + 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 | + 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 | + 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 | + 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 | + 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 | + 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 | + 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 | + 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) | + 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) | + 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 | + 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 | + 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 | + 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 | + 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) | + 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) | + 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) | + 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) | + 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) | + 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) | + 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) | ``` > **注意**: @@ -50,11 +68,34 @@ PTK (Provisioning Toolkit)是一款针对 Uqbar 数据库开发的软件安装 ## 安装准备 -有关环境要求和操作系统配置详情,请参见MogDB的[环境要求](https://docs.mogdb.io/en/mogdb/v3.1/environment-requirement)和[操作系统配置](https://docs.mogdb.io/en/mogdb/v3.1/os-configuration)等相关章节。 +有关环境要求和操作系统配置详情,请参见MogDB的[环境要求](https://docs.mogdb.io/zh/mogdb/v5.0/environment-requirement)和[操作系统配置](https://docs.mogdb.io/zh/mogdb/v5.0/os-configuration)等相关章节。 ## 下载安装 PTK -有关PTK安装,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 +下面介绍PTK如何快速在线安装。PTK支持在线安装和离线安装。如需了解离线安装详情,请访问[安装PTK](https://docs.mogdb.io/zh/ptk/latest/install)。 + +1. 执行以下命令安装PTK: + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh + ``` + + 安装完成后会提示如下信息(根据运行PTK的 SHELL 类型不同,信息会有所差异) + + ```shell + info: downloading ptk package + Detected shell: bash + Shell profile: /root/.bashrc + ptk has been added to PATH in /root/.bashrc + open a new terminal or source /root/.bashrc to active it + Installed path: /root/.ptk/bin/ptk + ``` + +2. 通过提示的 source 指令或打开一个新的终端窗口来使 PTK PATH 环境变量生效。以 bash 为例: + + ```bash + source $HOME/.bashrc + ``` ## 通过PTK安装Uqbar @@ -99,14 +140,14 @@ db_servers: ssh_option: port: 22 user: root - password: [此处填写SSH登录密码] + password: [此处填写SSH登录密码,密码需要通过 ptk encrypt 加密后填写] - host: 192.168.0.2 db_port: 26000 role: standby ssh_option: port: 22 user: root - password: [此处填写SSH登录密码] + password: [此处填写SSH登录密码,密码需要通过 ptk encrypt 加密后填写] ``` ### 检查本机系统 @@ -117,79 +158,47 @@ ptk checkos -f config.yaml 确保输出的检查结果均为 `OK` 或者 `Warning` ,如果有 `Abnormal` 或 `ExecuteError`出现,需用户根据日志提示先修正系统参数。 +如果有 `Abnormal` 检查项,ptk 会自动生成一个`root_fix_***.sh`文件,可通过 `sh root_fix_***.sh` 命令快速修正系统参数;如果有 `ExecuteError` 检查项,代表 ptk 执行失败,需要用户根据错误信息调整系统环境。 + ### 执行安装 PTK 支持自定义安装包,用户需要手工下载安装包,指定安装。例如执行以下命令,将使用当前目录下的该安装包进行数据库安装。安装过程中会提示用户输入数据库初始用户的密码,请用户自行记录并安全保存。PTK 自动完成所有安装操作后,会启动数据库实例。 ```shell -ptk install -f config.yaml --pkg ./Uqbar-1.1.0-openEuler-arm64.tar.gz +ptk install -f config.yaml --pkg ./Uqbar-2.0.0-Kylin-x86_64-all.tar.gz ``` 安装成功后,也可以通过 `ptk ls` 来查看安装的实例信息。 ```bash [root@hostname]# ptk ls - cluster_name | instances | user | data_dir | db_version ----------------+--------------------+------+-----------------+-------------- - uqbar1 | 172.16.0.127:26000 | omm | /opt/uqbar/data | Uqbar-1.1.0 + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+------+--------------------+----------+------------------------+----------------------------------+---------------------+---------- + uqbar1 | 6001 | xxx.xx.x.xxx:26000 | omm | /opt/uqbar/data | Uqbar 2.0.0 (build xxxxxxxx) | 2023-11-30T16:29:46 | ``` ### 访问数据库 ```shell su - omm -gsql -d postgres -p 26000 +gsql -r ``` ## 通过PTK卸载Uqbar -> **注意**:数据库卸载后无法恢复,请谨慎操作。 +卸载时,PTK会检测集群是否处于运行状态,运行中是不允许被卸载的,需先将集群停止后再进行卸载操作。 -执行如下命令卸载数据库: +> 注意: 卸载是一个很严肃的行为,请操作卸载数据库集群之前,反复确认当前集群是否确实可以卸载! -```bash -ptk uninstall (-f CONFIG.YAML|--name CLUSTER_NAME) -``` +数据库集群的卸载仅需在 PTK 所在的服务器上执行 `ptk uninstall -n CLUSTER_NAME` 指令。 -在卸载前,PTK 会交互式的询问用户,以确认要删除的数据库信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失! +执行卸载时需指定要卸载的集群名称,可以通过 `ptk ls` 来查看集群名称。 -在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,需用户手动清理父目录。 +在卸载中,PTK 会和用户确认卸载的内容,以确认要删除的集群拓扑信息,确认是否要连带删除系统用户,以及确认是否要连带删除数据库数据。 -卸载成功后,将提示如下信息: - -```bash -[root@hostname]# ptk uninstall -n uqbar1 -============================= -global: - cluster_name: uqbar1 - user: omm - group: omm - app_dir: /opt/uqbar/app - data_dir: /opt/uqbar/data - log_dir: /opt/uqbar/log - tool_dir: /opt/uqbar/tool - tmp_dir: /opt/uqbar/tmp -db_servers: -- host: 172.16.0.127 - db_port: 26000 - role: primary - az_name: AZ1 - az_priority: 1 - -============================= -Do you really want to uninstall this cluster? Please confirm carefully[Y|Yes](default=N) y -Do you want to delete db data '/opt/uqbar/data'?[Y|Yes](default=N) y -Do you want to delete user 'omm'?[Y|Yes](default=N) y -INFO[2022-07-08T10:27:42.820] check db dirs owner host=172.16.0.127 -INFO[2022-07-08T10:27:42.828] clean crontab host=172.16.0.127 -INFO[2022-07-08T10:27:42.894] kill omm's processes host=172.16.0.127 -INFO[2022-07-08T10:27:42.970] remove files /opt/uqbar/app,/opt/uqbar/tool,/opt/uqbar/cm,/opt/uqbar/tmp,/opt/uqbar/data,/opt/uqbar/log host=172.16.0.127 -INFO[2022-07-08T10:27:43.073] delete os user omm host=172.16.0.127 -INFO[2022-07-08T10:27:43.213] clearing /etc/cron.allow host=172.16.0.127 -INFO[2022-07-08T10:27:43.217] clearing /etc/security/limits.conf host=172.16.0.127 -``` +**请在回答每一个问题时,确认你的回答,避免由于误操作导致不可恢复的数据丢失!** -> **注意**:使用配置文件来卸载的前提是配置文件还存在。使用集群名称来指定的前提是 `ptk ls` 可以正常查询到该集群。 +> 在 PTK 执行数据库卸载操作时,如果用户指定了删除数据目录,PTK 仅会删除数据目录,不会删除数据目录所在的父目录,**需用户手动清理父目录**。 ## 相关页面