トップページ > インフォメーション

自宅サーバ構築MY HOME SERVER

ネットワーク設定 一般ユーザー追加 システムアップデート サービス管理ツール

- ネットワーク設定 -

最初にネットワーク設定をします。サーバのIPアドレスを固定にします。

ネットワーク情報が記載されているifcfg-eth0ファイルを編集します。

root@hoge123:~# 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
allow-hotplug eth0
iface eth0 inet dhcp

- 設定後(赤文字の部分は、変更・追記内容です) -

# 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
allow-hotplug eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
address 192.168.0.10
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1

root@hoge123:~# ifdwon eth0
root@hoge123:~# ifup eth0
root@hoge123:~# ifconfig

下記表示が出れば、ネットワークは正常動作しています。
ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13:20:11:df:9c
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: 2001:a543:4015:0:213:20ff:fe11:df9c/64 Scope:Global
          inet6 addr: fe80::213:20ff:fe11:df9c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7435 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4972 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2992256 (2.8 MiB)  TX bytes:578239 (564.6 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4336 (4.2 KiB)  TX bytes:4336 (4.2 KiB)         
          



- 一般ユーザー追加 -

一般ユーザを追加します。メールサーバを構築したときのメールアカウントにもなります。
   
root@hoge123:~# adduser sample ← sampleと言うアカウントを作成します。
Adding user `sample' ...
Adding new group `sample' (1001) ...
Adding new user `sample' (1001) with group `sample' ...
Creating home directory `/home/sample' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: ← sampleのパスワードを入力します。
Retype new UNIX password: ← sampleのパスワードを再入力します。
passwd: password updated successfully
Changing the user information for sample
Enter the new value, or press ENTER for the default
        Full Name []: ← Enterキーを押します。
        Room Number []: ← Enterキーを押します。
        Work Phone []: ← Enterキーを押します。
        Home Phone []: ← Enterキーを押します。
        Other []: ← Enterキーを押します。
Is the information correct? [Y/n] y ← yキーを押します。





- システムアップデート -

アップデート前に、ダウンロード時、DVDメディアを要求しないようにします。
root@hoge123:~# vi /etc/apt/sources.list

先頭に#を付けて、コメントアウトします。
#deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ - Official amd64 DVD Binary-1 20110205-18:15]/ squeeze contrib main

root@hoge123:~# aptitude -y update
root@hoge123:~# aptitude -y upgrade




- サービス管理ツール -

現在システム上で稼動中のサービス、停止中のサービスの状況確認、停止、開始が出来るツールを インストールします。
   
root@hoge123:~# aptitude -y install sysv-rc-conf
root@hoge123:~# sysv-rc-conf --list

acpid        2:on       3:on    4:on    5:on
bootlogd     S:on
bootlogs     1:on       2:on    3:on    4:on    5:on
console-setu S:on
cron         2:on       3:on    4:on    5:on
halt         0:off
ifupdown     0:off      6:off   S:on
ifupdown-cle S:on
kbd          S:on
keyboard-set S:on
killprocs    1:on
module-init- S:on
mountoverflo S:on
networking   0:off      6:off   S:on
ntp          2:on       3:on    4:on    5:on
procps       S:on
rc.local     2:on       3:on    4:on    5:on
reboot       6:off
rmnologin    2:on       3:on    4:on    5:on
rsyslog      0:off      1:off   2:on    3:on    4:on    5:on    6:off
sendsigs     0:off      6:off
single       1:on
ssh          2:on       3:on    4:on    5:on
stop-bootlog 2:on       3:on    4:on    5:on
stop-bootlog S:on
udev         S:on
udev-mtab    S:on
umountfs     0:off      6:off
umountroot   0:off      6:off
urandom      0:off      6:off   S:on

root@hoge123:~# sysv-rc-conf acpid off ← 停止のサンプル例です。開始するには on にします。



自宅サーバ構築(Debian6)に戻る

Copyright(C) PCDEMAGIC All Rights Reserved.