AnQiCMS (AnQiCMS) relies on its efficient features based on the Go language, flexible and customizable content model, and comprehensive SEO tools, and is gradually becoming the preferred choice for small and medium-sized enterprises and content operation teams.To make full use of the powerful functions of AnQiCMS, understanding how to install and upgrade smoothly is a crucial step.This article will serve as your guide, taking you step by step through the deployment and update of AnQiCMS.
Take the first step: The installation journey of AnQi CMS
Installing AnQiCMS is not difficult, whether you prefer a graphical interface or command line operations, AnQiCMS provides a friendly deployment method.It widely supports mainstream operating systems such as Windows, Linux, and macOS, ensuring that most users can easily get started.
Recommended first: Deploy through Baota panel
For most Linux server users, Baota panel greatly simplifies server management with its intuitive graphical interface.Deploy AnQiCMS on Baota panel, the process is clear and efficient.
Ready: Create directory and upload the installation packageFirst, you need to create a dedicated installation directory for AnQiCMS in the Baota panel. Go to the "Files" menu and navigate to
/www/wwwroot/Create a new folder here, usually named after your domain, for exampleanqicms.com. Then, the Linux installation package downloaded from the AnQiCMS official website (usuallyanqicms-linux-v3.x.x.zipFormat) Upload to the newly created directory and unzip it.Easy deployment: Choose from two Baota modes.
- Baota version 7.9.3 and above (recommended for Go projects): If you are using a newer version of Baota panel, you can directly use its 'Go project' feature.Under the "Website" menu, select "Go Project", click "Add Go Project".
anqicmsExecutable file path, such as/www/wwwroot/anqicms.com/anqicms), set the project name (such asAnQiCMS), and allocate a port for the project (the default is usually8001Do not forget to check "Boot with OS" to ensure the service is automatically restored after the system restarts, and bind the domain name you have resolved to the server. - Old version of Baota panel (General project deployment): For users of the old Baota version, you can select "Add General Item" under "Other Items" to complete the deployment.Configuration items are similar to "Go projects", the core being to specify the executable file, port, and binding domain.
- Baota version 7.9.3 and above (recommended for Go projects): If you are using a newer version of Baota panel, you can directly use its 'Go project' feature.Under the "Website" menu, select "Go Project", click "Add Go Project".
Meet for the first time: website initialization installationAfter completing the configuration of the Baota panel, visit the domain you have bound through a web browser.At this time, AnQiCMS will guide you to the initial installation interface.Here, you need to enter the database connection information (such as MySQL account password, it is recommended to install MySQL in advance and record the root password), the background administrator account password, and the website address.Please make sure to verify the accuracy of the information, especially the database credentials and the strength of the administrator's password.
您的域名/system/.One thing leads to another: multiple site deployment on one serverOne of the highlights of AnQiCMS is its support for multi-site management, and you do not need to replicate a set of AnQiCMS code for each site. The process for running multiple AnQiCMS sites on the same server is slightly different:
- Create a reverse proxy for the new site:In the Baota panel's "Website
http://127.0.0.1:8001. - Add a new site in the AnQiCMS backend:Log in to the backend of the AnQiCMS default site you have installed, find the "Multi-site Management" feature in the left menu, click "Add New Site". Here, you need to fill in the name of the new site, a name starting with
/app/The root directory of the site, which is independent and used for storing cache data, new website address, administrator account password, and a new database name.It is especially emphasized that, since it is a Docker deployment, you can choose to "reuse the default database account information" to simplify the database configuration. - Configure pseudo-static:For the newly added website, go to the 'Website Settings' in the Baota panel, and change the run directory to:
/public.Later, paste the corresponding reverse proxy rules in the "pseudo-static" settings according to the web server you are using (Nginx or Apache).location @AnqiCMS { proxy_pass http://127.0.0.1:8001; ... }While Apache fills in the target URL with,http://127.0.0.1:8001. By following these steps, you can easily manage multiple AnQiCMS sites without copying core code, fully leveraging its multi-site management advantages.
- Create a reverse proxy for the new site:In the Baota panel's "Website
Deployment under the command line
For users without Baota panel or prefer command line operations, AnQiCMS also provides a detailed command line deployment guide:
- Download and extract:Download the AnQiCMS Linux installation package from the official website and unzip it into the directory you specify, for example
/www/wwwroot/anqicms.com. - Daemon process: Add scheduled task:To ensure the stable operation of AnQiCMS service and automatic startup after server restart, you need to add a scheduled task. Edit
crontab -eAdd a command to execute the AnQiCMS directory understart.shScript, for example*/1 * * * * /www/wwwroot/anqicms.com/start.sh. Then execute manually once./start.shTo start the service - Traffic distribution: Configure Nginx site:Configure Nginx as a reverse proxy to forward users' web requests to the port where AnQiCMS is running (default 8001). You need to specify the website in the Nginx configuration.
rootThe directory is under the AnQiCMS directorypublicCreate a folder and setproxy_pass http://127.0.0.1:8001;Reverse proxy rules. After completion, restart the Nginx service.
Local testing and development on Windows / macOS
If you are a developer and want to test or develop AnQiCMS locally, the process is also very simple. Just download the installation package of the corresponding system from the official website, unzip it, and double-click to runanqicms.exe(Windows) oranqicms(macOS) just the executable file is needed. Local multi-site testing can be done with integrated environments like Small Skin (phpStudy), configure the pseudo-static and modifyhostsFile domain mapping. On Windows, it is usually necessary to end the AnQiCMS service through Task Manager.anqicms.exeProcess.
Advanced choice: Source code compilation installation (Developer Exclusive)
For Go language developers or users with special customization requirements, AnQiCMS supports source code compilation installation.This requires you to have Go language (1.13 and above) and MySQL environment.git cloneGet the code, set the Go proxy, and then executego mod tidyandgo mod vendorFinally usego buildCompile the command into an executable file. Although this method provides the greatest flexibility, it is not necessary for ordinary users.
Common 'beetles' in the installation process
When installing AnQiCMS, you may encounter some common problems:
- Port is occupied:Especially when repeatedly installing or trying to run multiple AnQiCMS instances, port conflicts are common problems. You can use
lsof -i:{端口号}Command (Linux) to find the process occupying the port and usekill -9 {PID}End it. - The pseudo-static rule setting is incorrect:The configuration error of Nginx or Apache's pseudo-static rules can cause the website to fail to access normally. Please carefully check the rules provided in the document to ensure their accuracy.
Sustainable development: The upgrade path of AnQi CMS
Software updates are the key to maintaining system security, obtaining new features, and optimizing performance. AnQi CMS provides a convenient upgrade mechanism.
Old soldier, new beginning: Upgrade from version 2.x to 3.x
For users who initially used AnQiCMS 2.x versions, upgrading to version 3.x is an important milestone.
- Prepare for upgrade:Log in to the AnQiCMS backend of your 2.x version and upgrade it to the latest version through the "System Upgrade" feature.After the upgrade is completed, restart the service through the original scheduled task.If the background version has not been updated, it may be necessary to manually check the cache or old processes.
- Say goodbye to the old mode: Stop and remove old scheduled tasks:Stop and delete all scheduled tasks related to the 2.x version of AnQiCMS to avoid conflicts with the new deployment method.
- Welcome to the new architecture: Deployment of Go project (Baota users):Refer to the method described in the previous text "Baota 7.9.3 and above versions (recommended for Go projects)", and re-add AnQiCMS as a Go project to the Baota panel.Please note that the executable file selected at this time is still the executable file under the original AnQiCMS installation directory and uses the original port.This system will inherit the data of the old version without needing to be reinitialized.
- Multi-site integration:If you have previously installed multiple AnQiCMS instances on the server, it is now time to integrate them into a new deployment mode.Stop and delete all old scheduled tasks, then follow the steps of 'Install multiple sites on a single server' to add them as new child sites to the new AnQiCMS main instance.It is crucial to fill in the correct site root directory and database information, AnQiCMS will automatically identify and use the existing data.
Routine maintenance: Online upgrade
AnQiCMS has designed a convenient online upgrade feature.In the background management interface, you can easily check and upgrade to the latest version.This ensures that your website always runs on the latest and most secure AnQiCMS version, enjoying the latest features and performance improvements.
The installation and upgrade process of AnQi CMS is designed to lower the technical threshold as much as possible, allowing content creators and operators to focus more on content production and dissemination.Whether it is the first deployment or version iteration, clear guidance and powerful background functions can ensure the safety of your website.
Frequently Asked Questions (FAQ)
Q: How do I manage the databases of multiple AnQiCMS sites installed on the same server?A: When you deploy multiple AnQiCMS instances using the multi-site management feature on the same server, each site requires an independent database.When adding a new site in the AnQiCMS backend, you will be prompted to fill in the 'Database Name', please set a unique database name for each new site.If you are in a Docker environment and you have root permissions for the database, you can reuse the default database account information, AnQiCMS will automatically create the corresponding database for the new site.
Q: After upgrading AnQiCMS, the front-end of my website displays normally, but the back-end interface does not update. What is the matter?A: This situation is usually caused by browser cache.After upgrading AnQiCMS, your browser may still be loading old versions of the backend static resources (such as CSS, JavaScript files).You can try to force refresh the browser cache (usually Ctrl+F5 or Cmd+Shift+R), or clear the browser cache and cookies and then re-access the background.If the problem persists, please check if the AnQiCMS process on the server has been restarted correctly to ensure that the new version of the program is loaded.
Q: How can I troubleshoot if my AnQiCMS service stops unexpectedly or fails to start?A: First, check if the server port where AnQiCMS is located is occupied by other programs, you can use
lsof -i:{端口号}(Linux) command for troubleshooting. Next, check the log files in the AnQiCMS running directory (such asrunning.logorcheck.logWhere it typically contains detailed error messages to help you locate the problem.If it is deployed with Baota panel, you can also view the project status and logs in the "Go project" or "other project" management interface.start.shthe path and executable file name in the script are correct.