This document describes the steps to quickly deploy YMatrix on a single node.
Note!
To deploy 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 and RedHat 8 deployment instructions, click here.
Note!
For instructional video of this guide, 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 parts: 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 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 using vim for the first time, install it with sudo yum install vim:
$ sudo vim /etc/hosts
Map the hostname to a local network interface IP 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.2.0+enterprise_5.2.0-1.el7.x86_64.rpm
Note!
In actual deployment, 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 customize ports, modify the /etc/matrixdb5/defaults.conf file after RPM installation. This configuration is required only on the master node (Master).
$ vim /etc/matrixdb5/defaults.conf
YMatrix provides an easy-to-use GUI-based deployment method (recommended), along with a command-line option. Remote GUI deployment requires access to ports 8240 and 4617. The GUI service is provided by the MXUI process.
Access the web-based installation wizard using a browser. Replace <IP> with the Master server's IP address:
http://<IP>:8240/
On the first page of the installation wizard, 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 the number of instances, storage paths, and admin password. Then click Deploy.

Step 2: Deployment begins. The 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 deployment and is ready for use:
source /opt/ymatrix/matrixdb5/greenplum_path.sh
sudo env "PATH=$PATH" mxsetup
After deployment, the Cylinder process starts automatically. This process 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 users from any IP to connect via password authentication to all databases. Adjust the 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 these changes, reload the configuration using the following command:
$ mxstop -u
SSH into the server and switch to the YMatrix administrator user mxadmin:
$ 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 running SQL statements to complete. (Will hang if active sessions exist.) |
| mxstate -s | Display cluster status. |
YMatrix can be installed on low-spec hardware. Minimum requirements are:
| Minimum Configuration |
|---|
| 1GHz dual-core CPU |
| 2GB RAM |
| 2GB disk space |
| RAID 1 (mirroring) |
If installing on a device with less than 2GB RAM, create a swap space of at least 2GB before installation.
Create and enable a 2GB 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 /etc/fstab to make the swap persistent across reboots:
/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 systems. Mac users can install via brew:
$ brew install libpq
$ brew link --force libpq ail
Windows users, download the installer here.
After installing psql, use -h to specify the host and -p to specify the port when connecting to the YMatrix server. Common psql options include:
$ 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!