HomeServer3
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
&color(red){Cent OS5 移行に伴う変更部分のみ記載 (共通部...
#contents();
*** インストール計画 [#u80c396c]
- Cent OS4 の環境は /boot /swap を含め全ての環境を RAID5 ...
- /home 以下、/var/www 以下、/opt 以下などアプリケーショ...
- Cent OS5 では OS kernel 依存部専用の 単純ディスク(≠RAI...
- 従来の raid5 ディスクは /raid にマウントし、Cent OS5 環...
- /home、 /var/www など一部のファイルは /raid 以下の構造...
- ディスクジオメトリとマウントポイント
|物理デバイス名|論理デバイス名|Cent 4|Cent 5|h
|/dev/sdb1|||/boot|
|/dev/sdb2|||/|
|/dev/hdb2|||/opt_ftp|
|/dev/sda2|||/dtv_rec|
|dev/mapper/VolGroup00-LogVol00||/|/raid|
|dev/mapper/VolGroup00-LogVol00|/dev/sdc1|/boot|/mnt/cent...
*** ブートメソッド [#zb1c85a0]
- Cent OS5 インストール時の設定で /boot を /dev/hdc1 に設...
- Cent OS5 環境で kernel update が実行されると kernel bin...
- 同時に /etc/grib.conf が自動編集されて 新しい kernel im...
- &color(red){しかし、システム起動時のブートローダーは Ce...
- &color(red){従って yum によって更新された /etc/gub.conf...
- この問題を解決するために kernel 更新時には以下の設定を...
-- yum で kernel が更新された事を確認する
-- &color(red){Cent4 用の grub.conf にこの更新内容マニュ...
-- それは /raid/etc/grub.conf が /boot/grub/gub.conf への...
-- &color(red){この問題を解決するために、シンボリックリン...
-- grub.conf の中では (Cent OS5 環境の)/boot 以下のイメ...
[root@spirit ~]# cat /mnt/cent_boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making c...
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /...
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup...
# initrd /initrd-version.img
#boot=/dev/sda
#default=0 force to use old kernel, auto-updated kernel...
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title CentOS 5 (2.6.18-8.1.3.el5)
root (hd3,0)
kernel /vmlinuz-2.6.18-8.1.3.el5 ro root=LABEL=/...
initrd /initrd-2.6.18-8.1.3.el5.img
title CentOS 5 (2.6.18-8.1.1.el5)
root (hd3,0)
kernel /vmlinuz-2.6.18-8.1.1.el5 ro root=LABEL=/...
initrd /initrd-2.6.18-8.1.1.el5.img
title CentOS 5 (2.6.18-8.el5)
root (hd3,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhg...
initrd /initrd-2.6.18-8.el5.img
title CentOS (2.6.9-42.0.10.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.0.10.EL ro root=/dev/Vo...
initrd /initrd-2.6.9-42.0.10.EL.img
title CentOS (2.6.9-42.0.8.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.0.8.EL ro root=/dev/Vol...
initrd /initrd-2.6.9-42.0.8.EL.img
*** グラフィックスボード [#a60600d0]
- Spirit には ATI Radion X1300 ・・・・ ファンレス、低価...
- &ref(ati_spirit.JPG);
- [[CentOS への ATI glx ドライバーのインストール手順:http...
- しかし、Mesa の OpenGL が動作しているな... なぜ ?
[root@spirit ~]# fglrxinfo
Xlib: extension "XFree86-DRI" missing on display ":0.0".
display: :0.0 screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 (1.5 Mesa 6.5.1)
*** 3D Desktop ( Compiz , AIGLX ) [#c9ea5a85]
- 結果的には Radion X1300 (低価格、ファンレスボード)で...
- AIGLX(Accelerated Indirect GL X)は,Fedora Projectが開...
- AIGLX を動かすには グラフィックスボードが OpenGL の &co...
[root@spirit ~]# tail /var/log/Xorg.setup.log
Build ID: xorg-x11-server 1.1.1-48.13.0.1.el5
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) defaul...
(++) from command line, (!!) notice, (II) inform...
(WW) warning, (EE) error, (NI) not implemented, ...
(++) Log file: "/dev/null", Time: Fri May 11 00:14:04 2007
(++) Using config file: "/tmp/tmpjqbOytxorg.config"
(EE) AIGLX: Screen 0 is not DRI capable
- 参考 URL
-- [[IT pro 【Linuxウォッチ】第29回 Momonga Linuxで3Dデス...
-- [[AIGLX project wiki:http://fedoraproject.org/wiki/Ren...
* メール [#y0673fed]
** fetchmail [#lcdf3de1]
- rc ファイル (/raid/home の各ユーザーディレクトリに個別...
- 自動起動スクリプト[/etc/rc.d/init.d/fetchmail] (/home ...
-- /etc/rc.d/init.d の下に下記のファイルを作成し実行権を...
-- chkconfig fetchmail on で自動起動を設定
-- 各ユーザーの rc ファイルを読み込んで実行できるか検証
[root@spirit ~]# cat /etc/rc.d/init.d/fetchmail
#!/bin/bash
#
# Fetchmail
#
# chkconfig: - 99 20
# description: Fetchmail auto start script
# Source function library.
. /etc/rc.d/init.d/functions
start() {
# Start daemons.
for user in `ls /raid/home/`
do
if [ -f /raid/home/$user/.fetchmailrc ]; then
if [ ! -f /raid/home/$user/.fetchmail.pid ];...
echo "fetchmail for $user starting..."
su $user -s "/bin/bash" -c "/usr/bin/fet...
else
PID=`cat /raid/home/$user/.fetchmail.pid...
ps $PID>/dev/null
if [ $? = 0 ]; then
echo "fetchmail for $user is already...
else
echo "fetchmail for $user is restart...
su $user -s "/bin/bash" -c "/usr/bin...
fi
fi
fi
done
if [ -f /root/.fetchmailrc ]; then
if [ ! -f /var/run/fetchmail.pid ]; then
echo "fetchmail for root starting..."
/usr/bin/fetchmail
else
PID=`cat /var/run/fetchmail.pid|cut -d " " -...
ps $PID>/dev/null
if [ $? = 0 ]; then
echo "fetchmail for root is already star...
else
echo "fetchmail for root is restartng..."
/usr/bin/fetchmail
fi
fi
fi
}
stop() {
# Stop daemons.
if [ -f /var/run/fetchmail.pid ]; then
echo "fetchmail for root stoping..."
/usr/bin/fetchmail --quit
fi
for user in `ls /raid/home/`
do
if [ -f /raid/home/$user/.fetchmail.pid ]; then
echo "fetchmail for $user stoping..."
su $user -s "/bin/bash" -c "/usr/bin/fetchmai...
fi
done
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
run="0"
if [ -f /var/run/fetchmail.pid ]; then
PID=`cat /var/run/fetchmail.pid|cut -d " " -...
ps $PID>/dev/null
if [ $? = 0 ]; then
run="1"
echo "fetchmail for root is running..."
fi
fi
for user in `ls /raid/home/`
do
if [ -f /raid/home/$user/.fetchmail.pid ]; t...
PID=`cat /raid/home/$user/.fetchmail.pid...
ps $PID>/dev/null
if [ $? = 0 ]; then
run="1"
echo "fetchmail for $user is running...
fi
fi
done
if [ $run == "0" ]; then
echo "fetchmail is not running"
exit 1
fi
;;
*)
echo "Usage: fetchmail {start|stop|restart|statu...
exit 1
esac
exit $?
[root@spirit ~]#
- マニュアルページ
-- http://www.big.or.jp/~mio/it-old/fm/ref/fm_ref_fetchma...
-- http://jo1upk.blogdns.net/linux/index.php?%E3%82%BD%E3...
* バックアップサーバー上のスクリプト (rsync で差分更新) ...
- rsync で差分を更新する (cp コマンドよりずっと高速)
- ssh の rsa 鍵交換によりパスワードの入力がいらなくなって...
-- &ref(archives_sync.sh);
-- &ref(image_sync.sh);
-- &ref(mail_sync.sh);
-- &ref(peewee_sync.sh);
-- &ref(wiki_sync.sh);
-- &ref(webdav_sync.sh);
[root@backup script]# cat archives_sync.sh
#!/bin/sh
# sync spirit.hmuna.com master archived data to "backup....
while [ -n "$(echo $1 | grep '^-')" ]; do
optins="$options $1"
shift
done
# spirit のバックアップアーカイブの更新分をコピー (メー...
# webdv と svn は以前のバックアップを消して最新のアーカ...
#rm -fR /backup/archives/webdav/*
rm -fR /backup/archives/svn/*
eval `ssh-agent`
cd /root
ssh-add id_rsa
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/web/*.tgz...
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/etc/*.tgz...
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/dav/*.tgz...
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/svn/*.tgz...
# spirit の各ユーザ、プロセス毎の主要スクリプトをバック...
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/script/ /...
eval `ssh-agent -k`
終了行:
&color(red){Cent OS5 移行に伴う変更部分のみ記載 (共通部...
#contents();
*** インストール計画 [#u80c396c]
- Cent OS4 の環境は /boot /swap を含め全ての環境を RAID5 ...
- /home 以下、/var/www 以下、/opt 以下などアプリケーショ...
- Cent OS5 では OS kernel 依存部専用の 単純ディスク(≠RAI...
- 従来の raid5 ディスクは /raid にマウントし、Cent OS5 環...
- /home、 /var/www など一部のファイルは /raid 以下の構造...
- ディスクジオメトリとマウントポイント
|物理デバイス名|論理デバイス名|Cent 4|Cent 5|h
|/dev/sdb1|||/boot|
|/dev/sdb2|||/|
|/dev/hdb2|||/opt_ftp|
|/dev/sda2|||/dtv_rec|
|dev/mapper/VolGroup00-LogVol00||/|/raid|
|dev/mapper/VolGroup00-LogVol00|/dev/sdc1|/boot|/mnt/cent...
*** ブートメソッド [#zb1c85a0]
- Cent OS5 インストール時の設定で /boot を /dev/hdc1 に設...
- Cent OS5 環境で kernel update が実行されると kernel bin...
- 同時に /etc/grib.conf が自動編集されて 新しい kernel im...
- &color(red){しかし、システム起動時のブートローダーは Ce...
- &color(red){従って yum によって更新された /etc/gub.conf...
- この問題を解決するために kernel 更新時には以下の設定を...
-- yum で kernel が更新された事を確認する
-- &color(red){Cent4 用の grub.conf にこの更新内容マニュ...
-- それは /raid/etc/grub.conf が /boot/grub/gub.conf への...
-- &color(red){この問題を解決するために、シンボリックリン...
-- grub.conf の中では (Cent OS5 環境の)/boot 以下のイメ...
[root@spirit ~]# cat /mnt/cent_boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making c...
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /...
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup...
# initrd /initrd-version.img
#boot=/dev/sda
#default=0 force to use old kernel, auto-updated kernel...
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title CentOS 5 (2.6.18-8.1.3.el5)
root (hd3,0)
kernel /vmlinuz-2.6.18-8.1.3.el5 ro root=LABEL=/...
initrd /initrd-2.6.18-8.1.3.el5.img
title CentOS 5 (2.6.18-8.1.1.el5)
root (hd3,0)
kernel /vmlinuz-2.6.18-8.1.1.el5 ro root=LABEL=/...
initrd /initrd-2.6.18-8.1.1.el5.img
title CentOS 5 (2.6.18-8.el5)
root (hd3,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhg...
initrd /initrd-2.6.18-8.el5.img
title CentOS (2.6.9-42.0.10.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.0.10.EL ro root=/dev/Vo...
initrd /initrd-2.6.9-42.0.10.EL.img
title CentOS (2.6.9-42.0.8.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.0.8.EL ro root=/dev/Vol...
initrd /initrd-2.6.9-42.0.8.EL.img
*** グラフィックスボード [#a60600d0]
- Spirit には ATI Radion X1300 ・・・・ ファンレス、低価...
- &ref(ati_spirit.JPG);
- [[CentOS への ATI glx ドライバーのインストール手順:http...
- しかし、Mesa の OpenGL が動作しているな... なぜ ?
[root@spirit ~]# fglrxinfo
Xlib: extension "XFree86-DRI" missing on display ":0.0".
display: :0.0 screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 (1.5 Mesa 6.5.1)
*** 3D Desktop ( Compiz , AIGLX ) [#c9ea5a85]
- 結果的には Radion X1300 (低価格、ファンレスボード)で...
- AIGLX(Accelerated Indirect GL X)は,Fedora Projectが開...
- AIGLX を動かすには グラフィックスボードが OpenGL の &co...
[root@spirit ~]# tail /var/log/Xorg.setup.log
Build ID: xorg-x11-server 1.1.1-48.13.0.1.el5
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) defaul...
(++) from command line, (!!) notice, (II) inform...
(WW) warning, (EE) error, (NI) not implemented, ...
(++) Log file: "/dev/null", Time: Fri May 11 00:14:04 2007
(++) Using config file: "/tmp/tmpjqbOytxorg.config"
(EE) AIGLX: Screen 0 is not DRI capable
- 参考 URL
-- [[IT pro 【Linuxウォッチ】第29回 Momonga Linuxで3Dデス...
-- [[AIGLX project wiki:http://fedoraproject.org/wiki/Ren...
* メール [#y0673fed]
** fetchmail [#lcdf3de1]
- rc ファイル (/raid/home の各ユーザーディレクトリに個別...
- 自動起動スクリプト[/etc/rc.d/init.d/fetchmail] (/home ...
-- /etc/rc.d/init.d の下に下記のファイルを作成し実行権を...
-- chkconfig fetchmail on で自動起動を設定
-- 各ユーザーの rc ファイルを読み込んで実行できるか検証
[root@spirit ~]# cat /etc/rc.d/init.d/fetchmail
#!/bin/bash
#
# Fetchmail
#
# chkconfig: - 99 20
# description: Fetchmail auto start script
# Source function library.
. /etc/rc.d/init.d/functions
start() {
# Start daemons.
for user in `ls /raid/home/`
do
if [ -f /raid/home/$user/.fetchmailrc ]; then
if [ ! -f /raid/home/$user/.fetchmail.pid ];...
echo "fetchmail for $user starting..."
su $user -s "/bin/bash" -c "/usr/bin/fet...
else
PID=`cat /raid/home/$user/.fetchmail.pid...
ps $PID>/dev/null
if [ $? = 0 ]; then
echo "fetchmail for $user is already...
else
echo "fetchmail for $user is restart...
su $user -s "/bin/bash" -c "/usr/bin...
fi
fi
fi
done
if [ -f /root/.fetchmailrc ]; then
if [ ! -f /var/run/fetchmail.pid ]; then
echo "fetchmail for root starting..."
/usr/bin/fetchmail
else
PID=`cat /var/run/fetchmail.pid|cut -d " " -...
ps $PID>/dev/null
if [ $? = 0 ]; then
echo "fetchmail for root is already star...
else
echo "fetchmail for root is restartng..."
/usr/bin/fetchmail
fi
fi
fi
}
stop() {
# Stop daemons.
if [ -f /var/run/fetchmail.pid ]; then
echo "fetchmail for root stoping..."
/usr/bin/fetchmail --quit
fi
for user in `ls /raid/home/`
do
if [ -f /raid/home/$user/.fetchmail.pid ]; then
echo "fetchmail for $user stoping..."
su $user -s "/bin/bash" -c "/usr/bin/fetchmai...
fi
done
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
run="0"
if [ -f /var/run/fetchmail.pid ]; then
PID=`cat /var/run/fetchmail.pid|cut -d " " -...
ps $PID>/dev/null
if [ $? = 0 ]; then
run="1"
echo "fetchmail for root is running..."
fi
fi
for user in `ls /raid/home/`
do
if [ -f /raid/home/$user/.fetchmail.pid ]; t...
PID=`cat /raid/home/$user/.fetchmail.pid...
ps $PID>/dev/null
if [ $? = 0 ]; then
run="1"
echo "fetchmail for $user is running...
fi
fi
done
if [ $run == "0" ]; then
echo "fetchmail is not running"
exit 1
fi
;;
*)
echo "Usage: fetchmail {start|stop|restart|statu...
exit 1
esac
exit $?
[root@spirit ~]#
- マニュアルページ
-- http://www.big.or.jp/~mio/it-old/fm/ref/fm_ref_fetchma...
-- http://jo1upk.blogdns.net/linux/index.php?%E3%82%BD%E3...
* バックアップサーバー上のスクリプト (rsync で差分更新) ...
- rsync で差分を更新する (cp コマンドよりずっと高速)
- ssh の rsa 鍵交換によりパスワードの入力がいらなくなって...
-- &ref(archives_sync.sh);
-- &ref(image_sync.sh);
-- &ref(mail_sync.sh);
-- &ref(peewee_sync.sh);
-- &ref(wiki_sync.sh);
-- &ref(webdav_sync.sh);
[root@backup script]# cat archives_sync.sh
#!/bin/sh
# sync spirit.hmuna.com master archived data to "backup....
while [ -n "$(echo $1 | grep '^-')" ]; do
optins="$options $1"
shift
done
# spirit のバックアップアーカイブの更新分をコピー (メー...
# webdv と svn は以前のバックアップを消して最新のアーカ...
#rm -fR /backup/archives/webdav/*
rm -fR /backup/archives/svn/*
eval `ssh-agent`
cd /root
ssh-add id_rsa
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/web/*.tgz...
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/etc/*.tgz...
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/dav/*.tgz...
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/svn/*.tgz...
# spirit の各ユーザ、プロセス毎の主要スクリプトをバック...
rsync -avx -e ssh spirit.hmuna.com:/opt/backup/script/ /...
eval `ssh-agent -k`
ページ名: