基本配置
修改源:sudo vim/etc/apt/sources.list——》按“I”键切换到插入模式
修改镜像地址:http://mirror.lupaworld.com/ubuntu 其它不变,共10条。
保存后 升级:sodo apt-get update
开启SSH服务:sodo apt-get install openssh-server
网络配置
查看网络配置:ifconfig
配置网络:sudo vi /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interfaceauto eth0
iface eth0 inet static
address 203.187.182.***
netmask 255.255.255.***
network 203.187.182.***
broadcast 203.187.182.***
gateway 203.187.182.***
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 202.106.196.115 202.106.0.20
dns-search workgroup
# The second network interface for intranetauto eth1
iface eth1 inet static
address 192.168.0.123
netmask 255.255.255.0
network 192.168.0.1
broadcast 192.168.0.255
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 202.106.196.115 202.106.0.20
新配置生效:sudo /etc.init.d/networking restart
或重启网卡:sodo ifdown eth0
sudo ifup eth0
查看路由信息:route
配置DNS: sudo vi /etc/resolv.conf
nameserver 202.106.196.115
nameserver 202.106.0.20 (可添加3个)
参考:Ray's Notes - Ubuntu Server 下的网络配置
没有评论:
发表评论