How to install AnQiCMS's Go project on a Linux server?

Calendar 👁️ 62

As a website operator familiar with AnQiCMS, I am well aware of the importance of an efficient, stable, and easy-to-manage content system for website operations.AnQiCMS is a modern enterprise-level content management system developed based on the Go language, with its high concurrency, high security, easy deployment, and excellent SEO-friendly features, it has become an ideal choice for many small and medium-sized enterprises and content operation teams.This article will detail how to install and deploy AnQiCMS's Go project on a Linux server, aiming to help you smoothly set up your own website.

Introduction and environment preparation of AnQiCMS

AnQiCMS is positioned to provide services for small and medium-sized enterprises, self-media operators, and multi-site managers.It is developed in Go language, which endows the system with excellent performance and stability, making it capable of effectively handling high concurrency access.Moreover, AnQiCMS is built with multi-site management, flexible content models, multilingual support, and a series of advanced SEO tools, aimed at improving content management efficiency and the search engine performance of websites.

Before starting the installation, please make sure your Linux server is ready.AnQiCMS supports Ubuntu, Centos, Red Hat, Debian, and other Linux distributions based on the X86 architecture.The core dependencies include a MySQL database (recommended version 5.6.35 or higher) and a web server (such as Nginx or Apache) for reverse proxying.Ensure that these basic environments are correctly installed and running, which will lay a solid foundation for the smooth deployment of AnQiCMS.

Method one: Deploy quickly through Baota panel (recommended)

The Baota panel provides a graphical interface for Linux server management, greatly simplifying the deployment process of AnQiCMS.It is recommended that your Baota panel version be 7.9.3 or higher to get more convenient deployment support for Go projects.

First, you need to create a new directory in Baota panel to store AnQiCMS files. Usually, this will be/www/wwwroot/Name it under your domain (for example/www/wwwroot/anqicms.com)。Then, download the latest Linux installation package from the AnQiCMS official website (usuallyanqicms-linux-v3.x.x.zip),and upload it to the directory you just created. After uploading, right-click the installation package in the Baota panel's file management interface and select extract to the current directory.

It is very straightforward to deploy AnQiCMS as a Go project for Potain Panel 7.9.3 and above.Select "Website/www/wwwroot/anqicms.com/anqicms),Project name can be filled in with "AnQiCMS", the default port is8001(If multiple AnQiCMS are deployed on the same server, please allocate different ports), run the command again to fill in the project execution file path, user selection runningwwwCheck the 'Boot up' option, then bind your domain and click submit.

If your Baota panel is an old version, it does not support the direct deployment of Go projects, you can select 'Other Projects' in the 'Website' menu, click 'Add General Project', and the configuration items are basically consistent with the above Go project deployment.

After completing the project deployment, visit the domain you have bound in the browser.AnQiCMS will guide you to the initial installation interface, where you need to configure MySQL database information, set the background administrator account password, and confirm the website address.Please make sure to check the account permissions and password correctness of the database, and set a sufficiently complex administrator password to ensure security.

Install multiple AnQiCMS sites on a server

AnQiCMS supports multi-site management and does not require copying multiple copies of code for each site, which greatly saves resources. If you need to deploy multiple AnQiCMS sites on a single server, you can follow the steps below:

First, add a "PHP project" in the Baota panel, fill in your new site domain, keep the root directory default, and record it.FTP and database are not created, PHP version is selected as 'Static', then submit.

Next, log in to the admin interface of the AnQiCMS site you have installed by default.Find the "Multi-site Management/app/Adding the domain name replaced by underscores, for example/app/dev_anqicms_comTo ensure data is stored independently), enter the complete URL of the new site and set the administrator account and password for the new site.The database name should be a new, unused database. If you have installed using the root account, you can choose to 'Reuse default database account information', AnQiCMS will create a new database for you.After selecting the appropriate template for the new site, click "OK" to complete the creation.

Go back to the Baota panel, find the newly created PHP project, click "Settings". In the "Website Directory", change the running directory to/publicSave it. Then configure the pseudo-static rules. For Nginx, enter the following rules in the 'Pseudo-static' menu and save:

