linux 脚本安装最新docker
sudo yum install -y wget lrzsz net-tools tree
wget -qO- https://get.docker.com/ | sh
sudo systemctl start docker
sudo systemctl enable docker
docker官方安装最新docker
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --enable docker-ce-edge
sudo yum install docker-ce -y
sudo systemctl start docker
docker 国内云镜像加速
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json << 'EOF'
{
"registry-mirrors": ["https://8yzxo25z.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
#docker刀云加速https://www.daocloud.io/mirror
#curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
pip 安装 国内加速度 镜像源
永久修改,一劳永逸:Linux下,修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹)tou 内容如下:
mkdir ~/.pip/
cat >~/.pip/pip.conf << EOF
[global]
index-url =http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
EOF
pip 临时使用:pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com dateutils
windows 下载Docker Toolbox 安装docker (实际也是用Virtualbox 起linux虚拟机)参考:https://www.cnblogs.com/linjj/p/5606687.html
下载:https://www.docker.com/products/docker-desktop
配置YUM 阿里云 centos7
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
配置YUM 阿里云 centos6
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
系统初始化
sudo yum install ntpdate wget tree net-tools bind-utils vim lrzsz -y
sudo ntpdate ntp1.aliyun.com
sudo timedatectl set-timezone Asia/Shanghai
sudo systemctl stop firewalld
sudo systemctl disable firewalldcat
sudo setenforce 0
sudo sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
sudo sed -i.bak 's@#UseDNS yes@UseDNS no@g;s@^GSSAPIAuthentication yes@GSSAPIAuthentication no@g' /etc/ssh/sshd_config
sudo systemctl restart sshd