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

The installation of lnmp can be done using a one-click installer:https://lnmp.org/You can also install them individually. The installation of lnmp is not covered here. This tutorial assumes that you have already installed the lnmp environment.

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

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

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

Add site information to the Nginx configuration file

Add top-level domain redirection to www domain configuration

Start anqicms

Set up automatic error detection and restart plan

Independent installation steps for multiple sites
The independent installation steps of multiple sites are roughly the same as those of a single site, but there are two things to note: one is that the port cannot be duplicated, and the other is that the running file name cannot be duplicated

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

Unzip the package into the anqitest2 folder, rename the anqicms file to anqibin2, remember, the execution file name cannot be the same as the directory

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

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

Add top-level domain redirection to www domain configuration

Start anqicms

Set up automatic error detection and restart plan

common error handling
Cannot start,提示port is occupied
Scenario one, generally the program has already started

In this case, we need to check the port status first, the command to use is:
lsof -i:{port number}, for example, if the port is 8001, the command is lsof -i:8001, you can view the program ID occupying the port, and then use the kill command to terminate 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 running status by checking the executable file, the command is:
pidof {execute file name}, if the execute file name is anqibin1, then the command is pidof anqibin1, it will list the process ID, and use the same kill command to kill the process.

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

Scenario two, the MySQL account password is incorrect.

If the server is migrated or the database account password is changed, then the anqicms database configuration file needs to be changed accordingly, otherwise the program cannot start normally.

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

The task execution is not normal when automatically detected
Generally, this is caused by not specifying the execution filename correctly. Please carefully check and change the execution filename.

The Sitemap is not displaying correctly
It is usually because https has been enabled, but the URL has not been changed to https in the global settings of the background.