### Docker daemon ExecStart with TLS Source: https://github.com/dromara/jpom/blob/master/modules/sub-plugin/docker-cli/README.md Example ExecStart line for the Docker systemd service file, including TLS options and TCP listening on port 2375. This is the full command used to start dockerd. ```bash ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --tlsverify --tlscacert=/home/docker/tls-ca/ca.pem --tlscert=/home/docker/tls-ca/server-cert.pem --tlskey=/home/docker/tls-ca/server-key.pem -H tcp://0.0.0.0:2375 ``` -------------------------------- ### Install Jpom Server with one-click script Source: https://github.com/dromara/jpom/blob/master/README-en.md One-click installation commands for the Jpom Server on Linux. The installation directory is the current directory where the command is executed, and the Server and Agent cannot be installed in the same directory. After successful startup, the server port is 2122 and the management page is accessible at http://127.0.0.1:2122/. ```shell # Default one-click installation curl -fsSL https://jpom.top/docs/install.sh | bash -s Server jdk+default # Default one-click installation and automatic startup service configuration curl -fsSL https://jpom.top/docs/install.sh | bash -s Server jdk+default+service # Install server and jdk environment yum install -y wget && \ wget -O install.sh https://jpom.top/docs/install.sh && \ bash install.sh Server jdk # Install server and jdk, maven environment yum install -y wget && \ wget -O install.sh https://jpom.top/docs/install.sh && \ bash install.sh Server jdk+mvn # ubuntu apt-get install -y wget && \ wget -O install.sh https://jpom.top/docs/install.sh && \ bash install.sh Server jdk ``` -------------------------------- ### Install JPOM server with host mounts (Alibaba Cloud) Source: https://github.com/dromara/jpom/blob/master/README-en.md Installs the JPOM server container using the Alibaba Cloud repository and mounts host directories for logs, data, and configuration. May have compatibility issues in some environments. ```shell docker pull registry.cn-chengdu.aliyuncs.com/jpomdocker/jpom mkdir -p /home/jpom-server/logs mkdir -p /home/jpom-server/data mkdir -p /home/jpom-server/conf docker run -d -p 2122:2122 \ --name jpom-server \ -v /home/jpom-server/logs:/usr/local/jpom-server/logs \ -v /home/jpom-server/data:/usr/local/jpom-server/data \ -v /home/jpom-server/conf:/usr/local/jpom-server/conf \ jpomdocker/jpom ``` -------------------------------- ### Docker Compose one-click start commands Source: https://github.com/dromara/jpom/blob/master/README-en.md Commands to clone the Jpom repository and start it with Docker Compose. Remember to modify the token value in the .env file. The commented lines show alternative build and cluster options. ```shell yum install -y git git clone https://gitee.com/dromara/Jpom.git cd Jpom docker-compose -f docker-compose.yml up # docker-compose -f docker-compose.yml up --build # docker-compose -f docker-compose.yml build --no-cache # docker-compose -f docker-compose-local.yml up # docker-compose -f docker-compose-local.yml build --build-arg TEMP_VERSION=.0 # docker-compose -f docker-compose-cluster.yml up --build ``` -------------------------------- ### Manage Jpom services with systemctl Source: https://github.com/dromara/jpom/blob/master/README-en.md Use these commands to control the jpom-server and jpom-agent services after installation with ./bin/Service.sh install. ```bash systemctl {status | start | stop | restart} jpom-server ``` ```bash systemctl {status | start | stop | restart} jpom-agent ``` -------------------------------- ### Install JPOM server with Docker volumes (Alibaba Cloud) Source: https://github.com/dromara/jpom/blob/master/README-en.md Installs the JPOM server container using the Alibaba Cloud repository and Docker volumes for data, logs, and configuration storage. ```shell docker pull registry.cn-chengdu.aliyuncs.com/jpomdocker/jpom docker volume create jpom-server-data docker volume create jpom-server-logs docker volume create jpom-server-conf docker run -d -p 2122:2122 \ --name jpom-server \ -v jpom-server-data:/usr/local/jpom-server/data \ -v jpom-server-logs:/usr/local/jpom-server/logs \ -v jpom-server-conf:/usr/local/jpom-server/conf \ jpomdocker/jpom ``` -------------------------------- ### Install JPOM server with host mounts (Docker Hub) Source: https://github.com/dromara/jpom/blob/master/README-en.md Installs the JPOM server container using the Docker Hub repository and mounts host directories for logs, data, and configuration. May have compatibility issues in some environments. ```shell docker pull jpomdocker/jpom mkdir -p /home/jpom-server/logs mkdir -p /home/jpom-server/data mkdir -p /home/jpom-server/conf docker run -d -p 2122:2122 \ --name jpom-server \ -v /home/jpom-server/logs:/usr/local/jpom-server/logs \ -v /home/jpom-server/data:/usr/local/jpom-server/data \ -v /home/jpom-server/conf:/usr/local/jpom-server/conf \ jpomdocker/jpom ``` -------------------------------- ### Install Jpom Agent with one-click script Source: https://github.com/dromara/jpom/blob/master/README-en.md One-click installation commands for the Jpom Agent on Linux. Do not execute the one-click installation command in the same directory for both the Server and Agent. After successful startup, the agent port is 2123, which is used by the server. ```shell # Default one-click installation curl -fsSL https://jpom.top/docs/install.sh | bash -s Agent jdk+default # Default one-click installation and auto-configure startup service curl -fsSL https://jpom.top/docs/install.sh | bash -s Agent jdk+default+service # Install agent and JDK environment yum install -y wget && \ wget -O install.sh https://jpom.top/docs/install.sh && \ bash install.sh Agent jdk # ubuntu apt-get install -y wget && \ wget -O install.sh https://jpom.top/docs/install.sh && \ bash install.sh Agent jdk ``` -------------------------------- ### Install JPOM server with Docker volumes (Docker Hub) Source: https://github.com/dromara/jpom/blob/master/README-en.md Installs the JPOM server container using the Docker Hub repository and Docker volumes for data, logs, and configuration storage. ```shell docker pull jpomdocker/jpom docker volume create jpom-server-data docker volume create jpom-server-logs docker volume create jpom-server-conf docker run -d -p 2122:2122 \ --name jpom-server \ -v jpom-server-data:/usr/local/jpom-server/data \ -v jpom-server-logs:/usr/local/jpom-server/logs \ -v jpom-server-conf:/usr/local/jpom-server/conf \ jpomdocker/jpom ``` -------------------------------- ### Run JPOM server container Source: https://github.com/dromara/jpom/blob/master/README-en.md One-command installation of the JPOM server container. Requires Docker to be installed first. The container exposes port 2122 and runs the jpomdocker/jpom image. ```shell docker run -p 2122:2122 --name jpom-server jpomdocker/jpom ``` -------------------------------- ### Run MariaDB container with Docker Source: https://github.com/dromara/jpom/blob/master/modules/storage-module/storage-module-mariadb/README.md Starts a MariaDB container named 'jpom-mariadb' with root password 'jpom123456' and maps host port 3309 to container port 3306. Use this to set up the database for the JPOM storage module. ```shell docker run -d --name jpom-mariadb -e MYSQL_ROOT_PASSWORD=jpom123456 -p 3309:3306 mariadb ``` -------------------------------- ### Run MySQL Docker container Source: https://github.com/dromara/jpom/blob/master/modules/storage-module/storage-module-mysql/README.md Starts a MySQL container named jpom-mysql-test with root password k@4Qoi6qdV#OYjQd and maps port 3306. ```shell docker run -itd --name jpom-mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=k@4Qoi6qdV#OYjQd mysql ``` -------------------------------- ### Run PostgreSQL container for JPom Source: https://github.com/dromara/jpom/blob/master/modules/storage-module/storage-module-postgresql/README.md Starts a PostgreSQL container named 'jpom-postgres' with user 'jpom', password 'jpom123456', database 'jpom', and maps port 5432. Use this to set up the database for JPom's PostgreSQL storage module. ```shell docker run --name jpom-postgres \ -e POSTGRES_USER=jpom \ -e POSTGRES_PASSWORD=jpom123456 \ -e POSTGRES_DB=jpom \ -p 5432:5432 -d postgres ``` -------------------------------- ### Windows BAT Script Commands for Jpom Server and Agent Source: https://github.com/dromara/jpom/blob/master/README-en.md Use these commands to manage the Jpom server and agent on Windows. The scripts support start, stop, restart, and status operations. Running the script without arguments opens a control panel. After starting, check the logs for status; if garbled text appears, verify the encoding (recommended GB2312). ```bash # Server management scripts (command line) ./bin/Server.bat start # Start the Jpom server ./bin/Server.bat stop # Stop the Jpom server ./bin/Server.bat restart # Restart the Jpom server ./bin/Server.bat status # Check the Jpom server status # Server management script (control panel), follow the panel prompts for operations ./bin/Server.bat # Agent management scripts ./bin/Agent.bat start # Start the Jpom agent ./bin/Agent.bat stop # Stop the Jpom agent ./bin/Agent.bat restart # Restart the Jpom agent ./bin/Agent.bat status # Check the Jpom agent status # Agent management script (control panel), follow the panel prompts for operations ./bin/Agent.bat ``` -------------------------------- ### Compile Node.js specific directory with yarn Source: https://github.com/dromara/jpom/blob/master/README-en.md Compile a specific directory in a Node.js project. Run install first, then build, using the --cwd flag to target the directory. ```bash yarn --cwd xxxx/ install yarn --cwd xxxx/ build ``` -------------------------------- ### Run socat to expose Docker socket on TCP port 2375 Source: https://github.com/dromara/jpom/blob/master/modules/sub-plugin/docker-cli/README.md Starts a socat container that forwards TCP port 2375 to the Docker Unix socket, enabling remote Docker API access. Requires Docker to be running and the socket mounted. ```bash docker run -it -d --name=socat -p 2375:2375 -v /var/run/docker.sock:/var/run/docker.sock bobrik/socat TCP4-LISTEN:2375,fork,reuseaddr UNIX-CONNECT:/var/run/docker.sock ``` -------------------------------- ### Allow port 2122 in firewall Source: https://github.com/dromara/jpom/blob/master/README-en.md Commands to allow port 2122 in the firewall and reload the firewall configuration. Use these if the Jpom management system is not accessible after installation and the firewall is active. ```bash # Allow port 2122 for the management system firewall-cmd --add-port=2122/tcp --permanent # Reload the firewall to take effect firewall-cmd --reload ``` -------------------------------- ### Linux SH Script Commands for Jpom Server and Agent Source: https://github.com/dromara/jpom/blob/master/README-en.md Use these commands to manage the Jpom server and agent on Linux. The scripts support start, stop, restart, and status operations. The Service.sh script creates a system service for the server (jpom-server) or agent (jpom-agent). ```bash # Server management scripts ./bin/Server.sh start # Start the Jpom server ./bin/Server.sh stop # Stop the Jpom server ./bin/Server.sh restart # Restart the Jpom server ./bin/Server.sh status # Check the Jpom server status ./bin/Service.sh install # Create a service for the Jpom server (jpom-server) # Agent management scripts ./bin/Agent.sh start # Start the Jpom agent ./bin/Agent.sh stop # Stop the Jpom agent ./bin/Agent.sh restart # Restart the Jpom agent ./bin/Agent.sh status # Check the Jpom agent status ./bin/Service.sh install # Create a service for the Jpom agent (jpom-agent) ``` -------------------------------- ### Docker daemon TLS options (multi-line) Source: https://github.com/dromara/jpom/blob/master/modules/sub-plugin/docker-cli/README.md Shows the TLS flags and host bindings to add to the Docker daemon startup command for secure remote access. Includes certificate paths and listening on TCP port 2375. ```bash --tlsverify \ --tlscacert=/home/docker-ca/ca.pem \ --tlscert=/home/docker-ca/server-cert.pem \ --tlskey=/home/docker-ca/server-key.pem \ -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 ``` -------------------------------- ### Stage, commit, and push changes Source: https://github.com/dromara/jpom/blob/master/README-en.md Add your changes to the staging area, commit them with a descriptive message, and push to your remote repository. Replace 'branch-name' with 'dev' or 'docs'. ```bash # Add your changes to the staging area git add . # Commit your changes with a descriptive message git commit -m 'Describe your changes' # Push to your remote repository, replacing branch-name with dev or docs git push origin branch-name ``` -------------------------------- ### Connect to MySQL as root Source: https://github.com/dromara/jpom/blob/master/modules/storage-module/storage-module-mysql/README.md Connects to the MySQL server as root using the password from the Docker run command. ```shell mysql -u root -p'k@4Qoi6qdV#OYjQd' ``` -------------------------------- ### Docker daemon TLS options (single-line) Source: https://github.com/dromara/jpom/blob/master/modules/sub-plugin/docker-cli/README.md Single-line version of the TLS flags and host bindings for the Docker daemon, equivalent to the multi-line version. ```bash --tlsverify --tlscacert=/home/docker-ca/ca.pem --tlscert=/home/docker-ca/server-cert.pem --tlskey=/home/docker-ca/server-key.pem -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 ``` -------------------------------- ### Clone the forked repository Source: https://github.com/dromara/jpom/blob/master/README-en.md Clone your forked Jpom repository to your local machine. Replace 'branch-name' with 'dev' for code contributions or 'docs' for documentation contributions, and 'username' with your Gitee username. ```bash git clone -b branch-name https://gitee.com/username/Jpom.git ``` -------------------------------- ### User request template placeholder Source: https://github.com/dromara/jpom/blob/master/modules/common/src/test/resources/baidubce_translate.txt Shows a template with a placeholder for a user request string. The actual request content is not provided. ```javascript const template = {REQUEST_STR} ``` -------------------------------- ### Compile Maven specific directory with mvn Source: https://github.com/dromara/jpom/blob/master/README-en.md Compile a specific Maven project by pointing to its pom.xml with the -f flag. Runs clean and package goals. ```bash mvn -f xxxx/pom.xml clean package ``` -------------------------------- ### Create jpom database Source: https://github.com/dromara/jpom/blob/master/modules/storage-module/storage-module-mysql/README.md Creates the jpom database with utf8mb4 character set if it does not already exist. ```sql create database if not exists jpom default character set utf8mb4; ``` -------------------------------- ### Check if port 2375 is listening Source: https://github.com/dromara/jpom/blob/master/modules/sub-plugin/docker-cli/README.md Uses lsof to verify that the socat process is listening on port 2375, confirming the Docker socket is exposed. ```bash lsof -i:2375 ``` -------------------------------- ### Reload systemd and restart Docker Source: https://github.com/dromara/jpom/blob/master/modules/sub-plugin/docker-cli/README.md Reloads the systemd daemon configuration and restarts the Docker service to apply changes made to the service file. ```bash systemctl daemon-reload && systemctl restart docker ``` -------------------------------- ### Check Docker service status Source: https://github.com/dromara/jpom/blob/master/modules/sub-plugin/docker-cli/README.md Displays the status of the Docker service to verify it is running correctly after restart. ```bash systemctl status docker.service ``` -------------------------------- ### Edit Docker service file Source: https://github.com/dromara/jpom/blob/master/modules/sub-plugin/docker-cli/README.md Opens the Docker systemd service file for editing, typically to add TLS options or change the daemon startup flags. ```bash vim /usr/lib/systemd/system/docker.service ``` -------------------------------- ### Define template object for key conversion Source: https://github.com/dromara/jpom/blob/master/modules/common/src/test/resources/baidubce_translate.txt Defines a JavaScript template object with placeholder keys and values. Comments instruct to replace keys with semantic camelCase variable names and avoid k1, k2, k3. ```javascript // 将下面json中的 根据`值`的含义将 `key` 转为语义化且简短的首字母为小写的小驼峰英文变量名替换无意义字符串 // 此处进行替换,禁止出现 k1 k2 k3 const template = { "key1": "string1", "key2": "string2", } ```