サービスの設定2008/08/23 |
[1] | デフォルトで有効になっている不要サービスは停止しておきます。 以下の場所にあるものがこのサイトと同じようにインストールした場合のサービス一覧です。 |
debian:~$ ll /etc/init.d total 256 -rwxr-xr-x 1 root root 1850 2006-01-14 20:12 acpid -rwxr-xr-x 1 root root 969 2006-01-03 16:15 atd -rwxr-xr-x 1 root root 5089 2006-09-20 20:33 bootclean -rwxr-xr-x 1 root root 2146 2006-09-13 06:30 bootlogd -rwxr-xr-x 1 root root 1915 2006-09-20 20:27 bootmisc.sh -rwxr-xr-x 1 root root 2930 2006-09-14 17:20 checkfs.sh -rwxr-xr-x 1 root root 9548 2006-09-23 16:34 checkroot.sh -rwxr-xr-x 1 root root 6110 2006-09-06 01:15 console-screen.sh -rwxr-xr-x 1 root root 1761 2006-10-13 03:55 cron -rwxr-xr-x 1 root root 7104 2007-01-19 02:45 exim4 -rwxr-xr-x 1 root root 5823 2007-02-22 00:13 glibc.sh -rwxr-xr-x 1 root root 1360 2007-01-14 03:52 halt -rwxr-xr-x 1 root root 1287 2006-09-13 06:31 hostname.sh -rwxr-xr-x 1 root root 3886 2007-02-22 02:48 hwclock.sh -rwxr-xr-x 1 root root 2518 2006-09-16 03:03 ifupdown -rwxr-xr-x 1 root root 1046 2006-09-16 03:03 ifupdown-clean -rwxr-xr-x 1 root root 3484 2006-10-16 12:38 keymap.sh -rwxr-xr-x 1 root root 944 2006-09-13 06:31 killprocs -rwxr-xr-x 1 root root 1375 2006-05-25 18:38 klogd -rwxr-xr-x 1 root root 417 2006-08-09 07:38 libdevmapper1.02 -rwxr-xr-x 1 root root 2358 2005-08-02 04:49 lvm -rwxr-xr-x 1 root root 1054 2006-09-07 06:43 makedev -rwxr-xr-x 1 root root 1793 2006-11-14 20:12 module-init-tools -rwxr-xr-x 1 root root 617 2006-01-15 20:04 mountall-bootclean.sh -rwxr-xr-x 1 root root 1718 2006-09-13 06:30 mountall.sh -rwxr-xr-x 1 root root 2206 2006-10-04 03:22 mountdevsubfs.sh -rwxr-xr-x 1 root root 2394 2006-09-25 17:36 mountkernfs.sh -rwxr-xr-x 1 root root 615 2006-01-15 20:04 mountnfs-bootclean.sh -rwxr-xr-x 1 root root 2299 2006-11-26 22:35 mountnfs.sh -rwxr-xr-x 1 root root 3668 2006-11-27 00:13 mtab.sh -rwxr-xr-x 1 root root 2550 2007-01-07 00:36 networking -rwxr-xr-x 1 root root 6644 2007-01-25 20:49 nfs-common -rwxr-xr-x 1 root root 2324 2007-02-26 05:29 openbsd-inetd -rwxr-xr-x 1 root root 1525 2006-12-22 17:15 portmap -rwxr-xr-x 1 root root 997 2006-09-13 10:42 procps.sh -rwxr-xr-x 1 root root 8045 2006-11-28 07:23 rc -rwxr-xr-x 1 root root 798 2006-09-29 02:25 rc.local -rwxr-xr-x 1 root root 117 2005-12-03 02:44 rcS -rw-r--r-- 1 root root 1386 2006-09-13 15:10 README -rwxr-xr-x 1 root root 655 2006-09-22 23:21 reboot -rwxr-xr-x 1 root root 994 2006-09-13 06:30 rmnologin -rwxr-xr-x 1 root root 1376 2006-11-28 07:23 sendsigs -rwxr-xr-x 1 root root 585 2006-09-13 06:32 single -rw-r--r-- 1 root root 4187 2006-09-13 06:32 skeleton -rwxr-xr-x 1 root root 520 2006-09-13 06:26 stop-bootlogd -rwxr-xr-x 1 root root 730 2006-10-03 02:14 stop-bootlogd-single -rwxr-xr-x 1 root root 2037 2006-05-25 18:38 sysklogd -rwxr-xr-x 1 root root 8178 2006-12-19 19:21 udev -rwxr-xr-x 1 root root 1252 2006-03-28 16:44 udev-mtab -rwxr-xr-x 1 root root 3175 2006-11-25 18:22 umountfs -rwxr-xr-x 1 root root 2128 2006-11-27 03:23 umountnfs.sh -rwxr-xr-x 1 root root 1122 2006-09-30 23:37 umountroot -rwxr-xr-x 1 root root 1815 2006-09-13 06:30 urandom |
[2] | ポートをリスンしている不要なサービスを止めます。以下の例では、まず、「portmap」を停止し、 システムの起動時に自動的に立ち上がらないようにしています。 |
debian:~$ sudo netstat -lnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:53062 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN udp 0 0 0.0.0.0:32768 0.0.0.0:* udp 0 0 0.0.0.0:68 0.0.0.0:* udp 0 0 0.0.0.0:746 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name unix 2 [ ACC ] STREAM LISTENING 8044 2615/acpid debian:~$ sudo /etc/init.d/portmap stop Stopping portmap daemon.... debian:~$ sudo update-rc.d -f portmap remove # 自動起動設定削除 Removing any system startup links for /etc/init.d/portmap ... /etc/rc0.d/S32portmap /etc/rc1.d/K81portmap /etc/rc2.d/S18portmap /etc/rc3.d/S18portmap /etc/rc4.d/S18portmap /etc/rc5.d/S18portmap /etc/rc6.d/S32portmap /etc/rcS.d/S43portmap # やっぱり自動起動に入れておく場合は以下のようにする debian:~$ sudo update-rc.d portmap defaults Adding system startup for /etc/init.d/portmap ... /etc/rc0.d/K20portmap -> ../init.d/portmap /etc/rc1.d/K20portmap -> ../init.d/portmap /etc/rc6.d/K20portmap -> ../init.d/portmap /etc/rc2.d/S20portmap -> ../init.d/portmap /etc/rc3.d/S20portmap -> ../init.d/portmap /etc/rc4.d/S20portmap -> ../init.d/portmap /etc/rc5.d/S20portmap -> ../init.d/portmap |
Sponsored Link |
|