As a website operator who is well-versed in AnQiCMS, I deeply understand the importance of an efficient and stable content management system for enterprises and content creators.AnQiCMS with its powerful performance in Go language, flexible content model, and excellent SEO-friendliness, has won the favor of many users.In daily operations, the convenience of deployment is also very important, especially for users accustomed to using the Baota panel to manage servers.
Today, I will elaborate in detail on the specific steps to deploy AnQiCMS on the Baota panel.This deployment tutorial will mainly use Docker containerization technology, as it can effectively isolate the environment, simplify dependency management, and make the deployment and expansion of AnQiCMS more flexible and efficient.
1. Prepare the Baota Panel environment
To ensure that AnQiCMS can be deployed and run smoothly, we first need to make the corresponding environmental configuration for Baota panel.
The Baota panel version requirement: Please confirm that your Baota panel version is above 9.2.0, usually released after September 5, 2024, can meet the requirements.If your version is too low, it is recommended that you upgrade the Baota panel to the latest stable version first.
Install Docker Manager:First, log in to your Baota panel.Find the "Docker" option in the left menu.If the option is not found, please go to the "Panel Settings" -> "Panel Menu Hide" to enable the display of Docker.When you first enter the Docker interface, the system may prompt you to install the Docker service.Please click "Install Now" to complete the Docker installation.
Install MySQL Database (Docker Edition):AnQiCMS needs a database to store data.In the Docker manager, click 'App Store', search for 'mysql', and select install.If your server memory is less than 2GB, it is recommended to choose MySQL 5.6 version, otherwise, it is usually enough to choose 5.7 or a higher version.Please make sure to check the 'Allow External Access' option, as this is necessary for the AnQiCMS container to connect to MySQL. After installation, click the 'Details' link of the MySQL container.Here, you will find the password for the root user.Please make sure to copy and keep this password safe, it will be needed during the installation of AnQiCMS.
Part two: AnQiCMS Application Deployment
After completing the basic environment preparation of the Baota panel, we now begin to deploy the AnQiCMS application.
Install AnQiCMS through the Docker App Store:In the Docker interface of the Baota panel, click 'App Store' and search for 'anqicms'.You will see the official mirror of AnQiCMS.Click the 'Install' button to enter the installation configuration interface.
Configure AnQiCMS Docker container parameters:On the installation interface, you need to fill in the following key information:
- nameSuggested to fill in "anqicms" or a name that is easy for you to recognize.
- MirrorTick the "Manual Input" option and then fill in the input box.
anqicms/anqicms:latest. This ensures that you are installing the latest stable version of AnQiCMS. - Port: Both the server port and container port should be filled in
8001.If you plan to deploy multiple AnQiCMS sites on a single server, the server port for each AnQiCMS instance needs to be filled with different numbers, such as 8002, 8003, and so on, but the container port remains 8001. - Restart rules: Recommend choosing 'Restart after failure' or 'Restart if not manually stopped', to ensure high availability of the service.
Confirm that these configurations are correct and then click "OK" to start the installation.The installation process may take 1 to 5 minutes, please be patient.After installation, you will see the running status of the AnQiCMS container in the Docker container list.
Set up reverse proxy site: Since the AnQiCMS container runs by default on an internal port (such as 8001), in order to access the website through your domain name, we need to set up reverse proxy in the Baota panel.In the Baota panel on the left menu, select "Website" and then click "Add Site".In the pop-up interface, select 'Reverse Proxy'.
- Main domainFill in the domain name you have prepared for AnQiCMS, for example
yourdomain.comortest.anqicms.comMake sure that the domain name has been correctly resolved to your server IP address. - Proxy addressFill in
http://127.0.0.1:8001. The port number here must match the port number of your AnQiCMS container server.
Click “Confirm” to complete the creation of the reverse proxy site.
3. Website initialization and use
After deployment and configuration are completed, AnQiCMS is now accessible through your domain.
Perform initial installation:Enter the domain name you have just set in the browser, for example:http://yourdomain.com.When you first visit, the system will automatically jump to the AnQiCMS initialization installation interface.
In this interface, you need to fill in the database connection information.Please use the root password obtained during the installation of the Docker version of MySQL, as well as the database name you created for AnQiCMS.At the same time, set your admin account and password for the background, and confirm the website address.Follow the prompts to complete the installation steps.If the installation fails, please carefully check whether the database account password is correct, ensure that the database user has sufficient permissions to create the database, and check whether the administrator password meets the complexity requirements.
Access the AnQiCMS backend:After installation is successful, you can access via您的域名/system/Log in to the AnQiCMS admin panel. For example, if your website domain ishttp://yourdomain.comthen the admin address ishttp://yourdomain.com/system/.admin, and the default password is123456. It is strongly recommended to change the default administrator account and password immediately after your first login to ensure website security.
So far, your AnQiCMS has been successfully deployed on the Baota panel, and you can now start creating, publishing, and optimizing your website content.
Frequently Asked Questions (FAQ)
1. How can I solve the problem of port occupation when deploying AnQiCMS on the Baota panel?
When you deploy AnQiCMS or other services on the Baota panel, if you are prompted that the port is occupied, this usually means that the port (such as the default 8001) you are trying to use has already been used by other processes or services on the server. The solution to this problem is to first log in to your server using the SSH tool, runlsof -i:{端口号}for examplelsof -i:8001)Command to find the process ID (PID) occupying the port. After finding the PID, you can usekill -9 {PID}Command to force terminate the process.After that, you can try deploying AnQiCMS again in the Baota panel and make sure to use a port that is not occupied.Of course, when redeploying AnQiCMS, you can also directly select a different, unused server port (such as 8002, 8003, etc.), and accordingly update the proxy address in the reverse proxy configuration.
2. How to deploy multiple AnQiCMS sites on the same server using the Docker deployment method?
It is completely feasible to deploy multiple AnQiCMS sites on the Baota panel using Docker, and the process is relatively simple.The key is to allocate independent resources and access paths for each AnQiCMS instance.
- Container port: Each AnQiCMS container'sserver portmust be unique (for example, the first uses 8001, the second uses 8002, and so on), butcontainer internal portKeep the default 8001.
- DatabaseAlthough you can reuse the same Docker MySQL service, it is strongly recommended to create a separate database name for each AnQiCMS site to avoid data conflicts.
- Reverse ProxyCreate a new reverse proxy site for each new AnQiCMS container, bind the main domain name to each independent domain name, and the proxy address points to the corresponding server port (for example
http://127.0.0.1:8002) - InitializationEach new site needs to be independently initialized when accessed for the first time through the domain, configure their respective databases and administrator accounts.
By following these steps, you can efficiently manage multiple AnQiCMS sites on a single server.
3. AnQiCMS installation failed,提示提示database permission insufficient or unable to create database, what should I do?
This situation usually occurs when AnQiCMS tries to connect to the database and create the necessary table structures.The main reason may be that the database account permission you provided is insufficient, or there is an error in filling in the database information.
- Database password: Confirm that the MySQL password you entered on the AnQiCMS installation interface is correct, and it is the password of the root user or a user with sufficient permissions.After installing Docker MySQL, a root password will be generated, be sure to use it.
- User permissionsEnsure that the MySQL user you are using has the permission to create, modify, and delete tables in the specified database if it is not using the root user.In the Baota panel database management, you can grant all permissions to a specific MySQL user.
- Database nameEnsure the database name you enter is the new database you want AnQiCMS to create, and not an existing database that AnQiCMS does not have permission to modify.
- MySQL service statusConfirm that your Docker MySQL container is running normally and is not blocked by the firewall from accessing the AnQiCMS container.
Check these issues one by one, usually it can solve the installation failure problems related to the database.