- Overview
- Quick Start
- Install PTK
- Usage
- Configuration
- Config Samples
- Commands
- ptk
- ptk completion
- ptk register
- ptk init-cluster
- ptk collect
- ptk rec-guc
- ptk cache
- ptk gen-ptkc
- ptk manage
- ptk demo
- ptk meta
- ptk version
- ptk self
- ptk gen-om-xml
- ptk env
- ptk gen-static-config
- ptk cluster
- ptk cluster rename
- ptk cluster throwout
- ptk cluster takeover
- ptk cluster uninstall-cm
- ptk cluster install-cm
- ptk cluster gen-cert-files
- ptk cluster load-cm-vip
- ptk cluster del-kerberos-auth
- ptk cluster add-kerberos-auth
- ptk cluster uninstall-kerberos-server
- ptk cluster install-kerberos-server
- ptk cluster is-in-upgrade
- ptk cluster upgrade-rollback
- ptk cluster upgrade-commit
- ptk cluster upgrade
- ptk cluster demote
- ptk cluster promote
- ptk cluster refresh
- ptk cluster shell
- ptk cluster modify-comment
- ptk cluster show-config
- ptk cluster set-guc
- ptk cluster show-guc
- ptk cluster set-hba
- ptk cluster show-hba
- ptk cluster scale-out
- ptk cluster scale-in
- ptk cluster uninstall-mogha
- ptk cluster install-mogha
- ptk cluster list-plugins
- ptk cluster install-plugin
- ptk cluster inspect
- ptk cluster failover
- ptk cluster switchover
- ptk cluster build
- ptk cluster status
- ptk cluster restart
- ptk cluster stop
- ptk cluster start
- ptk uninstall
- ptk ls
- ptk install
- ptk exec
- ptk template
- ptk encrypt
- ptk checkos
- ptk download
- ptk candidate
- Troubleshooting
- FAQ
- Release Note
- GPTK - Graphical Deployment Tool
- Community
- Appendix: YAML Syntax
ptk demo Quickens Deployment of the Single-Server Verification Environment
ptk demo
allows you to quickly deploy a single-server MogDB database with related components installed without the need of a configuration file.
The database installed using ptk demo
can be operated using other PTK commands.
Objectives
- A quick installation method is provided to get access to a single-server MogDB cluster conveniently.
- The A compatibility mode is provided, requiring zero learning cost for Oracle users.
- The PG compatibility mode is provided, requiring zero learning cost for PostgreSQL users.
Prerequisites
ptk demo applies to only the Linux operating system currently.
Before executing ptk demo
, make sure that port 26000 is available. If you use other ports, use --port
to specify a port.
Deployment Command
ptk demo [--port PORT]
MogDB Version
The default version is LTS.
Plugins
For a database of the oracle_compatibility
mode, the following plugsin will be installed:
Installation Demonstration
Summary After Installation
Deploy Status:
cluste_name | host | user | port | status | message
--------------+-----------------+------+-------+---------------+----------
demo_SWW | 192.168.122.104 | demo | 26000 | start_success | success
Deployment status information:
- cluster_name: cluster name
- host: IP address of an instance
- user: system user
- port: port
- status: deployment status
- message: status description
Database Detail:
item | value
--------------+-------------------------
db_password | Demo&SWW
base_dir | /home/demo/demodb
app_dir | /home/demo/demodb/app
data_dir | /home/demo/demodb/data
tool_dir | /home/demo/demodb/tool
tmp_dir | /home/demo/demodb/tmp
Database information:
- db_password: initial password of a database
- base_dir: installation directory of a database
- app_dir: app directory of a database
- data_dir: data directory of a database
- tool_dir: tool directory of a database
- tmp_dir: temporary file directory of a database
Mode Compatibility:
mode | database | plugins | other
-------+------------------------+-----------------------+-------------------------------------
PG | postgres_compatibility | none |
A | oracle_compatibility | whale[success] |
| | orafce[success] |
| | compat_tools[success] |
| | mogila[success] | db user: mogdb, password: Demo&SWW
Plugin Install Details:
mode | plugin | status | reference | error
-------+--------------+---------+-------------------------------------------------------+--------
A | whale | success | https://docs.mogdb.io/zh/mogdb/v3.0/whale |
| orafce | success | https://docs.mogdb.io/zh/mogdb/v3.0/orafce-user-guide |
| compat_tools | success | https://gitee.com/enmotech/compat-tools |
| mogila | success | https://gitee.com/enmotech/mogila |
Compatibility database information:
- mode: compatibility mode
- database: database name
- plugins: plugin list of a database
- other: comment
Database Connection
If the PTK user is installed in root, switch to the database user, and run gsql
to connect the database.
If the database is installed as the common user, the database will be installed as the same user as the PTK. Therefore, you need to re-login to activate the environment variable or perform source ~/.bashrc
to make the environment variable to take effect, and then run gsql
to connect the database.
$ gsql -r
gsql ((MogDB 3.0.4 build cc068866) compiled at 2023-03-03 17:46:59 commit 0 last mr )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.
MogDB=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges | Compatibility
------------------------+-------+----------+---------+-------+-------------------+---------------
oracle_compatibility | demo | UTF8 | C | C | | A
postgres | demo | UTF8 | C | C | | A
postgres_compatibility | demo | UTF8 | C | C | | PG
template0 | demo | UTF8 | C | C | =c/demo +| A
| | | | | demo=CTc/demo |
template1 | demo | UTF8 | C | C | =c/demo +| A
| | | | | demo=CTc/demo |
(5 rows)