agent DNS
今天一臺agent莫名其妙電源板壞掉了,讓IT幫忙修理了一下,回來以后IP非靜態(tài)绍在,DNS更不用說了,全都沒了,得重新配置一下
agent是Ubuntu系統(tǒng)
設(shè)置靜態(tài)IP
/etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto [name] ---->name是ifconfig顯示的名字
iface [name] inet static
address [static IP]
netmask [子網(wǎng)掩碼]
gateway [網(wǎng)關(guān)]
dns-nameservers [DNSs]
dns-nameservers 跟多個DNS偿渡,如果是單個DNS臼寄,使用dns-nameserver
保存后重啟電腦
ifconfig查看IP是否為已設(shè)置的靜態(tài)IP
*這里設(shè)置的DNS不會自動保存到/etc/resolv.conf,需要在/etc/resolvconf/resolv.conf.d/head設(shè)置
設(shè)置DNS
/etc/resolvconf/resolv.conf.d/head
nameserver xxx.xxx.xx.xxx
nameserver xx.xx.xx.xx
有幾個DNS就寫幾條溜宽,每個DNS一行
保存后運行sudo resolvconf -u吉拳,會自動更新/etc/resolv.conf文件
用以下命令使網(wǎng)絡(luò)設(shè)置生效
service networking restart
sudo /etc/init.d/networking restart
這種方式不需要重啟電腦
其他資料寫的是修改/etc/resolvconf/resolv.conf.d/base,實踐證明無法修改
設(shè)置好以后适揉,在放agent.jar的路徑下運行命令留攒,查看是否正常連接
java -jar agent.jar -jnlpUrl [HOST] -secret [SECRET] -workDir "[WORKSPACE]" -noCertificateCheck