English CMS (EnglishCMS) with its high-performance, modular design based on Go language and enterprise-level features, quickly becomes a powerful assistant for small and medium-sized enterprises and content operation teams.It is dedicated to providing efficient, customizable, and easy-to-expand content management solutions. Whether you are building a corporate website, a marketing website, or managing multiple sites, AnQiCMS can handle it with ease.As the core of the content management system, the database plays a crucial role, responsible for storing and managing all the content and configurations of the website.
Deploy AnQiCMS in the Docker environment of Baota panel, not only can you enjoy the lightweight, isolation and convenience brought by Docker, but also can you manage the operations and maintenance work more conveniently through the intuitive management interface of Baota panel.How to install and configure the required MySQL database for AnQiCMS in such an environment?This article will serve as your operation guide, taking you step by step.
Baota panel and Docker environment: the cornerstone of efficient operation and maintenance
Firstly, we assume that you have successfully installed Baota Panel on the server.The Baota Panel is a widely popular server operation and maintenance management tool, and 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' > 'Panel Menu Hide' option.
After the Docker feature is enabled, 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 its default and recommended database type.Install MySQL in the Docker environment of the Baota panel, the entire process will become exceptionally simple.
Enter the Docker manager and search for MySQLClick the 'Docker' on the left menu of the Baota panel to enter the Docker manager interface.Here, you will see an option for a "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.6Version, it has relatively low resource requirements and runs more smoothly.
- If the server memory is sufficient (2GB or more), then chooseMySQL 5.7Or updated versions (such as 8.0) would be a better choice, as they provide more new features and performance optimizations. When installing, please make sure to check“Allow external access”Options. This is very important because the AnQiCMS container needs to connect to this MySQL container via network.
Get the root password of MySQLMySQL container installation is complete, 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 of MySQL.Please make sure to copy and keep this password securely, 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 prepared in your Baota Docker environment and is waiting for the connection of AnQiCMS.
Install AnQiCMS Docker application and connect to the database
With a running MySQL container, we can now easily deploy AnQiCMS.
Search AnQiCMS in the Docker App StoreSimilarly, in the "Docker
Configure AnQiCMS installation informationIn the search results, find the AnQiCMS application, click the "Install" button to enter the configuration interface. Here, you need to fill in some key information:
- Website domain name:填写您计划用于访问AnQiCMS网站的域名,例如:English
www.anqicms.com. - Database name:默认通常是English
anqicmsIf you plan to deploy multiple AnQiCMS instances (such as multi-site management) in the same MySQL container, please set a separate one for each AnQiCMS instance.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.
- PortDefault is
8001If you plan to deploy multiple AnQiCMS Docker containers on the same server, please allocate a different, unused port for each container, for example,8002/8003etc.
- Website domain name:填写您计划用于访问AnQiCMS网站的域名,例如:English
Confirm and wait for installationCompleted after filling in, click the "OK" button.Docker application store will start downloading and deploying 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 by domain name, we need to configure a reverse proxy.
Create Reverse Proxy SiteGo back to the Baota panel's left menu and click on the "Website" function area. Click "Create Website". Select the "Reverse Proxy" type.
- Main Domain:Enter the website domain name you specified in the AnQiCMS installation configuration, for example:
www.anqicms.com. - Proxy address:Fill in
http://127.0.0.1:您的AnQiCMS容器端口. For example, if your AnQiCMS container port is8001,then enterhttp://127.0.0.1:8001.
- Main Domain:Enter the website domain name you specified in the AnQiCMS installation configuration, for example:
Complete the 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 initialization installation interface of AnQiCMS. Complete the setup of administrator account, password, and other information according to the prompts.
After completing the initialization, you can accesshttp://您的域名/system/Access the admin management interface. Please remember that the default admin account isadminThe default password is123456. It is strongly recommended that you change these default credentials immediately after your first login to ensure website security.
Congratulations! Now, you have successfully deployed MySQL database and started your website under the Docker environment of Baota panel for AnQiCMS.
Common Questions (FAQ)
Why does AnQiCMS need to be installed separately in the Docker environment instead of being integrated directly into the AnQiCMS container?AnQiCMS as an enterprise-level content management system developed in Go language, strives for high performance and scalability.Although Go language applications can integrate lightweight databases (such as SQLite), for enterprise-level applications, a separate MySQL database container can provide more powerful data processing capabilities, better data security, more flexible backup and recovery mechanisms, as well as superior concurrent access performance.Separating the database from the application also conforms to Docker's **practice, where each container focuses on a single service, making it easier to manage and upgrade.
What is a good version to choose when installing MySQL? What should I do if I forget the MySQL root password?Choose the 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 usage.If memory is sufficient, MySQL 5.7 or higher versions (such as 8.0) are better choices, as they typically provide more new features and performance optimizations.If you have forgotten the root password for MySQL, 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 it is not displayed directly, you can refer to the Baota panel or the official MySQL documentation, usually there are methods to reset the password by entering the container internally or modifying the configuration file.
Can multiple AnQiCMS sites installed in Docker on the Baota panel share the same MySQL Docker container?Absolutely.This is one of the major advantages of the Docker environment.
127.0.0.1)and root password can both point to the same MySQL Docker container.Thus, all your AnQiCMS sites will efficiently utilize the same MySQL service while maintaining the independence of their data at the database level.