◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?
[root@A]# uname -a
Linux sentos5.localdomain 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009 i686 i686 i386 GNU/Linux
[root@A]# uname -r
2.6.18-128.el5
[root@A]# uname -m
i686
[root@A]# cat /proc/version
Linux version 2.6.18-128.el5 (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Wed Jan 21 10:44:23 EST 2009
[root@A]# head -4 /usr/src/linux/Makefile
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL =18
EXTRAVERSION = -128.el5
[root@A]# ls /boot/vmlinuz*
/boot/vmlinuz-2.6.18-128.el5
[root@A]# ls -ld /lib/modules/2.6.18-128.el5/kernel/*
drwxr-xr-x 3 root root 4096 羇 2010 /lib/modules/2.6.18-128.el5/kernel/arch
drwxr-xr-x 39 root root 4096 羇 2010 /lib/modules/2.6.18-128.el5/kernel/drivers
drwxr-xr-x 30 root root 4096 羇 2010 /lib/modules/2.6.18-128.el5/kernel/fs
drwxr-xr-x 2 root root 4096 羇 2010 /lib/modules/2.6.18-128.el5/kernel/kernel
drwxr-xr-x 4 root root 4096 羇 2010 /lib/modules/2.6.18-128.el5/kernel/lib
drwxr-xr-x 21 root root 4096 羇 2010 /lib/modules/2.6.18-128.el5/kernel/net
[root@A]# lsmod
Module Size Used by
nfsd 202097 17
exportfs 9665 1 nfsd
lockd 61257 2 nfsd
nfs_acl 7617 1 nfsd
[root@A]# cat /proc/modules
nfsd 202097 17 - Live 0xe0c3a000
exportfs 9665 1 nfsd, Live 0xe0b72000
lockd 61257 2 nfsd, Live 0xe0bf7000
nfs_acl 7617 1 nfsd, Live 0xe0b6f000
auth_rpcgss 43105 1 nfsd, Live 0xe0bd7000
[root@A]# modinfo ext3
filename: /lib/modules/2.6.18-128.el5/kernel/fs/ext3/ext3.ko
license: GPL
description: Second Extended Filesystem with journaling extensions
author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
[root@A]# modinfo -n ext3
/lib/modules/2.6.18-128.el5/kernel/fs/ext3/ext3.ko
[root@A]# modinfo -l ext3
GPL
[root@A]# modinfo -d ext3
Second Extended Filesystem with journaling extensions
[root@A]# modinfo -a ext3
Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
[root@A]# insmod /lib/modules/2.6.18-128.el5/kernel/fs/ext2/ext2.ko
[root@A]# modprobe -c
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptspi
alias scsi_hostadapter2 ata_piix
alias eth0 pcnet32
[root@A]# modprobe -lt fs
/lib/modules/2.6.18-128.el5/kernel/fs/autofs4/autofs4.ko
/lib/modules/2.6.18-128.el5/kernel/fs/cachefiles/cachefiles.ko
/lib/modules/2.6.18-128.el5/kernel/fs/cifs/cifs.ko
[root@A]# modprobe --show-depends ext3
insmod /lib/modules/2.6.18-128.el5/kernel/fs/jbd/jbd.ko
insmod /lib/modules/2.6.18-128.el5/kernel/fs/ext3/ext3.ko
[root@A]# ls /lib/modules/2.6.18-128.el5/modules.dep
/lib/modules/2.6.18-128.el5/modules.dep
[root@A]# cat /etc/modprobe.conf
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptspi
alias scsi_hostadapter2 ata_piix
alias eth0 pcnet32
[root@A]# ls -l /etc/modprobe.d/*
-rw-r--r-- 1 root root 810 羚 2009 /etc/modprobe.d/blacklist
-rw-r--r-- 1 root root 83 羃2 2009 /etc/modprobe.d/blacklist-firewire
-rw-r--r-- 1 root root 6111 羃1 2009 /etc/modprobe.d/modprobe.conf.dist
[root@A]# cat /etc/modprobe.d/modprobe.conf.dist
alias usb-uhci uhci-hcd
alias usb-ohci ohci-hcd
install scsi_hostadapter /bin/true
install usbmouse /sbin/modprobe --first-time --ignore-install usbmouse && { /sbin/modprobe hid; /bin/true; }
remove usbmouse { /sbin/modprobe -r hid; } ; /sbin/modprobe -r --first-time --ignore-remove usbmouse
remove nfsd { /bin/umount /proc/fs/nfsd > /dev/null 2>&1 || :; } ; /sbin/modprobe -r --first-time --ignore-remove nfsd
[root@A]# ls -ld /proc/sys/kernel/*
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/ctrl-alt-del
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/domainname
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/hostname
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/hotplug
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/modprobe
-r--r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/osrelease
-r--r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/ostype
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/sem
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/shmall
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/shmmax
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/shmmni
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/sysrq
-r--r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/tainted
-rw-r--r-- 1 root root 0 羌 17:26 /proc/sys/kernel/threads-max
[root@A]# ls -ld /proc/sys/fs/*
-rw-r--r-- 1 root root 0 羌 17:29 /proc/sys/fs/file-max
-r--r--r-- 1 root root 0 羌 17:29 /proc/sys/fs/file-nr
[root@A]# ls -ld /proc/sys/net/*
dr-xr-xr-x 6 root root 0 羌 17:30 /proc/sys/net/ipv4
dr-xr-xr-x 6 root root 0 羌 17:30 /proc/sys/net/ipv6
[root@A]# ls -ld /proc/sys/net/ipv4/*
-rw-r--r-- 1 root root 0 羌 17:31 /proc/sys/net/ipv4/ip_forward
-rw-r--r-- 1 root root 0 羌 17:31 /proc/sys/net/ipv4/icmp_echo_ignore_all
-rw-r--r-- 1 root root 0 羌 17:31 /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
[root@A]# cat /etc/sysctl.conf
net.ipv4.ip_forward = 0
[root@A]# cat /etc/rc.local
net.ipv4.ip_forward = 0
[root@A]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0
[root@A]# sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
[root@A]# sysctl -a
sunrpc.max_resvport = 1023
sunrpc.min_resvport = 665
sunrpc.tcp_slot_table_entries = 16
COMMENT