2007年10月アーカイブ
以下のオプション無で,64bit Linuxでconfigureするとconfig.subでエラーに なったので,GCCのオプションで64bit用のオプション付けてCPUの種類 教えてあげてconfigureしました。
Apache Download Site
http://httpd.apache.org/download.cgi
http://ftp.riken.jp/net/apache/httpd/httpd-2.2.6.tar.gz1 ) Configure./configure CFLAGS="-DRECORD_FORWARD -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \--enable-rewrite --enable-proxy --enable-proxy-balancer \ --enable-expires --enable-headers --enable-so --with-included-apr \ --with-mpm=worker --prefix=/usr/local/apache2_2_62) Make3) Make install4) ln -s /usr/local/apache2_2_6 /usr/local/apache5) /etc/init.d/httpd起動スクリプト作成。6) chkconfig httpd on64bitのapacheはまだ不安だし,必要性もそれ程ないので本番では利用するのは暫くしない。MYSQLであればメモリーやLarge Fileの扱いがあるのと事例が多いので良いかな。
shutdownコマンドに-kオプションをつけると,ターミナルを利用している他のユーザーに
メンテナンスのアナウンスを送る事が出来る。
[root@localhost ~]# /sbin/shutdown -r 1 -k "I will reboot this machine for maintenance,Please log out within 1min"
Broadcast message from root (pts/0) (Sun Oct 21 00:00:35 2007):
I will reboot this machine for maintenance,Please log out within 1min
The system is going DOWN for reboot in 1 minute!
Broadcast message from root (pts/0) (Sun Oct 21 00:01:35 2007):
I will reboot this machine for maintenance,Please log out within 1min
The system is going down for reboot NOW!
Shutdown cancelled.
ランレベル別のディレクトリ(/etc/rc.d/rc*.d)にあるファイル(実際には各プログラムの起動スクリプトへのリンク)の名前により、各ランレベルで実行するプログラムを指定している。
0 停止
1 シングルユーザーモード
2 マルチユーザーモード(テキストログイン,Network無し)
3 通常のマルチユーザーモード(テキストログイン)
4 未使用
5 マルチユーザーモード(グラフィカルログイン)
6 再起動
S シングルユーザーモード(/etc/rc.d/rc.sysinitを実行)
[root@localhost ~]# ls -l /etc/rc.d/rc.sysinit
-rwxr-xr-x 1 root root 26613 3月 22 2007 /etc/rc.d/rc.sysinit
[root@localhost ~]#
「S」はStart
「K」はKill
KやSに続く数字は、実行されるスクリプトの優先順位だ。数字の小さいスクリプトから順に実行される。
Webサービス等の起動ファイルが/etc/init.d/に配置されていて,/etc/rc*.d以下のファイルはシンボリックリンクに設定。
chkconfigでも設定確認できる。(RH系ディストリビューション)
[root@localhost ~]# /sbin/chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost ~]#
[root@localhost ~]# runlevel
N 3 ←現在のRun Level
[root@localhost ~]#
※ランレベルの変更をするには,initコマンドもしくはtelinitコマンドを利用します。(左は前のランレベル"N")
※rootのパスワードを忘れた場合でも,シングルユーザーモードではログイン無しでシステム利用出来るので,
パスワードの再設定を行う事が出来ます。パスワードを必要とするディストリビューションもあります。
またパスワードを必要とするように設定する事も出来る。
※ディフォルトランレベル
[root@localhost ~]# cat /etc/inittab
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit
システム起動時のカーネルが出力するメッセージ確認。
[root@localhost ~]# /sbin/parted
GNU Parted 1.6.19
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
/dev/sda を使用
(parted)
(parted) print
/dev/sdaの Disk geometry: 0.000-69376.000 メガバイト
ディスクラベルの種類: msdos
マイナー 開始 終了 種類 ファイルシステム フラグ
1 0.031 39.221 プライマリ fat16
2 39.221 42711.877 プライマリ ext2
3 42711.877 43213.908 プライマリ ext3 boot
4 43213.909 69374.443 拡張
5 43213.939 69374.443 論理 lvm
(parted) q
通知: 必要であれば /etc/fstab を更新するのを忘れないようにしてください。
[root@localhost ~]# /sbin/sfdisk -l /dev/sda
ディスク /dev/sda: シリンダ数 8844、ヘッド数 255、63 セクタ/トラック
ユニット = 8225280 バイトのシリンダ、1024 バイトのブロック、0 から数えます
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 4 5- 40131 de Dell ユーティリティ
/dev/sda2 5 5444 5440 43696800 83 Linux
/dev/sda3 * 5445 5508 64 514080 83 Linux
/dev/sda4 5509 8843 3335 26788387+ 5 拡張領域
/dev/sda5 5509+ 8843 3335- 26788356 8e Linux LVM
[root@localhost ~]# /sbin/sfdisk -l /dev/sdb
ディスク /dev/sdb: シリンダ数 8844、ヘッド数 255、63 セクタ/トラック
ユニット = 8225280 バイトのシリンダ、1024 バイトのブロック、0 から数えます
Device Boot Start End #cyls #blocks Id System
/dev/sdb1 0 - 0 0 0 空
/dev/sdb2 0 - 0 0 0 空
/dev/sdb3 0 - 0 0 0 空
/dev/sdb4 0 - 0 0 0 空
[root@localhost ~]#
[root@localhost ~]# /sbin/parted
GNU Parted 1.6.19
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
/dev/sda を使用
(parted) print
/dev/sdaの Disk geometry: 0.000-69376.000 メガバイト
ディスクラベルの種類: msdos
マイナー 開始 終了 種類 ファイルシステム フラグ
1 0.031 39.221 プライマリ fat16
2 39.221 42711.877 プライマリ ext2
3 42711.877 43213.908 プライマリ ext3 boot
4 43213.909 69374.443 拡張
5 43213.939 69374.443 論理 lvm
(parted) select /dev/sdb
/dev/sdb を使用
(parted) print
/dev/sdbの Disk geometry: 0.000-69376.000 メガバイト
ディスクラベルの種類: msdos
マイナー 開始 終了 種類 ファイルシステム フラグ
(parted) q
通知: 必要であれば /etc/fstab を更新するのを忘れないようにしてください。
[root@localhost ~]# /sbin/fdisk /dev/sdb
このディスクのシリンダ数は 8844 に設定されています。
間違いではないのですが、1024 を超えているため、以下の場合
に問題を生じうる事を確認しましょう:
1) ブート時に実行するソフトウェア (例. バージョンが古い LILO)
2) 別の OS のブートやパーティション作成ソフト
(例. DOS FDISK, OS/2 FDISK)
コマンド (m でヘルプ): p
Disk /dev/sdb: 72.7 GB, 72746008576 bytes
255 heads, 63 sectors/track, 8844 cylinders
Units = シリンダ数 of 16065 * 512 = 8225280 bytes
デバイス Boot Start End Blocks Id System
コマンド (m でヘルプ): n
コマンドアクション
e 拡張
p 基本領域 (1-4)
p
領域番号 (1-4): 1
最初 シリンダ (1-8844, default 1):
Using default value 1
終点 シリンダ または +サイズ または +サイズM または +サイズK (1-8844, default 8844): 4422
コマンド (m でヘルプ): p
Disk /dev/sdb: 72.7 GB, 72746008576 bytes
255 heads, 63 sectors/track, 8844 cylinders
Units = シリンダ数 of 16065 * 512 = 8225280 bytes
デバイス Boot Start End Blocks Id System
/dev/sdb1 1 4422 35519683+ 83 Linux
コマンド (m でヘルプ): n
コマンドアクション
e 拡張
p 基本領域 (1-4)
p
領域番号 (1-4): 2
最初 シリンダ (4423-8844, default 4423):
Using default value 4423
終点 シリンダ または +サイズ または +サイズM または +サイズK (4423-8844, default 8844):
Using default value 8844
コマンド (m でヘルプ): p
Disk /dev/sdb: 72.7 GB, 72746008576 bytes
255 heads, 63 sectors/track, 8844 cylinders
Units = シリンダ数 of 16065 * 512 = 8225280 bytes
デバイス Boot Start End Blocks Id System
/dev/sdb1 1 4422 35519683+ 83 Linux
/dev/sdb2 4423 8844 35519715 83 Linux
コマンド (m でヘルプ): w
領域テーブルは交換されました!
ioctl() を呼び出して領域テーブルを再読込みします。
ディスクを同期させます。
[root@localhost ~]#
[root@localhost ~]# /sbin/fdisk /dev/sdb
このディスクのシリンダ数は 8844 に設定されています。
間違いではないのですが、1024 を超えているため、以下の場合
に問題を生じうる事を確認しましょう:
1) ブート時に実行するソフトウェア (例. バージョンが古い LILO)
2) 別の OS のブートやパーティション作成ソフト
(例. DOS FDISK, OS/2 FDISK)
コマンド (m でヘルプ): p
Disk /dev/sdb: 72.7 GB, 72746008576 bytes
255 heads, 63 sectors/track, 8844 cylinders
Units = シリンダ数 of 16065 * 512 = 8225280 bytes
デバイス Boot Start End Blocks Id System
/dev/sdb1 1 4422 35519683+ 83 Linux
/dev/sdb2 4423 8844 35519715 83 Linux
コマンド (m でヘルプ): q
[root@localhost ~]# /sbin/mke2fs -j /dev/sdb1
mke2fs 1.35 (28-Feb-2004)
max_blocks 4294967295, rsv_groups = 0, rsv_gdb = 1024
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4440064 inodes, 8879920 blocks
443996 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=12582912
271 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Writing inode tables: done
inode.i_blocks = 98312, i_size = 4243456
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# /sbin/mke2fs -j /dev/sdb2
mke2fs 1.35 (28-Feb-2004)
max_blocks 4294967295, rsv_groups = 0, rsv_gdb = 1024
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4440064 inodes, 8879928 blocks
443996 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=12582912
271 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Writing inode tables: done
inode.i_blocks = 98312, i_size = 4243456
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# /sbin/parted
GNU Parted 1.6.19
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
/dev/sda を使用
(parted) p
/dev/sdaの Disk geometry: 0.000-69376.000 メガバイト
ディスクラベルの種類: msdos
マイナー 開始 終了 種類 ファイルシステム フラグ
1 0.031 39.221 プライマリ fat16
2 39.221 42711.877 プライマリ ext2
3 42711.877 43213.908 プライマリ ext3 boot
4 43213.909 69374.443 拡張
5 43213.939 69374.443 論理 lvm
(parted) select /dev/sdb
/dev/sdb を使用
(parted) p
/dev/sdbの Disk geometry: 0.000-69376.000 メガバイト
ディスクラベルの種類: msdos
マイナー 開始 終了 種類 ファイルシステム フラグ
1 0.031 34687.221 プライマリ ext3
2 34687.222 69374.443 プライマリ ext3
(parted)
[root@localhost ~]# /sbin/e2label /dev/sdb1 /log
[root@localhost ~]# /sbin/e2fsck /dev/sdb1
e2fsck 1.35 (28-Feb-2004)
/log: clean, 11/4440064 files, 159802/8879920 blocks
[root@localhost /]# mkdir /log
[root@localhost /]# df
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/mapper/VolGroup_ID-LogVol1 1999696 436308 1461808 23% /
/dev/sda3 497861 19101 453056 5% /boot
none 4082788 0 4082788 0% /dev/shm
/dev/mapper/VolGroup_ID-LogVol4 10063176 3085440 6466556 33% /usr
/dev/mapper/VolGroup_ID-LogVol3 10063176 166840 9385156 2% /var
/dev/mapper/VolGroup_ID-LogVolHome 42994184 190552 40619648 1% /home
[root@localhost /]#
※FSTABに以下のように起動時にマウントさせるように設定。
# sdb Mount
LABEL=/log /log ext3 defaults 1 2
[root@localhost /]# /bin/mount -a
[root@localhost /]# df -h
Filesystem サイズ 使用 残り 使用% マウント位置
/dev/mapper/VolGroup_ID-LogVol1 2.0G 427M 1.4G 23% /
/dev/sda3 487M 19M 443M 5% /boot
none 3.9G 0 3.9G 0% /dev/shm
/dev/mapper/VolGroup_ID-LogVol4 9.6G 3.0G 6.2G 33% /usr
/dev/mapper/VolGroup_ID-LogVol3 9.6G 163M 9.0G 2% /var
/dev/mapper/VolGroup_ID-LogVolHome 42G 187M 39G 1% /home
/dev/sdb1 34G 80M 32G 1% /log
[root@localhost ~]# ls -l /usr/src/redhat/
合計 40
drwxr-xr-x 2 root root 4096 3月 15 2007 BUILD
drwxr-xr-x 8 root root 4096 10月 5 04:01 RPMS
drwxr-xr-x 2 root root 4096 10月 14 05:25 SOURCES
drwxr-xr-x 2 root root 4096 10月 14 05:25 SPECS
drwxr-xr-x 2 root root 4096 3月 15 2007 SRPMS
[root@localhost ~]# ls -l /usr/src/kernels/
合計 8
drwxr-xr-x 18 root root 4096 10月 5 04:03 2.6.18-8.el5-i686
[root@localhost ~]# yum update kernel
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for kernel to pack into transaction set.
kernel-2.6.18-8.1.14.el5. 100% |=========================| 205 kB 00:00
---> Package kernel.i686 0:2.6.18-8.1.14.el5 set to be installed
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kernel i686 2.6.18-8.1.14.el5 updates 12 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): kernel-2.6.18-8.1. 100% |=========================| 12 MB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: kernel ######################### [1/1]
Installed: kernel.i686 0:2.6.18-8.1.14.el5
Complete!
[root@localhost ~]# ls -l /usr/src/kernels/
合計 8
drwxr-xr-x 18 root root 4096 10月 5 04:03 2.6.18-8.el5-i686
[root@localhost ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-8.1.14.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.1.14.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-8.1.14.el5.img
title CentOS (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-8.el5.img
[root@localhost ~]# ls -l /usr/src/kernels/
合計 8
drwxr-xr-x 18 root root 4096 10月 5 04:03 2.6.18-8.el5-i686
[root@localhost ~]#
[root@localhost 2.6.18-8.el5-i686]# make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
HOSTCC scripts/kconfig/mconf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/mconf
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/lxdialog.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/msgbox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTLD scripts/kconfig/lxdialog/lxdialog
scripts/kconfig/mconf arch/i386/Kconfig
関連コマンド:
make config
make menuconfig
make xconfig
make dep
make clean
make bzImage
make zImage
make modules
make modules_install
modinfo
modprobe
rmmod
※make modules_installでカーネルモジュールをインストールする先。
[root@localhost ~]# ls -l /lib/modules/カーネルバージョン/
合計 16
drwxr-xr-x 6 root root 4096 10月 14 22:52 2.6.18-8.1.14.el5
drwxr-xr-x 6 root root 4096 10月 5 03:54 2.6.18-8.el5
[root@localhost ~]#
[root@localhost ~]# ls -l /lib/modules/2.6.18-8.1.14.el5/
合計 1120
lrwxrwxrwx 1 root root 47 10月 14 22:51 build -> ../../../usr/src/kernels/2.6.18-8.1.14.el5-i686
drwxr-xr-x 2 root root 4096 9月 28 08:41 extra
drwxr-xr-x 9 root root 4096 10月 14 22:51 kernel
-rw-r--r-- 1 root root 236055 10月 14 22:52 modules.alias
-rw-r--r-- 1 root root 69 10月 14 22:52 modules.ccwmap
-rw-r--r-- 1 root root 195218 10月 14 22:52 modules.dep
-rw-r--r-- 1 root root 73 10月 14 22:52 modules.ieee1394map
-rw-r--r-- 1 root root 375 10月 14 22:52 modules.inputmap
-rw-r--r-- 1 root root 2160 10月 14 22:52 modules.isapnpmap
-rw-r--r-- 1 root root 74 10月 14 22:52 modules.ofmap
-rw-r--r-- 1 root root 164718 10月 14 22:52 modules.pcimap
-rw-r--r-- 1 root root 589 10月 14 22:52 modules.seriomap
-rw-r--r-- 1 root root 91187 10月 14 22:52 modules.symbols
-rw-r--r-- 1 root root 319111 10月 14 22:52 modules.usbmap
lrwxrwxrwx 1 root root 5 10月 14 22:51 source -> build
drwxr-xr-x 2 root root 4096 9月 28 08:41 updates
drwxr-xr-x 2 root root 4096 9月 28 08:41 weak-updates
[root@localhost ~]#
※Can't find modulesというエラーになった場合,make modules_installを
行っているか確認。(/lib/modules/カーネルバージョン/以下)にインストールする。
※ディストリブーションによってパスも変わるので,注意。
━━━━━━━ カーネル.configファイルの設定━━━━━━━━
[root@localhost 2.6.18-8.el5-i686]# pwd
/usr/src/kernels/2.6.18-8.el5-i686
[root@localhost 2.6.18-8.el5-i686]# head .config
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.18-8.el5
# Thu Mar 15 19:51:27 2007
#
CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
[root@localhost 2.6.18-8.el5-i686]#
■事前確認
./configure \
--enable-rewrite \
--enable-so \
--enable-ssl \
--enable-dav \
--enable-dav-fs \
--enable-suexec \
--enable-cache \
--enable-disk-cache \
--enable-mem-cache \
--enable-webdav=true \
--with-suexec-docroot=/home/www \
--with-included-apr \
--with-apxs=/usr/local/apache2/bin/apxs \
--with-suexec-caller=apache
■SVNダウンロード
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&expandFolder=74
http://subversion.tigris.org/downloads/subversion-1.4.5.tar.gz
[root@localhost subversion]# wget http://subversion.tigris.org/downloads/subversion-1.4.5.tar.gz
--18:49:43-- http://subversion.tigris.org/downloads/subversion-1.4.5.tar.gz
subversion.tigris.org をDNSに問いあわせています... 204.16.104.146
subversion.tigris.org|204.16.104.146|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 6317665 (6.0M) [application/x-gzip]
Saving to: `subversion-1.4.5.tar.gz'
100%[==============================================================================================>] 6,317,665 564K/s in 12s
18:49:55 (503 KB/s) - `subversion-1.4.5.tar.gz' を保存しました [6317665/6317665]
[root@localhost subversion]#
■インストール
[root@localhost subversion]# tar zxvf subversion-1.4.5.tar.gz
[root@localhost subversion]# cd subversion-1.4.5
[root@localhost subversion]#./configure
[root@localhost subversion-1.4.5]# make
[root@localhost subversion-1.4.5]# make install
■モジュールの確認
[root@localhost subversion-1.4.5]# ls /usr/local/apache2/modules/
httpd.exp libphp5.so mod_authz_svn.so mod_dav_svn.so mod_fastcgi.so
[root@localhost subversion-1.4.5]#
■リポジトリー作成
[root@localhost subversion]# mkdir repository
[root@localhost subversion]# svnadmin create /home/subversion/repository
[root@localhost subversion]# chown -R apache:apache /home/subversion/repository
[root@localhost subversion]#
■テスト
[root@localhost variable]# svn import http://localhost --message 'Initial repository layout'
svn: 'http' 用 RA のバージョンが一致しません: 実際 1.4.5, 期待 1.4.2
[root@localhost variable]#
■AUTHファイル作成
[root@localhost conf]# /usr/local/apache2/bin/htpasswd -c svn-auth-file admin
New password:
Re-type new password:
Adding password for user admin
[root@localhost conf]#
■httpd.confの設定変更
#Suversion
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNPath /home/subversion/repository
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /usr/local/apache2/conf/svn-auth-file
Require valid-user
</Location>
apacheを再起動して最後の設定確認。
昨日インストールしたPHPの設定とエラーの確認続き。
①まずは現状を確認する為,PHPINFO()を作成して確認。
[root@localhost htdocs]# vi phpinfo.php
<?
phpinfo();
?>
確認してみるとphp.iniを作成していなかった事を思い出したので,php.iniの作成。
[root@localhost php-5.2.4]# cp php.ini-recommended /etc/php.ini
[root@localhost php-5.2.4]# vi /etc/php.ini
expose_php = Off
display_errors = Off
register_globals = Off

Make Testの時のエラー再度確認。
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
libgd #106 (imagerectangle 1x1 draws 1x3) [ext/gd/tests/libgd00106.phpt]
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15) [ext/standard/tests/strings/htmlentities02.phpt] (warn: possibly braindead libc)
htmlentities() test 4 (setlocale / ja_JP.EUC-JP) [ext/standard/tests/strings/htmlentities04.phpt]
htmlentities() test 15 (setlocale / KOI8-R) [ext/standard/tests/strings/htmlentities15.phpt]
=====================================================================
■画像関係と,文字コード関係のエラーなので画像を扱うシステムのインストール及び設定などを確認。
[root@localhost src]# yum install gd gd-devel libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel
[root@localhost php-5.2.4]# rpm -q -i gd
Name : gd Relocations: (not relocatable)
Version : 2.0.33 Vendor: CentOS
Release : 9.3.fc6 Build Date: 2007年01月07日 14時28分32秒
Install Date: 2007年10月05日 03時41分22秒 Build Host: builder5.centos.org
Group : System Environment/Libraries Source RPM: gd-2.0.33-9.3.fc6.src.rpm
Size : 565742 License: BSD-style
Signature : DSA/SHA1, 2007年04月04日 09時22分06秒, Key ID a8a447dce8562897
URL : http://www.boutell.com/gd/
Summary : PNG や JPEG 画像を高速作成するためのグラフィックライブラリ
Description :
gd グラフィックライブラリを使用すると、線、円弧、
テキスト、複数色、ほかの画像からのカットアンドペースト、塗りつぶし
を使用して高速で描画し、その結果を PNG や JPEG ファイルに書き出すことが できます。
特に Web アプリケーションでは一般的にインライン画像の PNG および JPEG 形式が
使用されるため、gd グラフィックライブラリは便利です。gd はペイント
やグラフィックスの操作プログラムでないことに注意してください。
[root@localhost php-5.2.4]# rpm -q -l gd
/usr/lib/libgd.so.2
/usr/lib/libgd.so.2.0.0
/usr/share/doc/gd-2.0.33
/usr/share/doc/gd-2.0.33/COPYING
/usr/share/doc/gd-2.0.33/README-JPEG.TXT
/usr/share/doc/gd-2.0.33/entities.html
/usr/share/doc/gd-2.0.33/index.html
[root@localhost php-5.2.4]#
[root@localhost php-5.2.4]# gdlib-config --all
GD library 2.0.33
includedir: /usr/include
cflags: -I/usr/include
ldflags: -L/usr/lib
libs: -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm
libdir: /usr/lib
features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF
[root@localhost php-5.2.4]#
ん~ インストールされているのにエラーは何でだろうか。眠いので明日しらべよ。
画像やEXIFを利用したサイトを利用したいので,PHPのインストールオプションを以下のように設定
してインストールしてみた。モジュールが足りないやオプションを間違えている等の部分はあったが
結果的にはインストール出来たので忘れないように,備忘録に記入。
=================画像系のライブラリーを扱う為の事前準備==================
[root@localhost ~]# yum -y install flex libxml2-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 315 kB 00:00
updates : ################################################## 723/723
Added 4 new packages, deleted 0 old in 3.93 seconds
Parsing package install arguments
Nothing to do
[root@localhost ~]# yum -y install zlib-devel libpng-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libpng-devel to pack into transaction set.
libpng-devel-1.2.10-7.0.2 100% |=========================| 11 kB 00:00
---> Package libpng-devel.i386 2:1.2.10-7.0.2 set to be updated
--> Running transaction check
--> Processing Dependency: libpng = 2:1.2.10-7.0.2 for package: libpng-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libpng to pack into transaction set.
libpng-1.2.10-7.0.2.i386. 100% |=========================| 11 kB 00:00
---> Package libpng.i386 2:1.2.10-7.0.2 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libpng-devel i386 2:1.2.10-7.0.2 updates 182 k
Updating for dependencies:
libpng i386 2:1.2.10-7.0.2 updates 241 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 423 k
Downloading Packages:
(1/2): libpng-devel-1.2.1 100% |=========================| 182 kB 00:00
(2/2): libpng-1.2.10-7.0. 100% |=========================| 241 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libpng ######################### [1/3]
Installing: libpng-devel ######################### [2/3]
Cleanup : libpng ######################### [3/3]
Installed: libpng-devel.i386 2:1.2.10-7.0.2
Dependency Updated: libpng.i386 2:1.2.10-7.0.2
Complete!
[root@localhost ~]# yum -y install libjpeg-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libjpeg-devel to pack into transaction set.
libjpeg-devel-6b-37.i386. 100% |=========================| 6.3 kB 00:00
---> Package libjpeg-devel.i386 0:6b-37 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libjpeg-devel i386 6b-37 base 105 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 105 k
Downloading Packages:
(1/1): libjpeg-devel-6b-3 100% |=========================| 105 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libjpeg-devel ######################### [1/1]
Installed: libjpeg-devel.i386 0:6b-37
Complete!
[root@localhost ~]#
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# ls
[root@localhost src]# wget http://jp.php.net/get/php-5.2.4.tar.gz/from/this/mirror
--01:00:34-- http://jp.php.net/get/php-5.2.4.tar.gz/from/this/mirror
jp.php.net をDNSに問いあわせています... 61.195.146.164
jp.php.net|61.195.146.164|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 302 Found
場所: http://jp.php.net/distributions/php-5.2.4.tar.gz [続く]
--01:00:34-- http://jp.php.net/distributions/php-5.2.4.tar.gz
jp.php.net|61.195.146.164|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 9705468 (9.3M) [application/x-gzip]
Saving to: `php-5.2.4.tar.gz'
100%[============================================================================>] 9,705,468 4.47M/s in 2.1s
01:00:37 (4.47 MB/s) - `php-5.2.4.tar.gz' を保存しました [9705468/9705468]
[root@localhost src]#
[root@localhost src]# tar -xzvf php-5.2.4.tar.gz
[root@localhost php-5.2.4]# ./configure \
> --prefix=/usr/local/php-5.2.4 \
> --with-apxs2=/usr/local/apache2/bin/apxs \
> --with-config-file-path=/usr/local/php-5.2.4/lib/ \
> --with-gd \
> --with-jpeg-dir=/usr/local \
> --with-png-dir=/usr/local \
> --with-gd \
> --with-zlib \
> --with-zlib-dir=/usr/local \
> --with-xml \
> --with-openssl \
> --with-config-file-path=/etc \
> --with-libmbfl \
> --with-mcrypt \
> --with-mime-magic \
> --with-mysql \
> --enable-pcntl \
> --enable-trans-sid \
> --enable-zend-multibyte \
> --enable-mbstr-enc-trans \
> --enable-mbstring \
> --enable-mbregex \
> --enable-gd-native-ttf \
> --enable-gd-jis-conv \
> --enable-exif
creating cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type...
===================その他オプションメモ書き===================
--enable-module=all
モジュールをすべて有効に
--enable-shared=max
DSO(Dynamic Shared Object)のサポート。PHPをインストールする際に必要
--with-apxs=/usr/local/apache/bin/apxs
DSOを利用するために、apxsコマンドのパスを指定
--with-mysql
PHPからMySQLを操作するための指定。MySQLを/usr/localや/usrなどではない場所に
インストールしている場合は、パスの指定が必要(例:--with-mysql=/home/mysql)
=========================================================
configure: error: mcrypt.h not found. Please reinstall libmcrypt. <------- libmcryptが無い!!
[root@localhost php-5.2.4]#
[root@localhost php-5.2.4]# yum install libmcrypt
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libmcrypt to pack into transaction set.
libmcrypt-2.5.7-5.el5.cen 100% |=========================| 3.8 kB 00:00
---> Package libmcrypt.i386 0:2.5.7-5.el5.centos set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libmcrypt i386 2.5.7-5.el5.centos extras 123 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 123 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): libmcrypt-2.5.7-5. 100% |=========================| 123 kB 00:15
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libmcrypt ######################### [1/1]
Installed: libmcrypt.i386 0:2.5.7-5.el5.centos
Complete!
[root@localhost php-5.2.4]#
checking for mcrypt support... yes
configure: error: mcrypt.h not found. Please reinstall libmcrypt. <----まだ無いと言われる。
[root@localhost php-5.2.4]# yum install libmcrypt-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libmcrypt-devel to pack into transaction set.
libmcrypt-devel-2.5.7-5.e 100% |=========================| 3.2 kB 00:00
---> Package libmcrypt-devel.i386 0:2.5.7-5.el5.centos set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libmcrypt-devel i386 2.5.7-5.el5.centos extras 103 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 103 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): libmcrypt-devel-2. 100% |=========================| 103 kB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libmcrypt-devel ######################### [1/1]
Installed: libmcrypt-devel.i386 0:2.5.7-5.el5.centos
Complete!
[root@localhost php-5.2.4]#
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
↑
MYSQL5.0.45をSourceから入れたので開発ライブラリーが無い。
[root@localhost src]# wget ftp://ftp.pbone.net/mirror/dev.mysql.com/pub/Downloads/MySQL-5.0/MySQL-devel-5.0.45-0.glibc23.i386.rpm
[root@localhost src]# rpm -ivh MySQL-devel-5.0.45-0.glibc23.i386.rpm
準備中... ########################################### [100%]
1:MySQL-devel ########################################### [100%]
[root@localhost src]# ./configure \
--prefix=/usr/local/php-5.2.4 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/usr/local/php-5.2.4/lib/ \
--with-gd \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-gd \
--with-zlib \
--with-zlib-dir=/usr/local \
--with-xml \
--with-openssl \
--with-config-file-path=/etc \
--with-libmbfl \
--with-mcrypt \
--with-mime-magic \
--with-mysql \
--enable-pcntl \
--enable-trans-sid \
--enable-zend-multibyte \
--enable-mbstr-enc-trans \
--enable-mbstring \
--enable-mbregex \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--enable-exif
-----省略-------
Generating files
updating cache ./config.cache
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating main/php_config.h
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
Notice: Following unknown configure options were used:
--with-xml
(ここに答えがありました:http://www.thinkit.co.jp/free/marugoto/1/5/3/1.html)
--enable-trans-sid
(--enable-trans-idの間違え)
--enable-mbstr-enc-trans
(PHP 4.3.0 以降、このオプション --enable-mbstr-enc-trans は廃止で実行時の設定 mbstring.encoding_translationにに変更)
Check './configure --help' for available options
[root@localhost php-5.2.4]#
とりあえず,オプションのミスはあったもののconfigureは成功3つ程オプションが無視されたが,緊急で必要では
ないので,次回ちゃんとオプションを直して再度,make cleanしてconfigureする事とする。
[root@localhost php-5.2.4]# make
gcc: /usr/lib/mysql/libmysqlclient.so: No such file or directory
make: *** [libphp5.la] エラー 1
[root@localhost src]# wget ftp://ftp.pbone.net/mirror/dev.mysql.com/pub/Downloads/MySQL-5.0/MySQL-client-community-5.0.45-0.sles10.i586.rpm
--02:37:26-- ftp://ftp.pbone.net/mirror/dev.mysql.com/pub/Downloads/MySQL-5.0/MySQL-client-community-5.0.45-0.sles10 .i586.rpm
=> `MySQL-client-community-5.0.45-0.sles10.i586.rpm'
ftp.pbone.net をDNSに問いあわせています... 85.14.85.4
ftp.pbone.net|85.14.85.4|:21 に接続しています... 接続しました。
anonymous としてログインしています... ログインしました!
==> SYST ... 完了しました。 ==> PWD ... 完了しました。
==> TYPE I ... 完了しました。 ==> CWD /mirror/dev.mysql.com/pub/Downloads/MySQL-5.0 ... 完了しました。
==> SIZE MySQL-client-community-5.0.45-0.sles10.i586.rpm ... 12538161
==> PASV ... 完了しました。 ==> RETR MySQL-client-community-5.0.45-0.sles10.i586.rpm ... 完了しました。
長さ: 12538161 (12M)
100%[====================================================================================================================>] 12,538,161 221K/s in 57s
02:38:28 (215 KB/s) - `MySQL-client-community-5.0.45-0.sles10.i586.rpm' を保存しました [12538161]
[root@localhost src]#
[root@localhost src]# rpm -ivh MySQL-client-community-5.0.45-0.sles10.i586.rpm
準備中... ########################################### [100%]
1:MySQL-client-community ########################################### [100%]
[root@localhost src]#
[root@localhost php-5.2.4]# make
gcc: /usr/lib/mysql/libmysqlclient.so: No such file or directory
make: *** [libphp5.la] エラー 1
[root@localhost php-5.2.4]# ls /usr/
X11R6/ bin/ etc/ games/ include/ kerberos/ lib/ libexec/ local/ sbin/ share/ src/ tmp/
[root@localhost php-5.2.4]# ls /usr/lib/mysql/lib
libdbug.a libmyisam.a libmysqlclient.la libmystrings.a libndbclient.la libz.la
libheap.a libmyisammrg.a libmysqlclient_r.a libmysys.a libvio.a
libmygcc.a libmysqlclient.a libmysqlclient_r.la libndbclient.a libz.a
[root@localhost php-5.2.4]# find / -name "libmysqlclient.so"
/home/admin/postsource/mysql-5.0.45/libmysql/.libs/libmysqlclient.so
[root@localhost php-5.2.4]#
[root@localhost php-5.2.4]# cp /home/admin/postsource/mysql-5.0.45/libmysql/.libs/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so
[root@localhost php-5.2.4]# ldconfig
[root@localhost php-5.2.4]#
何回か失敗したので,せっかくなのでConfigureし直す事にした。(一応make clean)
./configure \
--prefix=/usr/local/php-5.2.4 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/usr/local/php-5.2.4/lib/ \
--with-gd \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-gd \
--with-zlib \
--with-zlib-dir=/usr/local \
--with-xml \
--with-openssl \
--with-config-file-path=/etc \
--with-libmbfl \
--with-mcrypt \
--with-mime-magic \
--with-mysql \
--enable-pcntl \
--enable-trans-id \
--enable-zend-multibyte \
--enable-mbstring \
--enable-mbregex \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--enable-exif
[root@localhost php-5.2.4]# make
api/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lcrypt -lrt -lmysqlclient -lmcrypt -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -o sapi/cli/php
Build complete.
Don't forget to run 'make test'.
[root@localhost php-5.2.4]# make test
/usr/local/src/php-5.2.4/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
/usr/local/src/php-5.2.4/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
make: [test] エラー 127 (無視されました)
[root@localhost php-5.2.4]#
[root@localhost php-5.2.4]# cp /home/admin/postsource/mysql-5.0.45/libmysql/.libs/libmysqlclient.so.15 /usr/lib/mysql/
[root@localhost php-5.2.4]# ldconfig
[root@localhost php-5.2.4]# make test
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 48
Exts tested : 31
---------------------------------------------------------------------
Number of tests : 3973 2632
Tests skipped : 1341 ( 33.8%) --------
Tests warned : 1 ( 0.0%) ( 0.0%)
Tests failed : 5 ( 0.1%) ( 0.2%)
Tests passed : 2626 ( 66.1%) ( 99.8%)
---------------------------------------------------------------------
Time taken : 494 seconds
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
libgd #106 (imagerectangle 1x1 draws 1x3) [ext/gd/tests/libgd00106.phpt]
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15) [ext/standard/tests/strings/htmlentities02.phpt] (warn: possibly braindead libc)
htmlentities() test 4 (setlocale / ja_JP.EUC-JP) [ext/standard/tests/strings/htmlentities04.phpt]
htmlentities() test 15 (setlocale / KOI8-R) [ext/standard/tests/strings/htmlentities15.phpt]
=====================================================================
※幾つかエラーが出てしまった。とりあえず,それ程問題になりそうではないので今回は無視。
[root@localhost php-5.2.4]# make install
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.so /usr/local/apache2/modules/libphp5.so
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-5.2.4/libs'
chmod 755 /usr/local/apache2/modules/libphp5.so
[activating module `php5' in /usr/local/apache2/conf/httpd.conf]
Installing PHP CLI binary: /usr/local/php-5.2.4/bin/
Installing PHP CLI man page: /usr/local/php-5.2.4/man/man1/
Installing build environment: /usr/local/php-5.2.4/lib/php/build/
Installing header files: /usr/local/php-5.2.4/include/php/
Installing helper programs: /usr/local/php-5.2.4/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php-5.2.4/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php-5.2.4/lib/php/
[PEAR] Console_Getopt - installed: 1.2.3
[PEAR] Archive_Tar - installed: 1.3.2
[PEAR] Structures_Graph- installed: 1.0.2
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
[PEAR] PEAR - installed: 1.6.1
Wrote PEAR system config file at: /usr/local/php-5.2.4/etc/pear.conf
You may want to add: /usr/local/php-5.2.4/lib/php to your php.ini include_path
Installing PDO headers: /usr/local/php-5.2.4/include/php/ext/pdo/
[root@localhost php-5.2.4]#
今後のバージョン変更の為にシンボリックリンクを貼って終了。
[root@localhost php-5.2.4]# ln -sfn /usr/local/php-5.2.4 /usr/local/php
[root@localhost php-5.2.4]# ls -l /usr/local/php
lrwxrwxrwx 1 root root 20 10月 13 03:44 /usr/local/php -> /usr/local/php-5.2.4
[root@localhost php-5.2.4]#
ローダブルモジュールは,カーネル動作中に動的に組み込み/削除出来るモジュール。
モジュールファイルは".o"若しくは".ko"というファイルです。
lsmodで現在ロードされているモジュールを確認出来ます。(lsmodは/proc/modulesを参照してます)
[root@localhost ~]# lsmod
Module Size Used by
autofs4 23749 2
hidp 23105 2
l2cap 29505 5 hidp
bluetooth 53925 2 hidp,l2cap
sunrpc 142973 1
ipv6 251137 25
dm_mirror 29713 0
dm_mod 56665 1 dm_mirror
video 19269 0
sbs 18533 0
i2c_ec 9025 1 sbs
button 10705 0
[root@localhost ~]# cat /proc/modules
autofs4 23749 2 - Live 0xd4af4000
hidp 23105 2 - Live 0xd4aed000
l2cap 29505 5 hidp, Live 0xd4a53000
bluetooth 53925 2 hidp,l2cap, Live 0xd4afe000
sunrpc 142973 1 - Live 0xd4b76000
ipv6 251137 25 - Live 0xd4b37000
dm_mirror 29713 0 - Live 0xd4a4a000
dm_mod 56665 1 dm_mirror, Live 0xd4a5c000
video 19269 0 - Live 0xd4a44000
sbs 18533 0 - Live 0xd4a3e000
i2c_ec 9025 1 sbs, Live 0xd49bd000
button 10705 0 - Live 0xd4994000
battery 13637 0 - Live 0xd49ab000
asus_acpi 19289 0 - Live 0xd49ea000
ac 9157 0 - Live 0xd4998000
lp 15849 0 - Live 0xd493e000
モジュールの詳細を表示するには,modinfoを利用します。
"-n" モジュールファイル名
"-d" モジュール説明
"-n" モジュール作成者
省略で全て表示
[root@localhost ~]# modinfo battery
filename: /lib/modules/2.6.18-8.el5/kernel/drivers/acpi/battery.ko
license: GPL
description: ACPI Battery Driver
author: Paul Diefenbaugh
srcversion: A8C54309DE899B1E57CC838
depends:
vermagic: 2.6.18-8.el5 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1
[root@localhost ~]# modinfo -n battery
/lib/modules/2.6.18-8.el5/kernel/drivers/acpi/battery.ko
[root@localhost ~]# modinfo -d battery
ACPI Battery Driver
[root@localhost ~]# modinfo -a battery
Paul Diefenbaugh
[root@localhost ~]#
モジュールのロードとアンロード
insmod (モジュールのロード)
rmmod(モジュールのアンロード)
※依存関係がある場合は,ロード&アンロードの順番に注意する。
modprobe (モジュールのロード&アンロード)
modprobe -a 全てのモジュールをロード
modprobe -r モジュールをアンロード
modprobe -l 指定したパターンのロード可能モジュールの表示
※modprobeはモジュールの依存関係を調べて必要があるモジュールを自動的にロードしてくれます。
Usage: modprobe [-v] [-V] [-C config-file] [-n] [-i] [-q] [-b] [-o <modname>] <modname> [parameters...]
modprobe -r [-n] [-i] [-v] <modulename> ...
modprobe -l -t <dirname> [ -a <modulename> ...]
fsでロード可能なモジュール一覧
bootフォルダーの下にvmlinuz~というファイルがカーネルイメージです。
「下の例」
メジャーバージョン=2
マイナーバージョン=6
サブレベル=18
エクストラバージョン=8
[root@localhost ~]# uname -r
2.6.18-8.el5
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
[root@localhost ~]#
tcp 1 0 192.168.11.4:46009 72.21.40.11:80 CLOSE_WAIT
tcp 1 0 192.168.11.4:46013 72.21.40.11:80 CLOSE_WAIT
tcp 1 0 192.168.11.4:46325 218.227.162.248:80 CLOSE_WAIT
tcp 1 0 192.168.11.4:46327 218.227.162.248:80 CLOSE_WAIT
tcp 1 0 192.168.11.4:46304 64.92.174.75:80 CLOSE_WAIT
tcp 1 0 192.168.11.4:46300 64.92.174.75:80 CLOSE_WAIT
[root@localhost bin]# netstat -n | grep 80 | wc -l
6
[root@localhost bin]#
ファイルをダウンロードして,展開後にApacheのインストールを開始します。
wget http://ftp.riken.jp/net/apache/httpd/httpd-2.2.6.tar.gz
tar zxvf httpd-2.2.6.tar.gz
-----------① Apach Configuration -------------
./configure \
--enable-rewrite \
--enable-so \
--enable-ssl \
--enable-dav \
--enable-dav-fs \
--enable-suexec \
--enable-cache \
--enable-disk-cache \
--enable-mem-cache \
--enable-webdav=true \
--with-suexec-docroot=/home/www \
--with-included-apr \
--with-apxs=/usr/local/apache2/bin/apxs \
--with-suexec-caller=apache
※WEBDAVはサブバージョン用に準備したもの。
※Cache関連のオプションは,apache2.xxで可能。
-----------② Apach Compile -------------------
make
-----------③ Install -------------------------
make install
-----------④ 起動スクリプト準備 /etc/init.d/ -
#!/bin/bash
#
# Startup script for Apache Web Server
# chkconfig: 345 85 15
#
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /usr/local/apache2/conf/httpd.conf
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin:/bin
CMDPATH=/usr/local/apache2/bin/
CMD=apachectl
test -f $CMDPATH$CMD || exit 0
start()
{
echo -n "Starting httpd ... "
$CMDPATH$CMD start
echo "done."
}
stop()
{
echo -n "Stopping httpd ... "
$CMDPATH$CMD stop
echo "done."
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|force-reload)
stop
sleep 2
start
;;
*)
echo "Usage: /etc/rc.d/init.d/rc.httpd2 {start|stop|restart}"
exit 1
;;
esac
exit 0
-----------⑤ 起動確認 -------------------------
[root@localhost apache2]# /etc/init.d/http start
Starting httpd ... done.
-----------⑥ 自動起動設定 ---------------------
[root@localhost apache2]# chkconfig --list http2
[root@localhost apache2]# chkconfig --add http2
[root@localhost apache2]# chkconfig --list http2
http2 0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@localhost apache2]#
-----------⑦ httpd.confの編集------------------
ServerSignature Off
ServerTokens ProductOnly
HostnameLookups Off
TraceEnable Off
-----------⑧ httpd.confの確認------------------
[root@localhost bin]# ./apachectl -t
Syntax OK
とりあえず基本設定完了
※ &にてバックグラウンドでジョブ実行 -> nohupコマンドでログアウト後もジョブを実行させる事が可能
[root@localhost ~]# updatedb &
[1] 3688
[root@localhost ~]# ps
PID TTY TIME CMD
2522 pts/1 00:00:01 bash
3688 pts/1 00:00:02 updatedb
3691 pts/1 00:00:00 ps
[root@localhost ~]# jobs
[1]+ Running updatedb &
[root@localhost ~]#
※SSHでのPortフォワーディングでも使えそう。
[root@localhost ~]# nohup updatedb &
[1] 3705
[root@localhost ~]#
[root@localhost ~]# jobs
[1]+ Running updatedb &
[root@localhost ~]# jobs
[1]+ Done updatedb
[root@localhost ~]# nohup updatedb &
[1] 3705
[root@localhost ~]#
[root@localhost ~]# jobs
[root@localhost ~]# updatedb &
[1] 3711
[root@localhost ~]# jobs
[1]+ Done updatedb
※bgコマンド,fgコマンドで切り替え
[root@localhost ~]# tail -f /var/log/messages &
[1] 3722
[root@localhost ~]#
[root@localhost ~]# jobs
[1]+ Running tail -f /var/log/messages &
[root@localhost ~]# fg 1
tail -f /var/log/messages
インストール
[root@localhost httpd-2.2.6]# yum install nmap
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
base : ################################################## 2334/2334
Added 2334 new packages, deleted 0 old in 60.05 seconds
primary.xml.gz 100% |=========================| 313 kB 00:00
updates : ################################################## 717/717
Added 717 new packages, deleted 0 old in 23.13 seconds
primary.xml.gz 100% |=========================| 157 B 00:00
Added 0 new packages, deleted 0 old in 0.01 seconds
primary.xml.gz 100% |=========================| 66 kB 00:00
extras : ################################################## 251/251
Added 251 new packages, deleted 0 old in 5.38 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for nmap to pack into transaction set.
nmap-4.11-1.1.i386.rpm 100% |=========================| 9.7 kB 00:00
---> Package nmap.i386 2:4.11-1.1 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
nmap i386 2:4.11-1.1 base 672 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 672 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): nmap-4.11-1.1.i386 100% |=========================| 672 kB 00:11
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: nmap ######################### [1/1]
Installed: nmap.i386 2:4.11-1.1
Complete!
[root@localhost httpd-2.2.6]#
