
ohpm-repo -v
If the version number (for example, 2.0.0) is displayed, the installation package is decompressed properly. If an error is reported, rectify the fault by referring to FAQs.
For Linux and macOS, you are advised to use Bash.
listen: <IP address of the host where ohpm-repo is deployed>:8088
db:
type: mysql
config:
host: "localhost"
port: 3306
username: "tctAdmin"
password: "password"
database: "repo" store:
type: sftp
config:
location:
-
name: test_one_sftp
host: "localhost"
port: 22
read_username: "read"
read_password: "password"
write_username: "write"
write_password: "password"
path: /source22
-
name: test_two_sftp
host: "localhost"
port: 24
read_username: "read"
read_password: "password"
write_username: "write"
write_password: "password"
path: /source24
#server: http://localhost:8088
1. The storage path of the ohpm-repo file is <Storage root directory configured for the SFTP server> +<Path configured in the store>. The value of path must be a relative path and must start with a slash (/). For example, if the storage root directory of the SFTP server is /user/sftp/data and the path configured in store is /source, the final storage path of the ohpm-repo file is /user/sftp/data/source.
2. When ohpm-repo is deployed in multi-instance mode, a reverse proxy server must be configured to forward client requests to multiple ohpm-repo instance servers. Therefore, store.config.server must be manually set to the domain name or IP address of the reverse proxy server and use_reverse_proxy must be set to true.
ohpm-repo install
If the --config parameter is not configured, the config.yaml configuration file in the conf directory under the ohpm-repo decompression directory is used by default.
If the installation is successful, the following information is displayed in the log:

Go to the bin directory where the ohpm-repo tool package is decompressed and run the following command to start ohpm-repo:
ohpm-repo start
If the startup is successful, the following information is displayed in the log:

Packaging and deployment commands are provided to help you deploy multiple instances more easily.
Run the ohpm-repo pack <deploy_root> command on the host where the multi-instance configuration is implemented and the ohpm-repo service instance is started for the first time.
ohpm-repo pack D:\ohpm-repo
This command is used to package and back up the <deploy_root>/conf and <deploy_root>/meta directories of ohpm-repo and generate compressed packages in the CLI working directory.
If the packaging is successful, the following information is displayed in the log:

Copy the package of the pack command to another computer. After decompression of the ohpm-repo tool package, run the ohpm-repo deploy <file_path> command to deploy a new instance.
ohpm-repo deploy D:\ohpm-repo\bin\pack_1695805599689.zip --deploy_root D:\new-ohpm-repo\ohpm-repo-deploy
If the deployment is successful, the following information is displayed in the log:

After the deployment is successful, run the ohpm-repo start command to start ohpm-repo.

Configure the automatic restart function for the ohpm-repo instance.
Before the configuration, add the bin directory of the ohpm-repo tool to the system environment variable path.
touch run-repo.sh
If the MySQL or SFTP service and ohpm-repo are deployed on the same server, place the commands for starting MySQL and SFTP before the ohpm-repo start command.
#!/bin/bash ohpm-repo start
chmod +x run-repo.sh
crontab -e
@reboot /bin/sh run-repo.sh >/dev/null 2>&1
run-repo.sh indicates the path of the script to be executed. >/dev/null 2>&1 indicates that the output is redirected to an empty device, that is, no information is output.
After the configuration, each time the system is started, the commands in the run-repo.sh script are automatically executed.
If the MySQL or SFTP service and ohpm-repo are deployed on the same server, place the commands for starting MySQL and SFTP before the ohpm-repo start command.
@echo off call ohpm-repo start exit

After the configuration, each time the system is started, the commands in the run-repo.bat script are automatically executed.