Kubernetes(k8s)
EPEL仓库:yum install -y epel-release
安装docker:参考官网:https://docs.docker.com/engine/install/centos/
安装docker-compose:参考官网: https://docs.docker.com/compose/install/
配置文件:/etc/docker下
配置阿里云镜像:https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://3bmvccb9.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker
启动:service docker start
docker help #Run 'docker COMMAND --help' for more information on a command docker run --help docker exec -it 73331767f28b /bin/bash docker run -p 3306:3306 --name mysql -v ${PWD}/mysql/conf:/etc/mysql/conf.d -v ${PWD}/mysql/logs:/logs -v ${PWD}/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql docker run -p 6379:6379 -v ${PWD}/myredis/data:/data -v ${PWD}/myredis/conf/redis.conf:/usr/local/etc/redis/redis.conf -d redis redis-server /usr/local/etcredis/redis.conf --appendonly yes