This document describes the steps to quickly deploy YMatrix on a single node.
Note!
For deploying a multi-node cluster, refer to the Standard Cluster Deployment section.
Note!
Quick installation is only supported on operating systems such as CentOS 7 and RedHat 7. For Ubuntu 20.04 deployment instructions, click here. For CentOS 8 or RedHat 8 deployment instructions, click here.
Note!
For instructional videos, see YMatrix Installation and Deployment. If the host cannot access the Internet, refer to Offline Cluster Deployment.
Before installation, please download the YMatrix installer.
Server installation consists of two phases: preparation and database deployment. Optional post-installation configurations and basic database management commands are also covered.
Copy the RPM package from your local machine to the remote server:
~ scp <local path> <username>@<server IP address>:<server path>
Note!
From this step onward, all operations must be performed as the root user or with sudo privileges.
YMatrix requires Python 3.6. Install it and set it as the default version using the following commands:
$ sudo yum install centos-release-scl $ sudo yum install rh-python36 $ sudo scl enable rh-python36 bash
Disable the firewall:
$ sudo systemctl stop firewalld.service $ sudo systemctl disable firewalld.service
Disable SELinux. Edit /etc/selinux/config and set the value of SELINUX to disabled:
$ sudo sed s/^SELINUX=.*$/SELINUX=disabled/ -i /etc/selinux/config $ sudo setenforce 0
Ensure the installation node has a persistent hostname. If not, set one using the command below (example sets hostname to mdw):
$ sudo hostnamectl set-hostname mdw
Edit the /etc/hosts file. If you are using vim for the first time, install it with the sudo yum install vim command:
$ sudo vim /etc/hosts
Map the hostname to a local network interface address. After editing, press Esc, then type :wq to save and exit:
192.168.100.10 mdw
Note!
Do not duplicate the<IP address> <hostname>entry in/etc/hosts. Doing so may cause a "host network connectivity test failed" error during GUI initialization.
Install the database RPM package using the yum command as root or with sudo privileges. System dependencies will be installed automatically. By default, YMatrix installs to the /opt/ymatrix/matrixdb5 directory:
$ sudo yum install matrixdb5-5.0.0+enterprise_5.0.0-1.el7.x86_64.rpm
Note!
In practice, replace the filename with the latest downloaded RPM package name.
Upon successful installation, supervisord and MXUI processes start automatically. These background services provide the graphical interface and process management.
If you need to configure ports, modify the /etc/matrixdb5/defaults.conf file after installing the RPM. This configuration is required only on the master node.
$ vim /etc/matrixdb5/defaults.conf
YMatrix provides an easy-to-use deployment method via GUI or command line. Graphical deployment is recommended. Remote GUI access requires ports 8240 and 4617 to be open. The MXUI process provides the web interface.
Access the installation wizard via browser using the Master server's IP:
http://<IP>:8240/
On the first page, enter the superuser password. You can view it using the sudo more /etc/matrixdb5/auth.conf command:

The second page automatically selects "Single Node Deployment". Click Next.

Proceed with the following three steps for single-node deployment.
Step 1: Set instance count, storage path, and admin password. Click "Deploy Now".

Step 2: Deployment begins. Progress is displayed in real time.

Step 3: Completion. After successful deployment, click "Finish".

YMatrix also supports one-click command-line deployment. Run the following commands. The database starts automatically after completion:
source /opt/ymatrix/matrixdb5/greenplum_path.sh sudo env "PATH=$PATH" mxsetup
After deployment, the Cylinder process starts automatically. It triggers scheduled tasks at specified intervals.
SSH into the server and switch to the YMatrix administrator user mxadmin:
$ sudo su - mxadmin
By default, YMatrix allows remote connections. If "Allow remote connection to database" was not selected during installation, manually add a line like the following to the $MASTER_DATA_DIRECTORY/pg_hba.conf file to allow any IP to connect with password authentication to all databases. Adjust IP range or database names as needed to reduce security risks:
$ host all all 0.0.0.0/0 md5
To facilitate remote access and verify proper initialization, set a password for the mxadmin user (replace mxpass with your desired password):
$ psql -c "alter role mxadmin with password 'mxpass'" -h localhost -p 5432 mxdb
After making changes, reload the configuration by running:
pg_hba.conf
$ mxstop -u
``
SSH into the server and switch to the mxadmin user:
$ sudo su - mxadmin
Use the following commands to manage the database:
$ mxstart -a $ mxstop -af $ mxstop -arf $ mxstate -s
| Command | Purpose |
|---|---|
| mxstop -a | Stop the cluster. (Will hang if active sessions exist.) |
| mxstop -af | Forcefully stop the cluster. |
| mxstop -ar | Restart the cluster. Waits for currently executing SQL to finish. (Will hang if active sessions exist.) |
| mxstate -s | Check cluster status. |
YMatrix can be installed on low-spec hardware. Minimum requirements are:
| Minimum Requirements |
|---|
| 1 GHz dual-core CPU |
| 2 GB RAM |
| 2 GB disk space |
| RAID 1 (mirroring) |
If installing on a device with less than 2 GB RAM, create a swap space of at least 2 GB before installation.
Create and enable a 2 GB swap file: `` sudo dd if=/dev/zero of=/opt/swapfile count=2048 bs=1MiB sudo chmod 600 /opt/swapfile
sudo mkswap /opt/swapfile sudo swapon /opt/swapfile
swapon -s free -m ``
Add the following line to to make the swap persistent: `/etc/fstab` /opt/swapfile swap swap sw 0 0
YMatrix is compatible with PostgreSQL 12 protocol. Many commercial and open-source PostgreSQL 12 client tools (e.g., DBeaver, pgAdmin) can connect to YMatrix. You can easily access YMatrix remotely from laptops or personal computers. See Client Connection for details.
The YMatrix command-line tool psql can also be used remotely on Windows or Mac. Mac users can install via brew:
$ brew install libpq $ brew link --force libpq ail
Windows users, download the installer here.
After installing psql, use to specify the host and `-h` to specify the port when connecting to the YMatrix server. Common `psql` options include: `-p` $ psql -h [hostname or IP] -p [port] -U [username] -W -d [database name]
Example:
$ psql -h 127.0.0.1 -p 5432 -U mxadmin -W -d mxdb
Enjoy your experience!