[+] NTP
This commit is contained in:
parent
475e251004
commit
aba48cd90f
13
README.md
13
README.md
@ -1,9 +1,10 @@
|
|||||||
|
#### 进入容器
|
||||||
|
```bash
|
||||||
|
docker compose run debian bash
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
docker compose run ubuntu bash
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
18
init-apt.sh
18
init-apt.sh
@ -23,9 +23,19 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
APT_OPTIONS="-o Acquire::https::mirrors.martin98.com::Verify-Peer=false -o Acquire::https::mirrors.martin98.com::Verify-Host=false"
|
|
||||||
|
|
||||||
# 更新证书
|
# 更新证书
|
||||||
|
APT_OPTIONS="-o Acquire::https::mirrors.martin98.com::Verify-Peer=false -o Acquire::https::mirrors.martin98.com::Verify-Host=false"
|
||||||
apt update $APT_OPTIONS && apt install $APT_OPTIONS -y ca-certificates && update-ca-certificates
|
apt update $APT_OPTIONS && apt install $APT_OPTIONS -y ca-certificates && update-ca-certificates
|
||||||
# 正式更新包
|
apt update && apt upgrade -y
|
||||||
apt update && apt upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
|
# NTP
|
||||||
|
# 启用阿里云 ntp
|
||||||
|
apt install chrony -y
|
||||||
|
cat > /etc/chrony.conf <<EOF
|
||||||
|
server ntp4.aliyun.com minpoll 4 maxpoll 10 iburst
|
||||||
|
server ntp5.aliyun.com iburst
|
||||||
|
driftfile /var/lib/chrony/drift
|
||||||
|
allow 127.0.0.1
|
||||||
|
EOF
|
||||||
|
systemctl restart chrony && systemctl enable chrony
|
||||||
|
Loading…
x
Reference in New Issue
Block a user