AnQiCMS (AnQiCMS) is a high-performance, modular design and enterprise-grade feature-based, which quickly becomes a powerful assistant for small and medium-sized enterprises and content operation teams.It is committed to providing an efficient, customizable, and easily scalable content management solution. Whether you are building a corporate website, a marketing website, or managing multiple sites, AnQiCMS can handle it effortlessly.As the core of the content management system, the database plays a crucial role, responsible for storing and managing all the content and configuration of the website.
Deploying AnQiCMS in the Docker environment of Baota panel not only allows you to enjoy the lightness, isolation, and convenience brought by Docker, but also allows you to manage the interface intuitively through Baota panel, greatly simplifying the operation and maintenance work.How can you install and configure the MySQL database required for AnQiCMS in such an environment?This article will serve as your operation guide, taking you step by step.
PanelAdmin and Docker environment: The Foundation of Efficient Operation and Maintenance
First, we assume that you have successfully installed Baota Panel on the server.Baota Panel is a widely popular server operation and maintenance management tool, its powerful Docker manager is the key to deploying applications in the Docker environment.If you are using it for the first time, please make sure to find and enable the "Docker" feature in the left menu of the Baota panel.It is usually in the 'Panel Settings' under the 'Panel Menu Hide' option.
After the Docker feature is activated, we can embark on the journey of preparing the MySQL database for AnQiCMS.
Deploy MySQL Docker container: lay the foundation for data storage
AnQiCMS as an enterprise-level content management system requires a stable and reliable database to store the structure, content, and user data of the website.MySQL is the default and recommended database type. Installing MySQL in the Baota panel's Docker environment will make the entire process exceptionally simple.
Enter the Docker manager and search for MySQLClick the "Docker" menu on the left side of the Baota panel to enter the Docker manager interface.Here, you will see an option for the 'Docker App Store'.Click to enter and type "mysql" in the search box. Press Enter to find the official MySQL mirror.
Select the MySQL version and configureIn the search results, select the MySQL version you need to install. Here's a tip:
- If your server memory is less than 2GB, it is recommended to chooseMySQL 5.6A version that has lower resource requirements and runs more smoothly.
- If the server memory is sufficient (2GB or more), then chooseMySQL 5.7Or an updated version (such as 8.0) would be a better choice, as they provide more new features and performance optimizations. Be sure to check the box when installing.“Allow external access”Options. This is very important because the AnQiCMS container needs to connect to this MySQL container over the network.
Get MySQL's root passwordThe MySQL container is installed, and the newly installed MySQL will be displayed in the list.Click the "Details" link next to it. In the pop-up details page, you will find the root user password for MySQL.Make sure to copy and keep this password safe, as we will need it later to establish the database connection during the installation of AnQiCMS.
Up to this point, the MySQL database has been ready in your Baota Docker environment, waiting for AnQiCMS to connect.
Install AnQiCMS Docker application and connect to the database
With a running MySQL container, we can now easily deploy AnQiCMS.
Search for AnQiCMS in the Docker app storeSimilarly in the "Docker" manager of the Baota panel, click on "Docker App Store", and enter "anqicms" in the search box to search.
Configure AnQiCMS installation informationFind AnQiCMS application in the search results, click the 'Install' button to enter the configuration interface. Here, you need to fill in some key information:
- Website domainEnter the domain name you plan to use to access the AnQiCMS website, for example:
www.anqicms.com. - Database nameThe default is usually
anqicms. If you plan to deploy multiple AnQiCMS instances in the same MySQL container (such as multi-site management), please set one for each AnQiCMS instance.A unique database nameTo achieve data isolation. - Database password:This is the key!Please paste the root password you copied from the MySQL container details. AnQiCMS will use this password to connect to the MySQL database you deployed.
- Port: Default is
8001. If you plan to deploy multiple AnQiCMS Docker containers on the same server, please allocate a different, unused port for each container, for example8002/8003etc.
- Website domainEnter the domain name you plan to use to access the AnQiCMS website, for example:
Confirm and wait for installationAfter filling out, click the "OK" button. The Docker App Store will begin to download and deploy the AnQiCMS container.This process may take 1 to 5 minutes, please be patient until you see the installation successful prompt.
Publish your AnQiCMS website via reverse proxy
Docker containers typically run on internal network ports. In order for external users to access your AnQiCMS website via a domain name, we need to configure a reverse proxy.
Create Reverse Proxy SiteGo back to the left menu of the Baota panel, click on the 'Website' function area, click 'Create Website'. Select the 'Reverse Proxy' type.
- Main domainFill in the website domain you specified during the AnQiCMS installation and configuration, for example:
www.anqicms.com. - Proxy addressFill in
http://127.0.0.1:您的AnQiCMS容器端口For example, if your AnQiCMS container port is8001, then fill inhttp://127.0.0.1:8001.
- Main domainFill in the website domain you specified during the AnQiCMS installation and configuration, for example:
Complete site creationClick “Confirm” to complete the creation of the reverse proxy site.
First visit and initialization
Everything is ready now!
Enter the domain name you configured in your browser, for example:http://www.anqicms.com/. The system will guide you to the AnQiCMS initialization installation interface. Follow the prompts to set up the administrator account, password, and other information.
After completing the initialization, you can go throughhttp://您的域名/system/Visit the backend management interface. Please remember that the default backend account isadmin, and the default password is123456. After the first login, it is strongly recommended that you change these default credentials immediately to ensure website security.
Congratulations! Now, you have successfully deployed MySQL database and started your website in the Docker environment of Baota panel.
Frequently Asked Questions (FAQ)
Why does AnQiCMS need to be installed separately in Docker environment, instead of being integrated directly into the AnQiCMS container?AnQiCMS is an enterprise-level content management system developed in Go language, pursuing high performance and scalability.Although Go language applications can integrate lightweight databases (such as SQLite), for enterprise-level applications, an independent MySQL database container can provide more powerful data processing capabilities, better data security, more flexible backup and recovery mechanisms, and superior concurrent access performance.Separate the database from the application, which also conforms to Docker's practice, where each container focuses on a single service, making it easier to manage and upgrade.
What is the best version to choose when installing MySQL? What should I do if I forget the MySQL root password?The choice of MySQL version mainly depends on your server resources.If the server memory is less than 2GB, it is recommended to choose MySQL 5.6, as it has less resource consumption.If memory is sufficient, MySQL 5.7 or higher versions (such as 8.0) are better choices, they usually provide more new features and performance optimization.If you forget the MySQL root password, you can find your MySQL container in the Baota panel Docker manager, click "Details", and there will usually be an option to display or reset the root password on the details page.If not directly displayed, you can check the Baota panel or the MySQL official document, usually there are methods to reset the password by entering the container internally or modifying the configuration file.
Can multiple AnQiCMS sites installed in the Docker of Baota panel share the same MySQL Docker container?It is absolutely possible. This is a major advantage of the Docker environment.When deploying each AnQiCMS Docker application, you only need to set a different "database name" for each AnQiCMS instance, but the database connection address (usually
127.0.0.1) and root password can both point to the same MySQL Docker container.In this way, all your AnQiCMS sites will efficiently utilize the same MySQL service while maintaining the independence of their data at the database level.