配置DNS:
编辑文件vi /etc/resolv.conf,为如下所示:
domain members.linode.com #可以不填
search members.linode.com #可以不填
nameserver 98.76.54.32 #在后台Remote Access标签中的DNS Resolvers
nameserver 76.54.32.10 #在后台Remote Access标签中的DNS Resolvers
options rotate #必须有这行
Debian & Ubuntu系统中静态ip,多ip配置:
编辑文件vi /etc/network/interfaces,如下所示(将原来DHCP动态ip配置覆盖即可!):
# The loopback interface
auto lo
iface lo inet loopback
# Configuration for eth0 and aliases
# This line ensures that the interface will be brought up during boot.
auto eth0 eth0:0 eth0:1
# eth0 – This is the main IP address that will be used for most outbound connections.主ip,也就是linode自带的ip。
# The address, netmask and gateway are all necessary.ip地址、掩码、网关都必须填
iface eth0 inet static
address 12.34.56.78 #主ip地址在后台Remote Access标签中查看。
netmask 255.255.255.0 #掩码地址在后台Remote Access标签中查看。
gateway 12.34.56.1 #网关在后台Remote Access标签中查看。
# eth0:0
# This is a second public IP address.这是购买的第二个ip
iface eth0:0 inet static
address 34.56.78.90 #第二个ip地址在后台Remote Access标签中查看。
netmask 255.255.255.0 #掩码在后台Remote Access标签中查看。
# eth0:1 – Private IPs have no gateway (they are not publicly routable) so all you need to.内部ip,不能作为外部访问用。
# specify is the address and netmask.
iface eth0:1 inet static
address 192.168.133.234 #内部ip地址在后台Remote Access标签中查看。
netmask 255.255.128.0 #掩码在后台Remote Access标签中查看。
同理我们可以为linode添加更多的ip,但是linode很难购买更多的ip,需要有很充分的理由如ssl等。
英文原文请参考(包含其他系统配置方法,如:CentOS,Fedora,Ubuntu等):http://library.linode.com/networking/configuring-static-ip-interfaces/#debian__amp__ubuntu
linode购买:点击购买 (用我的推介购买http://www.linode.com/?r=0095c3b33ba8a299b622f9b7a123c42e4c6fc57c,3个月后返款10美元,具体咨询QQ:13945502)
评论前必须登录!
注册