wget www.alexman.cn/sources.list -O /etc/apt/sources.list
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
apt-get update
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo 'LANG="en_US.UTF-8"' >> /etc/profile
source /etc/profile
systemctl disable systemd-resolved.servicesystemctl stop systemd-resolved.service
rm -rf /etc/resolv.conf
echo "
nameserver 114.114.114.114
nameserver 8.8.8.8
" > /etc/resolv.conf
echo " net.bridge.bridge-nf-call-ip6tables=1 net.bridge.bridge-nf-call-iptables=1 net.ipv4.ip_forward=1 net.ipv4.conf.all.forwarding=1 net.ipv4.neigh.default.gc_thresh1=4096 net.ipv4.neigh.default.gc_thresh2=6144 net.ipv4.neigh.default.gc_thresh3=8192 net.ipv4.neigh.default.gc_interval=60 net.ipv4.neigh.default.gc_stale_time=120 " >> /etc/sysctl.conf
sysctl -p
cat >> /etc/security/limits.conf <<EOF root soft nofile 65535 root hard nofile 65536 * soft nofile 65535 * hard nofile 65536 EOF
wget www.alexman.cn/mod.txt
for i in `cat mod.txt`;do modprobe $i;done
apt-get install docker-ce=5:19.03.6~3-0~ubuntu-bionic docker-ce-cli=5:19.03.6~3-0~ubuntu-bionicwget www.alexman.cn/docker.service -O /lib/systemd/system/docker.service
wget www.alexman.cn/daemon.json -O /etc/docker/daemon.json
systemctl restart docker
apt-get install nfs-common
mkdir /log
ln -fs /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service
echo "[Install]
WantedBy=multi-user.target
Alias=rc-local.service
" >> /etc/systemd/system/rc-local.service 标签:docker,systemd,service,锐速,eri,etc,ipv4,net,idc From: https://www.cnblogs.com/alexhjl/p/18008189