location @AnqiCMS {
    proxy_pass https://en.anqicms.com; # 注意:这里的端口应是您Go项目主服务的端口
    proxy_set_header   Host             $host;
    proxy_set_header   X-Real-IP        $remote_addr;
    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
}
error_page 404 =200  @AnqiCMS;
location / {
   try_files $uri $uri/index.html @AnqiCMS;
}

If you are using Apache, leave the pseudo-static column blank, select "reverse proxy", and fill in the target URLhttps://en.anqicms.com. After completing these steps, the new site can be accessed through its domain and managed independently.

Method two: Deploy manually through the command line.

For users who do not have the Baota panel or prefer manual configuration, AnQiCMS also supports deployment through the command line. This guide uses the LNMP environment as an example.

First, download the Linux version package from the AnQiCMS official website and upload it to your server (for example/www/wwwroot/anqicms.comdirectory). Usetar -xzvf anqicms-linux-v3.x.x.zipCommand to unzip the installation package and enter the directory after extraction.

To ensure that the AnQiCMS service can automatically run after the server restarts and continue to monitor its running status, you need to add a scheduled task. Executecrontab -eCommand to edit the cron job and add a line:

*/1 * * * * /www/wwwroot/anqicms.com/start.sh

Save and exit. This command will make the system check and start the AnQiCMS service every minute. Make sure/www/wwwroot/anqicms.com/start.shThe path correctly points to the extraction directorystart.shExecute manually once./start.shTo start the service immediately.

Next, configure Nginx as the reverse proxy for AnQiCMS. You need to configure the Nginx site'srootdirectory to the AnQiCMS installation directory.publicSubdirectory, and set up reverse proxy to forward traffic to the default port of AnQiCMS8001The following is an example of a complete Nginx configuration:

server
{
    listen       80;
    server_name your_domain.com; # 替换为您的域名
    root /www/wwwroot/anqicms.com/public; # 替换为您的AnQiCMS public目录

    location @AnqiCMS {
        proxy_pass https://en.anqicms.com;
        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
    }
    error_page 404 =200  @AnQiCMS;
    location / {
       try_files $uri $uri/index.html @AnQiCMS;
    }
    access_log /var/log/nginx/your_domain.com.access.log; # 自定义日志路径
}

After the configuration is complete, restart the Nginx service to make the configuration effective.

When manually deploying multiple sites, you just need to repeat the above Nginx site configuration steps to configure different sites for each new site.server_nameandrootDirectory (make sure these directories have been created and are accessible).Then, add the corresponding site information in the "Multi-site Management" section of the AnQiCMS backend, AnQiCMS will automatically manage the data and configuration of the new site.

Post-installation first configuration and subsequent management

Whether through the Baota panel or command line deployment, when you visit the AnQiCMS website for the first time, the system will guide you to complete the database configuration and create an administrator account.Please fill in the relevant information as prompted.您的域名/system/Access the backend management interface to start content creation and website operations.

The AnQiCMS backend provides rich features including content publishing, category management, tag settings, SEO optimization tools, multi-site management, and data statistics.With these tools, you can efficiently manage website content, enhance user experience, and improve search engine visibility.Regularly check for system updates and upgrade them in a timely manner to ensure that your AnQiCMS always runs in the latest and safest state.

Frequently Asked Questions (FAQ)

Q1: After installing AnQiCMS, the website cannot be opened or displays '502 Bad Gateway', what should you do? A1:This is usually caused by the AnQiCMS Go project service not starting or incorrect Nginx/Apache reverse proxy configuration.First, check the running status of the AnQiCMS Go project. If using the Baota panel, you can check its status under "Go Project" or "Other Projects" and try to start it manually.start.shDid it execute successfully, or uselsof -i:8001(or the port you have configured) Check if the port is occupied or if the service is listening. Next, carefully check the Nginx/Apache reverse proxy configuration to ensureproxy_passThe IP address and port pointed to are consistent with the actual listening address and port of the AnQiCMS Go project, and the pseudo-static rules are correct.

