Skip to content

Script to install mosdns on Debian(or derivatives) Linux

Notifications You must be signed in to change notification settings

star8618/mosdns-debian-install

 
 

Repository files navigation

English | 简体中文

一个在Debian(或衍生版)上安装mosdns的shell脚本。

2023-3-19更新:兼容V5,要安装之前的就砍掉重练吧。

重要!先决条件:需要事先为DNS服务器做好IP分流。

有关更多详细信息,请参阅此仓库

独立安装 (amd64 & arm64):

bash <(curl -Ls https://raw.githubusercontent.com/allanchen2019/mosdns-debian-install/v5/AutoSetup.sh)

可选:每天7:00自动更新各种列表,crontab -e 后添加:

0 7 * * * bash /opt/mosdns/update-geo.sh  >> /var/log/cron.log 2>&1

保存退出。

更新资源文件:

bash <(curl -Ls https://raw.githubusercontent.com/allanchen2019/mosdns-debian-install/v5/update-geo.sh)

只更新可执行二进制:

bash <(curl -Ls https://raw.githubusercontent.com/allanchen2019/mosdns-debian-install/v5/update-bin.sh)

卸载:

bash <(curl -Ls https://raw.githubusercontent.com/allanchen2019/mosdns-debian-install/v5/uninstall.sh)

如不能正常安装,请先重置DNS:

rm -rf /etc/resolv.conf
cat << EOF >/etc/resolv.conf
nameserver 1.1.1.1
nameserver 8.8.8.8
EOF
systemctl enable systemd-resolved.service
systemctl restart systemd-resolved.service
cd ~

About

Script to install mosdns on Debian(or derivatives) Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%