In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the method of creating docker-compose.yml file under Docker". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's way of thinking to study and learn "the method of creating docker-compose.yml file under Docker".
Environmental information
The following is the environment for this operation:
Operating system: MacBook Pro
Docker:19.03.2
Create a docker-compose.yml file
First, create a docker-compose.yml file with the following contents:
Version: '2'services: zabbix-mysql: image: daocloud.io/library/mysql:8 container_name: zabbix-mysql environment:-MYSQL_ROOT_PASSWORD=888888 restart: always zabbix-server: image: monitoringartist/zabbix-xxl links:-zabbix-mysql:mysqlhost container_name: zabbix-server restart: always depends_on:-zabbix-mysql ports:-"8888image 80" environment: -ZS_DBHost=mysqlhost-ZS_DBUser=root-ZS_DBPassword=888888 create container
Open the command line, and under the docker-compose.yml directory you just created, execute docker-compose up-d, so that the containers for mysql and zabbix server services will be started successively, as shown below:
Wait for zabbix server initialization
Enter the command docker logs-f zabbix-server-service on the command line to view the log output of zabbix server. The following is a screenshot of some logs. You can see the database initialization operation:
Experience logging in to the zabbix management page
After waiting for about one minute, the log of zabbix server no longer scrolls, indicating that initialization is complete. Open the browser and type http://localhost:8888, and you can see the login page of zabbix's management system, as shown below:
Enter user name admin, password zabbix
After logging in, you can see the management system, as shown below:
Check the situation of the monitored CVM according to the operation shown below. As shown in the figure, you can only see the information of one machine, that is, zabbix server itself. You can see 64 monitoring items, 43 triggers and 10 graphics in the list:
The status shown in the red box on the right side of the above figure is "Disabled", indicating that the monitoring of this host has not been activated. Click "Disabled" to start the monitoring and change the status to "Enabled". After about 1 minute, you can refresh the page, and you can see the display as shown below:
In addition to changing the status to "Enabled", the original gray "ZBX" on the right also turns green, indicating that the monitoring status of the machine is normal.
Experience monitoring graphics
Following the red boxes and arrows in the following figure, you can see the graph of the cpu load of the machine where zabbix server is located:
Display Chinese
Click the contents in the red box according to the arrows in the following figure:
On the open page, select and click according to the arrow in the following figure:
At this time, click the "Log out" button in the upper right corner to exit and log in again, as shown in the red box below:
After logging in again, you can see that all the pages have been displayed in Chinese, as shown below:
Thank you for reading, the above is the content of "the method of creating docker-compose.yml file under Docker", after the study of this article, I believe you have a deeper understanding of the method of creating docker-compose.yml file under Docker, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.