安裝bind套件: sudo apt-get install bind9 編輯 sudo nano /etc/bind/named.conf.local ,最底下加入: zone "laserman.tw" IN { #hostname是你註冊的網域名稱,laserman.tw 是我的網域,填入你想要的 hostname 即可 type master; file "/etc/bind/db.laserman"; }; 最後一行是指定網域設定的檔案位置與名稱,可以依照自己的需要取名。 編輯 sudo nano /etc/bind/db.laserman : $TTL 86400 @ IN SOA laserman.tw. hc.kao1.gmail.com. ( 2013111409 ; serial 86400 ; refresh 1800 ; retry 1728000 ; expire 1200 ; Negative Caching ) @ IN NS dns.laserman.tw. dns IN A 220.133.209.15; @ IN A 220.133.209.15; @ IN MX 0 mail.laserman.tw. @ IN MX 10 laserman.tw. @ IN MX 20 www.laserman.tw. ; ; localhost IN A 127.0.0.1 loopback IN CNAME localhost www IN A 220.133.51.88 owncloud IN A 220.133.51.88 nextcloud IN A 220.133.51.88 ftp IN CNAME www bbs IN CNAME ms1 檔案寫好後存檔離開。 重新啟動bind: sudo systemctl restart bind9 設定開機後啟動: sudo systemctl enable named