lnmp refers to installing Nginx+MySQL+php environment on Linux server.

The installation of lnmp can be done using one-click installation package:https://lnmp.org/, can also be installed and used one by one. The installation of lnmp will not be introduced here. By default, you have installed the lnmp environment.

Single site installation steps
Open the terminal, link to the server, and create a new file under the server wwwroot directory (please change according to your actual directory), such as anqitest

Download the latest anqicms installation package from the official website to the new file, unzip it, and name the anqicms file as anqibin1. Remember, the execution file name cannot be the same as the directory

Create a config.json file, specify the port, such as 8001

To the Nginx configuration file, add site information

Add a top-level domain to jump to www domain name configuration

Start anqicms

Set up automatic error detection and restart schedule

Multiple sites independently installed steps
The steps for independent installation of multiple sites and the steps for single site installation are roughly the same, but there are two things to pay attention to: one is that the port cannot be repeated, and the other is that the running file name cannot be repeated.

Create a new file in the server wwwroot directory (please change according to your actual directory), such as anqitest2

Unzip the installation package to anqitest2 folder and rename the anqicms file to anqibin2. Remember, the execution file name cannot be the same as the directory

Create a config.json file, specify the port, such as 8002

if ($host ~ '^anqitest.com'){
return 301http://www.anqitest.com/$request_uri;
}
To the Nginx configuration file, add site information

Add a top-level domain to jump to www domain name configuration

Start anqicms

Set up automatic error detection and restart schedule

Common error handling
Can't start, prompting that the port is occupied
Situation 1, usually the program has been started

In this case, we need to check the port condition first, and the command used is:
lsof -i:{port number}, for example, if the port is 8001, the command is lsof -i:8001. You can view the program ID that occupies the port and then use the kill command to kill the process
kill -9 {process ID}, if the process ID is 70049, the command is kill -9 70049. If multiple process IDs are detected, they can be killed separately, or separated by spaces, such as kill -9 70049 70050

You can also find the operation status by checking the execution file. The command is:
pidof {execution file name}. If the execution file name is anqibin1, the command is pidof anqibin1, and the process ID will be listed and the same kill command will be used to kill the process.

If the process ID is not found using the above two commands, it means that the program has not started, and the error may be caused by other reasons.

Situation 2: MySQL account password is incorrect

If the server is migrated or the database account password has changed, the database configuration file of anqicms needs to be changed accordingly, otherwise the program will not start normally.

Edit the config.json in the root directory, modify the database information corresponding to the mysql field, and then start it after changing it to the correct program.

Automatic detection scheduled tasks are not executed properly
Generally, it is caused by not specifying the execution file name correctly. You must carefully check the execution file name and change it.

Sitemap display is not normal
This is usually because https is enabled, but in the global settings of the background, the URL has not changed to https.