当前位置:网站首页>Microservice system architecture construction I: Environment Construction
Microservice system architecture construction I: Environment Construction
2022-06-13 08:14:00 【Dreams Of blue】
1, install docker
1 Before uninstalling the system docker
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
2 Setup repository
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
3 install DOCKER engine
sudo yum install docker-ce docker-ce-cli containerd.io
4 start-up Docker.
sudo systemctl start docker
5 Configure image acceleration
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://chqac97z.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
start-up docker
systemctl start docker
2, install redis
1 stay docker hub Search for redis Mirror image
docker search redis
2 Pull redis Mirror to local
docker pull redis:6.0.10
3 Modify the configuration that needs to be customized (docker-redis There is no configuration file by default ,
Mount the mapping after the host is established )
Create and modify /usr/local/redis/redis.conf
bind 0.0.0.0 Open remote permissions
appendonly yes Turn on aof Persistence
4 start-up redis Service run container , Start the container
docker run --name redis -v /usr/local/redis/data:/data -v /usr/local/redis/redis.conf:/usr/local/etc/redis/redis.conf -p 6379:6379 -d redis:6.0.10 redis-server /usr/local/etc/redis/redis.conf
explain : -v /usr/local/redis/data:/data # Hang the data directory locally to ensure data security
-v /root/redis/redis.conf:/usr/local/etc/redis/redis.conf # Hang the configuration file locally for easy modification
5 Go straight in redis client .
docker exec -it redis redis-cli
6 Local remote connection redis
7 You need to open the firewall on Tencent cloud to pass
8 Set up redis The account and password of the connection
3, install postgresql
Web link
docker install postgresql_ My guest, here comes the wine blog -CSDN Blog _docker postgresql
account number :postgres password :password
1. Inquire about postgresql Mirror image
docker search postgres
2. Pull image file
docker pull postgres:14.2
3, Create folder
mkdir postgresql
4, Start the container , And set the password
docker run --name postgres \
--restart=always \
-e POSTGRES_PASSWORD=password \
-p 5432:5432 \
-v /data/postgresql:/var/lib/postgresql/data \
-d postgres:14.2
5, Turn on the firewall , Provide external access
4, install nacos
The website is
account number :nacos password :nacosDocker install Nacos Detailed tutorial _ Qiu Feng Xiao Zhu's blog -CSDN Blog _docker install nacos The virtual machine used in this tutorial is centos7. One 、 Pull image 2 、 Start container three 、 test https://blog.csdn.net/qq_44697728/article/details/122677059
1, Pull the mirror image , Install the latest stable version , Be careful , ad locum ,qq The browser does not support displaying visual interfaces
docker pull nacos/nacos-server:2.0.3
2, Start the program
docker run \
--name nacos -d \
-p 8848:8848 \
--privileged=true \
--restart=always \
-e JVM_XMS=256m \
-e JVM_XMX=256m \
-e MODE=standalone \
-e PREFER_HOST_MODE=hostname \
nacos/nacos-server:2.0.3
5, install rabbitmq
The website is :
cd /opt/rabbitmq
mkdir data
# Pull the mirror image
docker pull rabbitmq:3-management
# Look at the mirror image
docker images
# start-up rabbitMq
docker run -d \
-v /opt/rabbitmq/data:/var/lib/rabbitmq \
-p 5672:5672 -p 15672:15672 --name rabbitmq --restart=always \
--hostname myRabbit rabbitmq:3-management
# start-up rabbitmq_management, rabbitmq For the name of the container , Use id It's fine too
docker exec -it rabbitmq rabbitmq-plugins enable rabbitmq_management
# ip+ Port number login , The user name and password default to guest
Browser access http://192.168.124.129:15672
Initial account password guest guest
6, install nginx
7, install sentinal
website :
Pull the mirror image :
docker pull bladex/sentinel-dashboard
start-up :
docker run --name sentinel -d -p 8858:8858 -d bladex/sentinel-dashboard
8, install seata
Integration through practice :
ad locum , To specify seata Version of , Specify the database as postgresql, Whether to specify kafka Log version of
Operation steps :
9, install zipkin Link tracking
docker run -d -p 9411:9411 openzipkin/zipkin
边栏推荐
- Differences between Merkle DAG and Merkle tree
- Operation of simulated examination platform for examination question bank of G3 boiler water treatment operation certificate in 2022
- [complete information static game characteristics of Nash equilibrium]
- Why do wholesalers use the order system
- Founder of Starbucks: no longer open "public toilets" to non store consumers for safety reasons
- 1. fabric2.2 comprehensive learning - Preface
- Gtk+ programming example on page 115 - simplest progress bar 2 with steps to write GTK program using anjuta
- 微服务项目搭建三:自动生成代码
- 安装CUDA+CUSP环境,并创建第一个HelloWord入门工程
- LeetCode-按奇偶排序数组
猜你喜欢
中小型照明灯饰行业如何利用数字化转型突出重围?
母婴用品批发行业使用管理软件提高效率 实现降本增效
Introduction to dfinity (ICP) -1
Detailed explanation of digital certificate and Ca
Remote office solution under epidemic situation
Effective Go - The Go Programming Language
Practice makes sense -- your byte alignment and stack cognition may be wrong
Overall process analysis of account book operation in fabric0.6
18 | establish data path (middle): instruction + operation =cpu
本地靶场2-文件上传漏洞(三)-网络安全
随机推荐
Structural analysis of hyperledger fabric (I)
【博弈论-完全信息静态博弈】 Nash均衡的应用
ERP基础数据 华夏
[problem record] taberror: inconsistent use of tabs and spaces in indentation
6. fabric2.2 stop clustering and delete data (use the official demo)
AcWing 1977. 信息中继(基环树,并查集)
2022年G3锅炉水处理操作证考试题库模拟考试平台操作
Edge浏览器使用BdTab新标签页插件(BD新标签页)
Why do wholesalers use the order system
How to dynamically delete data rows in a table through JS (keep the head)
ERP 基础数据 概念
SolidWorks修改工程图中文字字体的方法
CCNP_ Bt-ospf big experiment (1)
Basic operation of dfinity (ICP) development-4
2022年电工(初级)考题及模拟考试
[deep learning]: introduction to pytorch to project practice (XII) convolutional neural network: padding and stride
Word中批注的使用方法
[problem record] json decoder. JSONDecodeError:Extra data: line xxx column xxx(char xxxx)
[complete information static game characteristics of Nash equilibrium]
Common shell script development specifications