普通にインストールしたら、DHCPなってしまった。固定 IP アドレスに変更する方法をメモしておく。

ネットワークインターフェイス設定

interfaces ファイルを開く。

$ sudo vi /etc/network/interfaces

/etc/network/interfaces

# The primary network interface iface eth0 inet dhcp

上記部分を下記のとおり書き換える。

# The primary network interface auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameserver 192.168.1.1

ネットワークサービスを再起動

再起動してNICに適用する。

$ sudo /etc/init.d/networking restart