Q2: How to install multiple AnQiCMS sites on the same Linux server? Do you need to install multiple copies of the code? A2:AnQiCMS supports managing multiple sites under a single Go project instance, without the need to install multiple copies of AnQiCMS for each site.You can add a new site by using the "Multi-site Management" feature in the backend of the main site.Each new site needs to be configured with a separate domain, site root directory (used to store each site's cache and uploaded files) and a separate database.

Related articles

What operating systems does AnQiCMS support for deployment and use?

As an experienced AnQi CMS website operations personnel, I am very clear about the deployment and usage of AnQi CMS in different operating system environments.AnQiCMS is an enterprise-level content management system developed based on the Go language, which was designed with cross-platform compatibility in mind, aiming to provide users with flexible and diverse deployment options.

2025-11-06

What are the advantages and disadvantages of AnQiCMS using the `start.sh` + `crontab` process guard scheme compared to `systemd` in enterprise-level applications?

As a senior CMS website operation personnel of a well-known security company, I know that the stable and efficient operation of the system is the core of enterprise content management.How to choose the appropriate process protection scheme when deploying AnQiCMS, ensuring that the system can continuously and stably provide services in various situations is a crucial issue.Currently, the AnQiCMS documentation recommends a guard method based on the `start.sh` script combined with `crontab` scheduled tasks.

2025-11-06

How can the security of the AnQiCMS process be ensured if the `start.sh` script itself fails or is tampered with?

As an experienced AnQiCMS website operations manager, I am well aware that system stability and security are crucial for content management.AnQiCMS provides a solid foundation for users with its high performance and security brought by the Go language development, but even so, any system cannot do without the guarantee of its operating environment.Regarding the security of the `start.sh` script, it is a fundamental issue involving system startup and process management, and its importance should not be overlooked.### `start

2025-11-06

`start.sh` script can be integrated with more advanced process monitoring tools (such as `Monit` or `Supervisor`)?

As a professional who has been responsible for the operation of the AnQiCMS website for a long time, I am well aware that the stable and efficient operation of the system is crucial for content publishing and user experience.AnQi CMS has won the favor of users with its high-performance and concise architecture developed in Go language.In the deployment and daily operation and maintenance, we often encounter a problem: how to ensure the continuous and stable operation of the AnQiCMS application, especially in the face of unexpected crashes or server restarts.

2025-11-06

How to configure Nginx pseudo-static rules for AnQiCMS on the Baota panel?

As an experienced CMS website operation personnel of AnQi, I know that efficient content management and excellent search engine optimization (SEO) play a decisive role in the success of the website.Static page, it is an indispensable part of it, not only does it make the website URL structure more concise and beautiful, but more importantly, it can significantly improve the search engine's ability to capture and understand the content of the website.AnQiCMS was designed with this in mind from the beginning, it has built-in powerful pseudo-static management functions, but to make full use of it, the configuration of Nginx pseudo-static rules on the server side is crucial

2025-11-06

What is the main function of the startup script `start.sh` written by "author fesion" in the AnQiCMS task schedule?

In the daily operation of AnQiCMS (AnQiCMS), the stable operation of the system is the key to ensuring user experience and content distribution efficiency.To ensure that the AnQiCMS service can provide content continuously and uninterruptedly, even if it encounters unexpected interruptions and can recover quickly, a meticulously designed startup script plays a crucial role in the scheduled tasks.Among them, the `start.sh` script written by "author fesion" was born for this purpose, and it constitutes the core of the self-protection mechanism of AnQiCMS service.### `start

2025-11-06

How to use the stop script `stop.sh` written by author fesion in AnQiCMS?

AnQiCMS (AnQiCMS) is a high-efficiency and feature-rich Go language content management system, its stable operation cannot do without refined deployment and management.As a website operator, we not only need to pay attention to content creation and optimization, but also ensure the smooth operation of the system backend.In this case, the stop script `stop.sh` plays a crucial role, which can help us safely and effectively manage the lifecycle of AnQiCMS services.### Core function to stop the script `stop.sh` `stop

2025-11-06

How to deploy multiple independent AnQiCMS sites on the same physical server?

In the rapidly changing digital age, businesses and content operators often face the challenge of managing multiple websites.AnQiCMS (AnQiCMS) is an efficient content management system developed based on the Go language, and its multi-site management function is exactly designed to solve this pain point.As an experienced website operator proficient in AnQi CMS, I am well aware of the readers' desire for efficient and convenient solutions.Today, I will elaborate on how to deploy multiple independent security CMS sites on the same physical server, helping you optimize resources and simplify management.## Start Your Multi-Site Journey

2025-11-06