Hello everyone, welcome to watch the startup problem handling of Anqi CMS on Linux server
The processing method introduced below refers to the processing method on the Linux server, which is not applicable to Windows servers.
Question 1: Can't start, it prompts that the port is occupied
There are usually two situations at this time
Situation 1: There is a conflict with other security CMS website ports, which usually occurs when multiple security CMS are installed on the server.
At this time, you need to edit config.json and replace it with a new unused port
Enter the website root directory and edit config.json
Modify the port to 8002, or other unused ports
Save and exit
Re-execute the startup script
Situation 2: The program has been started, but it needs to be restarted, such as when Anqi CMS is upgraded
In this case, we need to check the port usage first, and the command used is
lsof -i:port number. For example, if the port is 8002, the command is lsof -i:8002
You can view the program ID that occupies the port, and then use the kill command to kill the process.
The kill command is used as kill -9 process ID. For example, if the process ID is 70049, the command is kill -9 70049
If multiple process IDs are detected, they can be killed together, and spaces are used to separate the process IDs.
In addition to viewing the process ID through the port number, you can also view the process ID by executing the file name.
Use the command to execute the file name of pidof. For example, if the execution file name is anqibin1, the command is pidof anqibin1
You can view the process ID in the execution of this executable file and use the same kill command to kill the process
If neither of the above two commands find out the process ID, it means that the program has not started, then the error may be caused by other reasons
Question 2: MySQL account password is incorrect
If you have migrated a website, such as moving from a locally tested website to a server, or migrating from an old server to a new server
Then there will be a problem that the MySQL account password is incorrect. At this time, you need to modify config.json to change to the correct MySQL account password.
Otherwise the program cannot start normally
Open config.json
Modify the user field
Modify password field
Modify the host field
If the database name is also modified, the database field must also be modified.
Save and exit
Re-execute the startup script
Question 3: Anqi CMS startup file cannot be found
This is usually the wrong installation package download
For example, the Windows computer downloaded the Linux installation package, so anqicms.exe cannot be found.
The installation package for windows was downloaded on the Linux server, and anqicms cannot be found
Or you have debugged the website on a Windows computer and need to upload it to a Linux server for use
In this case, you need to re-download the Linux version installation package and copy the anqicms file to use, and other files do not need to be changed.
Problem 4: Automatic detection scheduled tasks are not executed normally
The general situation is because the execution file name is not correctly formulated. For example, we changed the execution file name to anqibin2
In the start.sh script file, BINNAME or anqicms need to be changed to
There are two anqicms in the start.sh script file, both of which need to be changed to anqibin2
After the changes are correct, try to start