In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to build a redis container. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
# # Supervisor
# # Centos Supervisor installation
# python environment is required because it is a Python program [root@localhost wang] # python-V Python 2.7.5
Yum install python-setuptools easy_install supervisor
# Verification: log in to python after successful installation
> import supervisor
Check whether the # Supervisor configuration can be loaded successfully
Echo_supervisord_conf > / etc/supervisord.conf
Supervisor comes with Web Server, so you can manage the process through the page.
[inet_http_server]; inet (TCP) server disabled by default port=127.0.0.1:9001; (ip_address:port specifier, *: port for all iface); username=user; (default is no username (open server)); password=123; (default is no password (open server))
# start supervisor:
Supervisord-c / etc/supervisord.conf
[root@localhost wang] # ps-ef | grep supervisord root 24673 1 0 07:19? 00:00:00 / usr/bin/python / usr/bin/supervisord
Supervisord is a background management server, which is used to manage background daemons according to the policy of configuration files. Supervisorctl is used for administrators to send instructions such as start / restart / stop to background management programs.
# # docker Container starts multiple services at the same time
# create Dockerfile:
# use this image to run multiple service# add service in supervisord.confFROM centos:latestMAINTAINER edwardsbean@gmail.comRUN yum install-y supervisorRUN mkdir-p / var/run/sshdRUN mkdir-p / var/log/supervisorADD supervisord.conf / etc/supervisord.conf# expose your port to hostEXPOSE 22 80
Create supervisord.conf
[supervisord] nodaemon= truth [program: sshd] command=/usr/sbin/sshd-D [program: redis] command=redis-server / etc/redis/redis.conf
# build Image
#! / bin/bashdocker build-f / home/wang/scripts/docker/Dockerfile-t myredis.
Thank you for reading! This is the end of this article on "how to build a redis container". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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: 246
*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.