How can AnQiCMS be stopped and restarted correctly after changing the configuration (such as the port)?

Calendar 👁️ 63

As an experienced website operation expert, I am willing to give you a detailed explanation of how to perform the correct shutdown and restart operations after configuration changes (especially port changes) in AnQiCMS.This is not only the key link in daily maintenance, but also the foundation to ensure the stable and efficient operation of the website.


The robust restart path after AnQiCMS configuration change

When using AnQiCMS for website operation and management, we often encounter scenarios where we need to adjust the system settings, such as modifying the running port of AnQiCMS for security considerations or multi-site deployment requirements.After modifying the configuration of AnQiCMS, especially parameters such as port, the system will not immediately recognize these changes and apply them automatically.At this time, a standardized and thorough shutdown and restart process is essential for the new configuration to take effect.

To understand this process, we first need to clarify how AnQiCMS obtains its runtime configuration. In the deployment directory of AnQiCMS, there is usually a file namedconfig.jsonThe core configuration file, which carries many system-level parameters including the port number. When we change theconfig.jsonofportparameters (such as from the default 8001is modified to8002After that, the AnQiCMS service process must be completely terminated before it can be restarted with the new configuration.If the old service process cannot be stopped correctly, the new configuration will not take effect, and it may even cause the new service to fail to start due to port conflicts.

Stop AnQiCMS service: Ensure graceful exit of old processes

Stop the AnQiCMS service is the first step in the restart process and is also a crucial step.A "clean" stop operation can avoid potential problems such as data corruption, resource occupation conflicts, and so on.According to the AnQiCMS deployment environment, the shutdown method will be different:

1. On Linux server (via startup script or manual operation):

In many Linux deployment environments, to facilitate the management of AnQiCMS, we usually set up a set ofstart.shandstop.shscripts, andcrontabschedule tasks to monitor and manage the start and stop of services.

  • Usestop.shScript stopped:If your AnQiCMS is deployed in the recommended way and configuredstop.shScript, then just execute the script in the AnQiCMS installation directory.This script usually searches for the PID (Process ID) of the running AnQiCMS process and then sends a termination signal to stop it.
    
    ./stop.sh
    
  • Manually search and terminate the process:If notstop.shScript, or the script failed to stop the process successfully (for example, due to a zombie process), you can manually locate and terminate it.
    1. Uselsof -i:{端口号}Command to find the process occupying a specified port. For example, if the old port is 8001, you would enter:
      
      lsof -i:8001
      
      This command will display the process information occupying port 8001, including its PID.
    2. After obtaining the PID, usekill -9 {PID}Command to force the termination of the process. For example, if the found PID is 12345:
      
      kill -9 12345
      
      This ensures that the AnQiCMS service occupying the old port is completely closed.

2. On Windows system (for testing or local development):

For users testing or developing locally on Windows, AnQiCMS is usually run as an executable file (anqicms.exe). The method to stop it is relatively simple:

  • Use Task Manager:Open Windows Task Manager (you can use the Ctrl+Shift+Esc shortcut), switch to the "Processes" or "Details" tab. Find the process namedanqicms.exeProcess, select it, and then click the "End Task" button. This will force close the AnQiCMS service.

3. In Baota, 1Panel, aaPanel and other panel environments:

If you have deployed AnQiCMS in visual management tools such as Baota Panel, 1Panel, or aaPanel, these panels usually provide an intuitive interface for managing Docker containers or Go projects.

  • Operate through the panel UI:Enter the corresponding panel management interface, find your AnQiCMS deployment item (which may be a Docker container, Go project, or other general project), and there will be a clear "stop" button or similar operation on the panel.Click to stop the service, the panel will automatically handle the termination of the underlying processes.

Start AnQiCMS service: Load new configuration and resume operation

After successfully stopping the old service, we can start AnQiCMS and let it load and apply the new configuration.

1. On Linux server (via startup script or manual operation):

  • Usestart.shScript start:Similarly, if your deployment environment is configuredstart.shScript, run it in the AnQiCMS installation directory. This script will usually check if the AnQiCMS process is running, and if not, it will usenohupThe command starts the AnQiCMS main program in the background and redirects the output to the log file.
    
    ./start.sh
    
  • Manual start:If you choose to start manually, you can directly execute the main program of AnQiCMS, which is usually namedanqicmsan executable file. To run it in the background and log the output, you can usenohupCommand:
    
    nohup ./anqicms >> running.log 2>&1 &
    
    make sure you have updated theconfig.jsonport parameters to the new value.

2. On Windows system:

  • Double-click the executable file:In the Windows environment, simply double-click the AnQiCMS installation directory under:anqicms.exeFile. The program will start in the background and loadconfig.jsonThe latest configuration in.

3. In Baota, 1Panel, aaPanel and other panel environments:

  • Operate through the panel UI:In the corresponding panel management interface, find the AnQiCMS deployment item, click the "Start" button or similar function.The panel will restart the AnQiCMS service according to the configuration, at which point it will read the new configuration (including the port you have changed).

Verify that the new configuration is effective

After the service starts, be sure to perform verification to ensure that the new configuration (such as the port) has been successfully applied:

  1. Access the new URL:In the browser, try to access your AnQiCMS website using a new port

Related articles

How to check if the `stop.sh` script of AnQiCMS has sufficient execution permissions?

As an experienced website operations expert, I know that a stable-running website cannot do without proper management of the background scripts.AnQiCMS thanks to its high efficiency and security features, is deeply loved by our operation staff.In routine maintenance, whether it is for version upgrades, configuration adjustments, or simple restart operations, we may need to use the system's built-in `stop.sh` and `start.sh` scripts.However, a seemingly simple operation may be hindered by a minor permission issue.

2025-11-06

Does stopping the AnQiCMS service affect the access to the back-end management interface?

Hello, as a senior website operations expert, I know that every technical detail may affect the stability and management efficiency of the website.Today, we will delve deeply into a core issue about AnQiCMS service: Will stopping the AnQiCMS service affect the access to the back-end management interface?The answer is affirmative: **Stopping the AnQiCMS service will directly result in the inability to access your website's front-end and back-end management interfaces.

2025-11-06

What are the steps to stop the AnQiCMS container in 1Panel or aaPanel?

Certainly, as an experienced website operation expert, I am happy to provide a detailed explanation of the steps to properly stop the AnQiCMS container operation in popular server management panels like 1Panel or aaPanel. --- ## Graceful shutdown: Practical guide to stopping AnQiCMS container in 1Panel or aaPanel In daily website operation, we often need to maintain, upgrade, or troubleshoot services.

2025-11-06

Does the Docker deployed AnQiCMS container lose its data after stopping?

## Docker deployment of AnQiCMS, will the data really be lost after stopping?—Website Operation Expert Deeply Deciphers for You Hello everyone, I am your veteran website operation elder.In the digital wave, an efficient content management system (CMS) is the cornerstone of website operation, and Docker, with its lightweight and portable features, is gradually becoming the preferred solution for deploying various applications.AnQiCMS as an enterprise-level content management system developed based on the Go programming language, has won the favor of many users with its efficient and customizable features.

2025-11-06

Is there a special consideration for stopping the AnQiCMS project when the server memory is insufficient?

As an experienced website operations expert, I fully understand the importance of server resource health status for the stable operation of the website.When the server's memory indicator light turns red, it often means that the system is at the edge of sub-health or even danger.For a content management system like AnQiCMS, choosing to stop the project in such an emergency situation indeed involves some special considerations that are worth in-depth discussion.

2025-11-06

How to back up data for AnQiCMS project before stopping or deleting it to prevent any unexpected situations?

## The Completion of a Task, Data as the Foundation: Data Backup Strategy Before the Suspension or Deletion of the AnQiCMS Project As an experienced website operations expert, I am well aware that every content management system carries not only text and images but also the digital assets of corporate brand image, marketing wisdom, and even core business logic. For a familiar enterprise-level content management system like AnQiCMS, which is known for its efficiency, security, and customization based on the Go language, the value of the data it manages is self-evident

2025-11-06

How to identify the PID of AnQiCMS process to manually stop or monitor?

As an expert who has been deeply engaged in website operation for many years, I am well aware that AnQiCMS, with its genetic code of Go language, performs excellently in terms of performance and security.However, even the most stable systems are bound to encounter scenarios that require manual intervention, whether it be for troubleshooting, resource optimization, or dealing with emergencies.At this time, accurately identifying and managing the PID (Process ID, process identifier) of the running AnQiCMS process is particularly crucial.Mastering this skill will enable you to handle complex problems with ease.

2025-11-06

What are the special guidelines when upgrading AnQiCMS from version V2.x to V3.x and stopping the old project?

As an experienced website operation expert, I have a deep understanding of the upgrade path from V2.x to V3.x of AnQiCMS and the operation considerations behind it.This version upgrade is not only an iteration of features, but also an optimization and modernization transformation of the underlying architecture.Faced with the discontinuation of the old version of the project, we are not simply taking it offline, but need a comprehensive and natural strategy to ensure the continuity of business and the integrity of data.The V3.x version of AnQiCMS, a high-performance architecture based on Go language, simplifies deployment

2025-11-06