This guide provides detailed instructions for installing MatrixOne on Linux and MacOS.
MatrixOne supports multiple installation methods:
- Using mo_ctl Tool - Recommended for quick deployment
- Building from Source - For development and customization
- Using Docker - For containerized deployment
mo_ctl is the official command-line tool for deploying, installing, and managing MatrixOne.
Install Dependencies:
- MySQL Client (version 8.0.30 or later recommended)
- Download from MySQL Community Downloads
- Configure MySQL client environment variables
Step 1: Install mo_ctl tool
wget https://raw.githubusercontent.com/matrixorigin/mo_ctl_standalone/main/deploy/local/install.sh && sudo -u $(whoami) bash +x ./install.shStep 2: Configure deployment mode
Choose between Git (source) or Docker deployment:
# Option A: Deploy from source
mo_ctl set_conf MO_PATH="yourpath" # Set custom MatrixOne download path
mo_ctl set_conf MO_DEPLOY_MODE=git # Set deployment method to git
# Option B: Deploy with Docker
mo_ctl set_conf MO_CONTAINER_DATA_HOST_PATH="/yourpath/mo/" # Set data directory
mo_ctl set_conf MO_DEPLOY_MODE=docker # Set deployment method to dockerStep 3: Deploy MatrixOne
# Deploy latest development version (main branch)
mo_ctl deploy main
# Or deploy specific stable version
mo_ctl deploy v1.2.0 # Replace with desired versionStep 4: Start MatrixOne
mo_ctl startNote: Initial startup takes approximately 20-30 seconds.
Step 5: Connect to MatrixOne
mo_ctl connectmo_ctl status # Check MatrixOne status
mo_ctl stop # Stop MatrixOne
mo_ctl restart # Restart MatrixOne
mo_ctl upgrade # Upgrade to latest version
mo_ctl uninstall # Uninstall MatrixOneFor complete usage, see mo_ctl Tool Documentation.
Build MatrixOne from source for development or customization.
1. Install Go (version 1.27.1 or later required)
Follow the official Go installation guide.
2. Install GCC/Clang
Follow the official GCC installation guide.
3. Install Git
Install via the official Git documentation.
4. Install MySQL Client
Download from MySQL Community Downloads and configure environment variables.
5. Install CMake (required by USearch)
Install via the official CMake documentation.
Step 1: Clone repository
git clone https://github.com/matrixorigin/matrixone.git
cd matrixoneStep 2: Prepare Dependencies
make configStep 3: Build MatrixOne
make buildStep 4: Launch MatrixOne
./mo-service -launch ./etc/launch/launch.tomlStep 5: Connect using MySQL client
mysql -h 127.0.0.1 -P 6001 -u root -p
# Default password: 111Quick deployment using Docker containers.
1. Install Docker
- Download from Docker official website
- Recommended version: 20.10.18 or later
- Maintain consistency between Docker client and server versions
2. Install MySQL Client
Download from MySQL Community Downloads (version 8.0.30+ recommended).
Step 1: Pull and run MatrixOne
docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:latestStep 2: Connect to MatrixOne
mysql -h 127.0.0.1 -P 6001 -u root -p111For production deployment with persistent storage:
version: '3'
services:
matrixone:
image: matrixorigin/matrixone:latest
container_name: matrixone
ports:
- "6001:6001"
volumes:
- ./data:/var/lib/matrixone
restart: unless-stoppedAfter installation, consider the following:
-
Change Default Password
-
⚠️ Configure Performance (Important)Default cache size is too small for production workloads. For better query performance, adjust the memory cache configuration:
Edit your configuration file (
launch.tomlorcn.toml):[fileservice.cache] memory-capacity = "8GB" # Adjust based on available memory
Recommended settings:
- Development: 2-4GB
- Production: 8-32GB (depending on workload and available RAM)
-
Install Python SDK
pip install matrixone-python-sdk
-
Verify Installation
mysql -h 127.0.0.1 -P 6001 -u root -p111 -e "SELECT VERSION()"
Slow query performance? The default cache size (512MB) is likely too small.
Solution: Increase memory cache in your configuration file:
[fileservice.cache]
memory-capacity = "8GB" # Or higher based on your needsRestart MatrixOne after configuration changes.
📖 Performance Configuration Guide →
- Verify MatrixOne is running:
mo_ctl status(if using mo_ctl) - Check port 6001 is not in use:
lsof -i :6001 - Review logs:
mo_ctl watchdog(if using mo_ctl)
- Ensure Go version 1.27.1 or later is installed:
go version - Verify GCC is available:
gcc --version - Check disk space and memory availability
For more help, visit: