kenerl-update.html
by Eiji Inoue
カーネルのアップデート
[inoue@onlsbc1 inoue]$ ls -l /
合計 145
drwxr-xr-x 2 root root 2048 5月 14 2003 bin
drwxr-xr-x 3 root root 1024 5月 14 2003 boot
drwxr-xr-x 20 root root 116736 5月 14 15:06 dev
drwxr-xr-x 25 root root 2048 5月 14 15:06 etc
drwxr-xr-x 5 root root 1024 5月 14 2003 home
drwxr-xr-x 2 root root 1024 6月 22 2001 initrd
drwxr-xr-x 5 root root 3072 5月 14 2003 lib
drwx------ 2 root root 12288 5月 14 2003 lost+found
drwxr-xr-x 3 root root 1024 5月 14 14:07 mnt
drwxr-xr-x 2 root root 1024 8月 24 1999 opt
dr-xr-xr-x 36 root root 0 5月 15 2003 proc
drwxr-xr-x 5 root root 1024 5月 14 15:06 ramfs
drwxr-x--- 2 root root 1024 5月 14 14:09 root
drwxr-xr-x 2 root root 3072 5月 14 2003 sbin
lrwxrwxrwx 1 root root 9 5月 14 14:19 tmp -> ramfs/tmp
drwxr-xr-x 15 root root 1024 5月 14 2003 usr
lrwxrwxrwx 1 root root 9 5月 14 14:19 var -> ramfs/var
[inoue@onlsbc1 inoue]$ df -k
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/hdc1 484602 372747 86833 82% /
none 152188 0 152188 0% /dev/shm
[inoue@onlsbc1 inoue]$ su
Password:
[root@onlsbc1 inoue]# mount onlpara:/home2/onlpara-wrk /mnt
[root@onlsbc1 inoue]# df -k
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/hdc1 484602 372747 86833 82% /
none 152188 0 152188 0% /dev/shm
onlpara:/home2/onlpara-wrk
22659860 649416 20859388 4% /mnt
[root@onlsbc1 inoue]# cd /mnt
[root@onlsbc1 mnt]# ls
harada inoue root yasu
[root@onlsbc1 mnt]# cd inoue
[root@onlsbc1 inoue]# ls
CAMACDebug RMIBench UpdateLogonlsbc2 backup-onlsbc2 j2sdk1.4.1_02 tmp
JNI RedHat8.0 Wrk camac public_html work
JavaRMI RedHat9 backup-onlsbc1 camac0 t5
[root@onlsbc1 inoue]# ls *8.0
Update
[root@onlsbc1 inoue]# cd *8.0
[root@onlsbc1 RedHat8.0]# cd U*
[root@onlsbc1 Update]# ls
kernel-2.4.18-27.8.0.i386.rpm kernel-doc-2.4.18-27.8.0.i386.rpm
kernel-BOOT-2.4.18-27.8.0.i386.rpm kernel-source-2.4.18-27.8.0.i386.rpm
[root@onlsbc1 Update]# ls -l
合計 48632
-rw-r--r-- 1 inoue inoue 12941565 4月 10 08:42 kernel-2.4.18-27.8.0.i3
86.rpm
-rw-r--r-- 1 inoue inoue 6258802 4月 10 08:43 kernel-BOOT-2.4.18-27.8
.0.i386.rpm
-rw-r--r-- 1 inoue inoue 1798095 4月 10 08:43 kernel-doc-2.4.18-27.8.
0.i386.rpm
-rw-r--r-- 1 inoue inoue 28724307 4月 10 08:46 kernel-source-2.4.18-27
.8.0.i386.rpm
[root@onlsbc1 Update]# rpm -Fvh kernel-2.4.18-27.8.0.i386.rpm
警告: kernel-2.4.18-27.8.0.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:kernel ########################################### [100%]
[root@onlsbc1 Update]# rpm -Fvh kernel-BOOT-2.4.18-27.8.0.i386.rpm
警告: kernel-BOOT-2.4.18-27.8.0.i386.rpm: V3 DSA signature: NOKEY, key ID db42a6
0e
[root@onlsbc1 Update]# rpm -Fvh kernel-source-2.4.18-27.8.0.i386.rpm
警告: kernel-source-2.4.18-27.8.0.i386.rpm: V3 DSA signature: NOKEY, key ID db42
a60e
Preparing... ########################################### [100%]
installing package kernel-source-2.4.18-27.8.0 needs 41MB on the / files
ystem
[root@onlsbc1 Update]#
スペースを空けないとアップデートできない。
18 ./njamd-0.9.2
19 ./procinfo-18
22581 .
[root@onlsbc1 doc]# cd ..
[root@onlsbc1 share]# ls
aclocal dict grub info magic.mime pixmaps vim
apps doc gtk-doc locale man ssl zoneinfo
awk empty hwdata magic misc tabset
comps firstboot i18n magic.mgc openldap terminfo
[root@onlsbc1 share]# cd doc
[root@onlsbc1 doc]# rm -rf *
[root@onlsbc1 i386]# pwd
/usr/share/comps/i386
[root@onlsbc1 i386]# ls -l
合計 19712
-rw-r--r-- 1 root root 622587 9月 11 2002 comps.xml
-rw-r--r-- 1 root root 2339328 9月 11 2002 hdlist
-rw-r--r-- 1 root root 17138748 9月 11 2002 hdlist2
[root@onlsbc1 i386]# cp hdlist2 /mnt/root
[root@onlsbc1 i386]# cp hdlist /mnt/root
[root@onlsbc1 i386]# ls -l /mnt/root
合計 19068
-rw-r--r-- 1 65534 65534 2339328 5月 14 17:01 hdlist
-rw-r--r-- 1 65534 65534 17138748 5月 14 16:57 hdlist2
drwxr-xr-x 3 65534 65534 4096 4月 10 14:29 j2sdk1.4.1_02
drwxr-xr-x 17 65534 65534 4096 4月 7 10:06 linux-2.4.18-14
drwxr-xr-x 2 65534 65534 4096 12月 17 16:33 t5
-rw-r--r-- 1 65534 65534 0 4月 7 09:49 t6
[root@onlsbc1 i386]#
[root@onlsbc1 i386]# rm hdlist2
rm: remove regular file `hdlist2'? y
[root@onlsbc1 i386]# rm hdlist
rm: remove regular file `hdlist'? y
[root@onlsbc1 i386]# ls -l
合計 612
-rw-r--r-- 1 root root 622587 9月 11 2002 comps.xml
[root@onlsbc1 i386]# df -k
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/hdc1 484602 329570 130010 72% /
none 152188 0 152188 0% /dev/shm
onlpara:/home2/onlpara-wrk
22659860 668472 20840332 4% /mnt
[root@onlsbc1 i386]# popd
/mnt/inoue/RedHat8.0/Update
[root@onlsbc1 Update]# ls
kernel-2.4.18-27.8.0.i386.rpm kernel-doc-2.4.18-27.8.0.i386.rpm
kernel-BOOT-2.4.18-27.8.0.i386.rpm kernel-source-2.4.18-27.8.0.i386.rpm
[root@onlsbc1 Update]# rpm -Fvh kernel-source-2.4.18-27.8.0.i386.rpm
警告: kernel-source-2.4.18-27.8.0.i386.rpm: V3 DSA signature: NOKEY, key ID db42
a60e
Preparing... ########################################### [100%]
1:kernel-source ########################################### [100%]
[root@onlsbc1 Update]# rpm -Fvh kernel-doc-2.4.18-27.8.0.i386.rpm
警告: kernel-doc-2.4.18-27.8.0.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60
e
[root@onlsbc1 Update]#
[root@onlsbc1 Update]# pushd /usr/share/comps/i386
/usr/share/comps/i386 /mnt/inoue/RedHat8.0/Update
[root@onlsbc1 i386]# ls -l
合計 612
-rw-r--r-- 1 root root 622587 9月 11 2002 comps.xml
[root@onlsbc1 i386]# cp /mnt/root/hdlist .
[root@onlsbc1 i386]# cp /mnt/root/hdlist2 .
[root@onlsbc1 i386]# ls -l
合計 19712
-rw-r--r-- 1 root root 622587 9月 11 2002 comps.xml
-rw-r--r-- 1 root root 2339328 5月 14 17:18 hdlist
-rw-r--r-- 1 root root 17138748 5月 14 17:18 hdlist2
[root@onlsbc1 i386]# df -k
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/hdc1 484602 348357 111223 76% /
none 152188 0 152188 0% /dev/shm
onlpara:/home2/onlpara-wrk
22659860 668472 20840332 4% /mnt
[root@onlsbc1 i386]#
Javaインストール
[root@onlsbc1 usr]# pwd
/usr
[root@onlsbc1 usr]# ls -l
合計 23
drwxr-xr-x 7 root root 1024 5月 14 22:37 X11R6
drwxr-xr-x 2 root root 5120 5月 15 09:10 bin
drwxr-xr-x 2 root root 1024 2月 7 1996 dict
drwxr-xr-x 2 root root 1024 2月 7 1996 etc
drwxr-xr-x 2 root root 1024 2月 7 1996 games
drwxr-xr-x 28 root root 3072 5月 14 22:51 include
drwxr-xr-x 8 root root 1024 5月 14 22:49 kerberos
drwxr-xr-x 15 root root 4096 5月 14 22:58 lib
drwxr-xr-x 4 root root 1024 5月 14 22:46 libexec
drwxr-xr-x 12 root root 1024 5月 14 22:37 local
drwxr-xr-x 2 root root 2048 5月 15 09:20 sbin
drwxr-xr-x 25 root root 1024 5月 14 22:58 share
drwxr-xr-x 3 root root 1024 5月 14 17:14 src
lrwxrwxrwx 1 root root 10 5月 14 22:37 tmp -> ../var/tmp
[root@onlsbc1 usr]#
[root@onlsbc1 usr]# df -k
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/hdc1 484602 348503 111077 76% /
none 152188 0 152188 0% /dev/shm
onlpara:/home2/onlpara-wrk
22659860 709784 20799020 4% /mnt
[root@onlsbc1 usr]# ls -l /mnt/root
合計 60380
-rw-r--r-- 1 65534 65534 2339328 5月 14 17:01 hdlist
-rw-r--r-- 1 65534 65534 17138748 5月 14 16:55 hdlist2
-rw-r--r-- 1 65534 65534 42250657 4月 7 09:35 j2sdk-1_4_1_02-linux-i5
86.bin
drwxr-xr-x 3 65534 65534 4096 4月 10 14:29 j2sdk1.4.1_02
drwxr-xr-x 17 65534 65534 4096 4月 7 10:06 linux-2.4.18-14
drwxr-xr-x 2 65534 65534 4096 12月 17 16:33 t5
-rw-r--r-- 1 65534 65534 0 4月 7 09:49 t6
[root@onlsbc1 usr]#
[root@onlsbc1 usr]# cd /mnt/root
[root@onlsbc1 root]# chmod +x j2sdk-1_4_1_02-linux-i586.bin
[root@onlsbc1 root]# ls -l j2sdk-1_4_1_02-linux-i586.bin
-rwxr-xr-x 1 65534 65534 42250657 4月 7 09:35 j2sdk-1_4_1_02-linux-i5
86.bin
[root@onlsbc1 root]#
[root@onlsbc1 root]# cd /usr
[root@onlsbc1 usr]# ls
X11R6 dict games kerberos libexec sbin src
bin etc include lib local share tmp
[root@onlsbc1 usr]# ln -s /mnt/root/j2sdk-1_4_1_02-linux-i586.bin j2sdk-1_4_1_02
-linux-i586.bin
[root@onlsbc1 usr]#
[root@onlsbc1 usr]# ./j2sdk-1_4_1_02-linux-i586.bin
Sun Microsystems, Inc. Binary Code License Agreement
READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED
SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT")
:
:
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
inflating: j2sdk1.4.1_02/man/ja_JP.eucJP/man1/native2ascii.1
inflating: j2sdk1.4.1_02/man/ja_JP.eucJP/man1/rmic.1
inflating: j2sdk1.4.1_02/man/ja_JP.eucJP/man1/serialver.1
inflating: j2sdk1.4.1_02/man/ja_JP.eucJP/man1/idlj.1
Done.
[root@onlsbc1 usr]#
[root@onlsbc1 usr]# ls
X11R6 etc j2sdk-1_4_1_02-linux-i586.bin lib sbin tmp
bin games j2sdk1.4.1_02 libexec share
dict include kerberos local src
[root@onlsbc1 usr]# rm j2sdk-1_4_1_02-linux-i586.bin
rm: remove シンボリックリンク `j2sdk-1_4_1_02-linux-i586.bin'? y
[root@onlsbc1 usr]#
[root@onlsbc1 usr]# ln -s j2sdk1.4.1_02 java
[root@onlsbc1 usr]# ls -l
合計 24
drwxr-xr-x 7 root root 1024 5月 14 22:37 X11R6
drwxr-xr-x 2 root root 5120 5月 15 09:10 bin
drwxr-xr-x 2 root root 1024 2月 7 1996 dict
drwxr-xr-x 2 root root 1024 2月 7 1996 etc
drwxr-xr-x 2 root root 1024 2月 7 1996 games
drwxr-xr-x 28 root root 3072 5月 14 22:51 include
drwxr-xr-x 9 root root 1024 5月 19 14:56 j2sdk1.4.1_02
lrwxrwxrwx 1 root root 13 5月 19 14:59 java -> j2sdk1.4.1_02
drwxr-xr-x 8 root root 1024 5月 14 22:49 kerberos
drwxr-xr-x 15 root root 4096 5月 14 22:58 lib
drwxr-xr-x 4 root root 1024 5月 14 22:46 libexec
drwxr-xr-x 12 root root 1024 5月 14 22:37 local
drwxr-xr-x 2 root root 2048 5月 15 09:20 sbin
drwxr-xr-x 25 root root 1024 5月 14 22:58 share
drwxr-xr-x 3 root root 1024 5月 14 17:14 src
lrwxrwxrwx 1 root root 10 5月 14 22:37 tmp -> ../var/tmp
[root@onlsbc1 usr]#
[inoue@onlsbc1 inoue]$ pwd
/home/inoue
[inoue@onlsbc1 inoue]$ vi .bashrc
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export PATH=$PATH:/usr/java/bin
~
".bashrc" 10L, 157C written
[inoue@onlsbc1 inoue]$
[inoue@onlsbc1 inoue]$ source .bashrc
[inoue@onlsbc1 inoue]$ java -version
[inoue@onlsbc1 inoue]$ java -version
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
[inoue@onlsbc1 inoue]$
sudo のコピー
[root@onlsbc1 bin]# df -k
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/hdc1 484602 430152 29428 94% /
none 152188 0 152188 0% /dev/shm
/dev/hda3 10080520 3968504 5599948 42% /mnt
[root@onlsbc1 bin]# ls -l /mnt/bin/sudo
---s--x--x 1 root root 84984 6月 28 2002 /mnt/bin/sudo
[root@onlsbc1 bin]# pwd
/usr/bin
[root@onlsbc1 bin]# ls sudo
ls: sudo: そのようなファイルやディレクトリはありません
[root@onlsbc1 bin]# cp /mnt/bin/sudo .
[root@onlsbc1 bin]# ls -l sudo
---s--x--x 1 root root 84984 5月 15 09:10 sudo
[root@onlsbc1 bin]#
[inoue@onlsbc1 inoue]$ sudo -u root /root
sudo: can't stat /etc/sudoers: No such file or directory
[inoue@onlsbc1 inoue]$
[root@onlsbc1 inoue]# umount /mnt
[root@onlsbc1 inoue]# mount -t ext3 /dev/hda5 /mnt
[root@onlsbc1 inoue]# ls -l /mnt/etc/sudoers
-r--r----- 1 root root 580 6月 28 2002 /mnt/etc/sudoers
[root@onlsbc1 inoue]# cp /mnt/etc/sudoers /etc
[root@onlsbc1 inoue]# ls -l /etc/sudoers
-r--r----- 1 root root 580 5月 15 09:13 /etc/sudoers
[root@onlsbc1 inoue]#
[root@onlsbc1 inoue]# cat /etc/sudoers
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
[root@onlsbc1 inoue]#
[inoue@harry inoue]$ ls /usr/sbin/visudo
/usr/sbin/visudo
[inoue@harry inoue]$ ls -l /usr/sbin/visudo
-rwxr-xr-x 1 root root 55916 4月 23 2002 /usr/sbin/visudo
[inoue@harry inoue]$
[root@onlsbc1 root]# umount /mnt
[root@onlsbc1 root]# mount -t ext3 /dev/hda3 /mnt
[root@onlsbc1 root]# ls -l /mnt/sbin/visudo
-rwxr-xr-x 1 root root 55832 6月 28 2002 /mnt/sbin/visudo
[root@onlsbc1 root]#
[root@onlsbc1 sbin]# pwd
/usr/sbin
[root@onlsbc1 sbin]# ls
adduser iconvconfig ping6 suexec
alternatives kbdrate pmap_dump sys-unconfig
apachectl kudzu pmap_set tracepath
arping lchage pwck tracepath6
authconfig lgroupadd pwconv traceroute6
build-locale-archive lgroupdel pwunconv tunelp
chpasswd lgroupmod ramsize update-alternatives
chroot lid rdev updfstab
clockdiff lnewusers rdisc useradd
dbconverter-2 lpasswd readprofile userdel
glibc_post_upgrade luseradd rootflags userhelper
groupadd luserdel rotatelogs usermod
groupdel lusermod rpcinfo usernetctl
groupmod mkdict rtacct vidmode
grpck mklost+found saslauthd vigr
grpconv mksock sasldblistusers vipw
grpunconv module_upgrade sasldblistusers2 zdump
hotplugctl mouseconfig saslpasswd zic
httpd newusers saslpasswd2
hwclock packer sshd
[root@onlsbc1 sbin]#
[root@onlsbc1 sbin]# cp /mnt/sbin/visudo .
[root@onlsbc1 sbin]# ls -l visudo
-rwxr-xr-x 1 root root 55832 5月 15 09:20 visudo
[root@onlsbc1 sbin]#