天天看點

debian linux靜态IP設定。

debian linux靜态IP設定。

今天發現伺服器的一個磁盤滿了,于是就上網找方法吧其它盤的空間移動一些過去,結果fdisk時誤删了一個分區,導緻資料丢失,還好沒有什麼重要的 東西…于是隻好重新安裝系統了,本來還想嘗試恢複回去呢,發現不是一點兩點的隻是要補充,于是當務之急隻好先把新的系統安裝上去,以後有機會再研究了~

bjcl:~# vi /etc/network/interfaces

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

#auto lo

#iface lo inet loopback

# The primary network interface

auto eth0

#allow-hotplug eth0

iface eth0 inet static

address 192.168.1.10

netmask 255.255.255.0

gateway 192.168.1.1

bjcl:~# /etc/init.d/networking restart

Reconfiguring network interfaces...done.

bjcl:~# vi /etc/resolv.conf

nameserver 192.168.1.10

nameserver 202.106.46.151

繼續閱讀