CATCAT
  • Quick Start
  • Introduction
  • Installation Guide (docker)
  • Installation Guide (VM)
  • Core Features
  • Daily Operations
  • Extensions
  • Deployment Modes
  • FAQ
  • Support
  • API Reference
  • Configuration
  • Performance
  • Security
  • Version 1
  • Version 2
  • English
  • 简体中文
  • Quick Start
  • Introduction
  • Installation Guide (docker)
  • Installation Guide (VM)
  • Core Features
  • Daily Operations
  • Extensions
  • Deployment Modes
  • FAQ
  • Support
  • API Reference
  • Configuration
  • Performance
  • Security
  • Version 1
  • Version 2
  • English
  • 简体中文
  • Guide

    • Introduction
    • Quick Start
    • Installation Guide (docker)
    • Installation Guide (VM)
    • Core Features
    • Daily Operations
    • Extensions
    • Deployment Modes
    • FAQ
    • Support

Installation Guide (VM)

This guide will assist you in installing CAT Next Generation, supporting both Virtual Machines (VM) and container environments with JDK 17+ and MySQL 8+.

1. Prerequisites

Before proceeding with the installation, ensure your system meets the following requirements:

  • Java Development Kit (JDK) 17 or higher: CAT requires JDK 17 or newer.
  • MySQL 8 or higher: This will be used for storing application data.
  • Docker (optional): Required if you choose to run CAT in containers.
  • Docker Compose (optional): Required if you choose to manage the deployment using Docker Compose.

2. Installation Steps

Option 1: Installation on a Virtual Machine (VM)

2.1 Install JDK 17+

  1. Download the JDK from the official website or use your system's package manager.

    For example, on Ubuntu:

    sudo apt update
    sudo apt install openjdk-17-jdk -y
    
  2. Verify the installation:

    java -version
    

2.2 Install MySQL 8+

  1. Install MySQL using your system's package manager or download it from the official website.

    For example, on Ubuntu:

    sudo apt update
    sudo apt install mysql-server -y
    
  2. Start the MySQL service:

    sudo systemctl start mysql
    
  3. Secure your MySQL installation:

    sudo mysql_secure_installation
    
  4. Log into MySQL:

    mysql -u root -p
    
  5. Create a database for CAT:

    CREATE DATABASE cat;
    CREATE USER 'cat_user'@'localhost' IDENTIFIED BY 'cat_password';
    GRANT ALL PRIVILEGES ON cat.* TO 'cat_user'@'localhost';
    FLUSH PRIVILEGES;
    

2.3 Install CAT

  1. Download the latest CAT release from the official repository.

  2. Extract the downloaded archive and navigate to the CAT directory.

  3. Run CAT:

    java -jar cat.jar
    

Option 2: Installation Using Docker

2.1 Install Docker

If Docker is not installed, follow these steps:

sudo apt update
sudo apt install docker.io -y
sudo systemctl start docker
sudo systemctl enable docker

2.2 Install Docker Compose

If Docker Compose is not installed, you can install it with the following command:

sudo apt update
sudo apt install docker-compose -y

2.3 Create Docker Compose Configuration

  1. Create a docker-compose.yml file in your project directory with the following content:
version: '3'
services:
  mysql:
    image: mysql:8
    container_name: cat-mysql
    environment:
      MYSQL_ROOT_PASSWORD: rootpassword
      MYSQL_DATABASE: cat
      MYSQL_USER: cat_user
      MYSQL_PASSWORD: cat_password
    ports:
      - "3306:3306"
    volumes:
      - mysql-data:/var/lib/mysql
    networks:
      - cat-network

  cat-server:
    build: .
    container_name: cat-server
    ports:
      - "8080:8080"
    environment:
      JAVA_OPTS: "-Xms512m -Xmx1024m"
    depends_on:
      - mysql
    networks:
      - cat-network

volumes:
  mysql-data:

networks:
  cat-network:

2.4 Create a Dockerfile for CAT

In the same directory, create a Dockerfile for building the CAT service Docker image:

FROM eclipse-temurin:17-jre

WORKDIR /app
COPY cat-home/target/cat.jar /app/cat.jar
EXPOSE 8080
CMD ["java", "-jar", "/app/cat.jar"]

2.5 Start CAT Using Docker Compose

  1. In the directory containing your docker-compose.yml, run the following command to start CAT and MySQL:
docker-compose up -d
  1. To view logs and ensure the services are running smoothly, use:
docker-compose logs -f

3. Conclusion

You have successfully installed CAT Next Generation in either a Virtual Machine (VM) or a containerized environment. Follow the steps to initialize the database and access the CAT management console for monitoring and observability.

Help us improve this page!
Last Updated:
Contributors: Frankie Wu
Prev
Installation Guide (docker)
Next
Core Features