9/08/2009

Atom ITEマザー に CentOS 5.3をインストール

私が使っているマザーは、FOXCONN R11S4MI-BA(45CTD)のもの。多分Intelのマザーでも適用できるはず。

1.まずCent OS 5.3をインストールする。
2. とりあえず、yum update
yum update
reboot

3.elrepoを追加
rpm -Uvh http://elrepo.org/elrepo-release-0.1-1.el5.elrepo.noarch.rpm
rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org

4.nicのドライバとlm_sensorsのインストール
yum --enablerepo=elrepo install kmod-r8168  kmod-it87 lm_sensors

/etc/sysconfig/network-scripts/ifcfg-ethX
HWADDRをコメントアウトし、本来のMAC addressを以下のように記載
MACADDR=<本当のMAC ADDRESS>
注意 MAC Addressがどうしても分からなかったので以下のように記載
 00:20:18:00:00:01
 00:20:18:00:00:02
意味が分かっていないならあきらめてWindowsに刺して調べてください。

5.その他微調整
vi /etc/smartd.conf
/dev/sda -a -d sat

vi /etc/sysconfig/lm_sensors
MODULE_1=i2c-isa
MODULE_2=eeprom

lm_sensorsの設定

sensors-detect
 質問は全てEnterで答える


/etc/sensors.confのファイル末尾に以下を追加
chip "it8718-*"
# Voltages
label in0 "VCore"
label in1 "VDDR"
label in2 "+3.3V" # VCC3
label in3 "+5V" # VCC
label in4 "+12V"
label in5 "-12V"
label in6 "-5V"
label in7 "5VSB" # VCCH
label in8 "VBat"

compute in3 ((6.8/10)+1)*@ , @/((6.8/10)+1)
compute in4 ((30/10)+1)*@ , @/((30/10)+1)
compute in5 (1+232/56)*@ - 4.096*232/56 , (@ + 4.096*232/56)/(1+232/56)
compute in6 (1+120/56)*@ - 4.096*120/56 , (@ + 4.096*120/56)/(1+120/56)
compute in7 ((6.8/10)+1)*@ , @/((6.8/10)+1)

# If vid (nominal CPU voltage) isn't correct, hardcode the correct value
# instead.
set in0_min 1.00
set in0_max 1.35
set in1_min 1.8 * 0.95
set in1_max 1.8 * 1.05
set in2_min 3.3 * 0.95
set in2_max 3.3 * 1.05
set in3_min 5 * 0.95
set in3_max 5 * 1.05
set in4_min 12 * 0.95
set in4_max 12 * 1.05
set in5_max -12 * 0.95
set in5_min -12 * 1.05
set in6_max -5 * 0.95
set in6_min -5 * 1.05
set in7_min 5 * 0.95
set in7_max 5 * 1.05

# The chip does not support in8 min/max
# Temperatures
# If you are lucky, the BIOS has set the proper sensor types for you.
# If your temperature readings are completely whacky you probably
# need to change the sensor types. Adujst and uncomment the
# appropriate lines below.
#
# 2 = thermistor; 3 = thermal diode; 0 = unused
# set sensor1 3
# set sensor2 3
# set sensor3 3

# If a given sensor isn't used, you will probably want to ignore it
# as well (see ignore statement right below).
# The CPU sensor can be any of temp1, temp2 or temp3 - it's motherboard
# dependent. Same for the motherboard temperature.
label temp1 "M/B Temp"
label temp2 "CPU Temp"
ignore temp3

set temp1_over 50
set temp1_low 10
set temp2_over 70
set temp2_low 10

# Fans
# The CPU fan can be any of fan1, fan2 or fan3 - it's motherboard
# dependent. Same for the case fan.
label fan1 "CPU Fan"
ignore fan2
ignore fan3
ignore fan4

set fan1_min 1000
# set fan2_min 2000


5.xen 環境の構築
yum groupinstall Virtualization
yum --enablerepo=elrepo install kmod-r8169-xen.x86_64 kmod-it87-xen.x86_64
echo 'options loop max_loop=255' > /etc/modprobe.d/loop.local

FOXCONNのマザーはオンボードの100Mを認識させるにはこれもいる
yum --enablerepo=elrepo install kmod-r8101-xen kmod-r8101
/etc/sysconfig/hwconfで調べて
vi  /etc/modprobe.conf
alias eth1 r8101

vi /boot/grub/menu.lst
default=0 <--Xen kernelが起動するようにする。

6.dag
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
むやみに読み込まれないようにするため
/etc/yum.repos.d/rpmforge.repo
enabled = 0
 
・hddtempをテストで入れてみる
yum --enablerepo=rpmforge install hddtemp
vi /etc/sysconfig/hddtemp
HDDTEMP_OPTIONS="/dev/sda --syslog=300 -l 127.0.0.1"
 
chkconfig hddtemp on
service hddtemp start

iPhoneでもモニタリングが出来るようにする
rpm -ivh http://istatd.googlecode.com/files/istatd-0.5.4-1.el5.rych.x86_64.rpm
chkconfig istatd on
service istatd start

最後にyum のキャッシュをクリーンナップ
yum clean all

複数のNICでxen bridgeを認識させるには、以下
vi /etc/xen/scripts/network-mybridge
#!/bin/bash
/etc/xen/scripts/network-bridge $1 vifnum=0 bridge=xenbr0 netdev=eth0
/etc/xen/scripts/network-bridge $1 vifnum=1 bridge=xenbr1 netdev=eth1

chmod 755 /etc/xen/scripts/network-mybridge
 /etc/xen/scripts/network-mybridge stop
 /etc/xen/scripts/network-mybridge start

自動起動させるには
vi /etc/xen/xend-config.sxp
(network-script network-bridge) -> (network-script network-mybridge)


確認
brctl show


xenゲストを作るには以下のスクリプトを作る。
前提 xen のイメージは、lvmで作成
virt-install -n xen01  -r 512 -f /dev/xenvg/xen01 --nographics --bridge=xenbr1 
-l ftp://ftp.riken.go.jp/Linux/centos/5.3/os/i386

作成したら以下のdagのレポジトリの設定は行っておく。

0 件のコメント: