配置IP
- 编辑
/etc/rc.conf
文件/etc/rc.conf 1
2
3
4
5
6
7hostname="freebsd"
ifconfig_em0="inet 192.168.1.201 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crach dumps, "NO" to disbale
dumpdev="AUTO" - 执行
reboot
重启或者执行sh /etc/rc.conf
生效
配置DNS服务器
- 编辑
/etc/resolv.conf
- 填写或更改一下内容
/etc/resolv.conf 1
nameserver 192.168.1.1