Jianghu Panel - Common Script Tools

12006

1. Understanding Jianghu Panel Commands

The Jianghu Panel provides a series of script tools for system operations and maintenance, which can be invoked in the command line using the jh command.

The jh command serves as the entry point for control commands of the Jianghu Panel:

![Jianghu Panel - jh Command.png](/doc/doc/upload/articleMaterial/12609/Jianghu Panel - jh Command.png)

By entering 22, you can invoke the Jianghu Panel script tools:

![Jianghu Panel - Panel Script Tools.png](/doc/doc/upload/articleMaterial/12609/Jianghu Panel - Panel Script Tools.png)

    1. Initialize Environment: Modify the virtual machine's configuration, allocate a fixed IP for the virtual machine, configure SSH login permissions, and install the Jianghu Panel.
    1. Generate SSH Key: Generate SSH keys for functionalities requiring SSH connections, such as connecting to Github/Gitea and Rsync file synchronization.
    1. Server Migration: Used to generate data migration packages when relocating servers.
    1. Server Repair: Provides functionalities for repairing database files, renewing abnormal SSL certificate orders, and recreating MySQL users and passwords.
    1. Server Expansion: Expands the server's hard disk capacity, performs partition table rewriting, modifies swap partitions, and enlarges file systems.
    1. Server Organization: Used to move user-uploaded data directories upload from various projects into the /www/wwwstorage directory and create corresponding symbolic links.
    1. Server Backup and Recovery: Can export or import the structure and data of specified databases, commonly used for migrating individual databases.
    1. Server Status Check: A status monitoring tool that can perform process usage analysis, disk IO usage analysis, disk IO testing, MySQL database checksum analysis, and more.
    1. Server Switching: Used to generate scripts for switching the original server and the new server online and offline after server migration.

2. Case Study: Generating SSH Key for Github

![Jianghu Panel - Generate Github Key.png](/doc/doc/upload/articleMaterial/12609/Jianghu Panel - Generate Github Key.png)

3. Case Study: Repairing Abnormal SSL Certificate Renewal Orders

![Jianghu Panel - Repair SSL Orders.png](/doc/doc/upload/articleMaterial/12609/Jianghu Panel - Repair SSL Orders.png)

4. Case Study: Process Usage Analysis

![Jianghu Panel - Process Usage Analysis.png](/doc/doc/upload/articleMaterial/12609/Jianghu Panel - Process Usage Analysis.png)

5. Case Study: MySQL Database Checksum Analysis

  1. Inquire about database connection information (default is local).
  2. Ask "Do you need to print the checksum details to a file? (default y) [y/n]".
  3. Prompt "Calculating checksum...".
  4. After calculation, display the total sum of checksum values.
  5. If printing to a file is checked, save the checksum values of each table in each database to checksum_result.txt.
  6. Prompt "Do you need to compare other checksum values? (default n) [y/n]".
  7. If the answer is y, prompt "Please enter the checksum value to compare:" After input, compare the two values; if they are equal, prompt "Checksum check results are consistent."