目录

安装 centos 7

默认安装了防火墙 firewalld

1
2
3
4
5
6
7
8
9
firewall-cmd --permanent --add-port=8080-8085/tcp

firewall-cmd --reload

firewall-cmd --permanent --remove-port=8080-8085/tcp



firewall-cmd --permanent --list-services

安装 docker {#安装 docker}

1
2
3
4
5
6
yum -y update
yum install -y docker

service docker start
service docker stop
service docker restart

docker 阿里镜像 加速器

1
2
3
4
5
6
7
8
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://wi8ogj05.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
docker pull docker.io/java

docker save docker.io/java > /home/java.tar.gz

docker rmi docker.io/java

docker load < /home/java.tar.gz

docker images

docker tag docker.io/percona/percona-xtradb-cluster pxc

补充内容

centos7 开启网络连接

1
2
3
4
5
6
7
8
cd  /etc/sysconfig/network-scripts/
vi    ifcfg-enoXXX

ONBOOT=yes

service network restart

ip address