shiro のバックアップ(No.8)


問題など

IPアドレス

ソケットの関係で固定IPが取れなかった。 一応DHCPで動かしてみる。
スイッチングHUBでも買ってguarneriと同じソケットに刺すようにしよう。

glibc

更新を使用としてyum updateすると1日たっても更新が終わらない何かビルドしているらしいが。。。

セットアップ

Boot DiskでHTTP サーバを指定しネットワークインストールを行った。 x86_64を入れる際にはx86_64用のBoot Diskが必要 CERN 内のサーバにつなぐのでかなり早い。

パーティション設定

/sda140GB
swapsda324GB
/homesda4残り全部

残りは後からスクラッチに割り当てを行う。

インストールパッケージ

基本的にデスクトップ、開発系は全てインストール。 (ただし、マルチメディア系は除く。)

CERN内での設定

http://linux.web.cern.ch/linux/scientific5/docs/install.shtmlの通りに進めていく。

AFS client

時刻の同期とAFSサービスが必要になる。 以下のコマンドを実行し有効にする。

# lcm --configure ntpd afsclt

afsはインストール後に有効にしてあればOK。 また、起動後に有効になるかの確認ができる。

# chkconfig --list afs

CERNサイト設定

CERNサイト内でのafsの設定

# lcm --configure srvtab

他の設定は以下のようにして有効にする。

# lcm --configure krb5clt sendmail nscd ntpd chkconfig pine security

時刻の同期

kebros 認証では時間が正確でないとダメ。 そのため ntp サーバと同期して正確な時間に修正してやる。
ntpdの設定が終わった後に以下のコマンドを実行

# ntpq -p

同期されればOK。

プリンタの設定

まず以下のコマンドで使いたいプリンタを探す。

# /usr/sbin/lpadmincern --building 188 --list 

プリンタのリストが表示されるので以下のようにしてデフォルトプリンタに設定する。

# usr/sbin/lpadmincern 188-4015-HP --add

Forwrdの設定

/rootに.forwardに自分のメールアドレスを書いておくことでroot宛のメールを転送する。

ソフトウェアインストール

日本語環境の設定

日本語のサイト見たかったり、日本語打ちたかったりするのでとりあえず。

# yum install fonts-japanese scim anthy scim-anthy

日本語の入力をするためには以下のようにする。

/etc/X11/xinit/xinitrc.d/scim

のファイルを作り

scim -d &

を書いておく。また、同様に

# vi /etc/bashrc

…
XMODIFERS=@im=SCIM
GTK_IM_MODULE=scim
export XMODIFERS GTK_IM_MODULE
export USE_XOPENIM=t

この後に reboot する。 Default だと Contrl+Space で変換するので
System -> Preferences -> More Preferences -> SCIM Input Method Setup
から Shift+Space に変更する。 ターミナルなり firefox で確認してみる

TeX環境

TeX環境は以下を行うと一発

# yum install tetex*

gv、acroread(xpdf)、は忘れずに入れておく。

yum install gv xpdf acroread

スクラッチディスクのセットアップ

まずディスクをマウントするフォルダを作る。

# mkdir -p /data/disk4
# mkdir -p /data/disk5

fdiskを使って /dev/sdb1、/dev/sdc1を作る

# fdisk /dev/sdb
# fdisk /dev/sdc

sdc は AFTフォーマットであるのでパーティションアライメントを行う。(下の項目参照)
その後、disk を ext3 形式でフォーマットする。

# mkfs -t ext3 /dev/sdb1

起動時にマウントしたいので /etc/fstab に

/dev/sdb1  /data/disk4  ext3  defaults  0 0
/dev/sdc1  /data/disk5  ext3  defaults  0 0

と追加する。
最後にマウントができることを確認する。

# mount -a

AFTフォーマットのHDDを使う

セクタサイズが 4096Bytes の AFT フォーマットのHDDを使う際にはパーティションアライメントを行う。
まず、いつも通りに fdisk でパーティションを作る。 このとき開始セクタは63に設定される。 非 AFT フォーマットでは物理セクタは 512Bytes に指定されているのでセクタの頭が揃わない。 8 の倍数になるように開始セクタを調整すれば良い。
ここら辺の解説はここを参考にした。
今回は開始セクタを64に設定した。 fdisk のエキスパートモード(x)を用いて開始セクタの変更(b)をおこなった。

#fdisk /dev/sdb1

The number of cylinders for this disk is set to 243201. 
There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
  a   toggle a bootable flag
  b   edit bsd disklabel
  c   toggle the dos compatibility flag
  d   delete a partition
  l   list known partition types
  m   print this menu
  n   add a new partition
  o   create a new empty DOS partition table
  p   print the partition table
  q   quit without saving changes
  s   create a new empty Sun disklabel
  t   change a partition's system id
  u   change display/entry units
  v   verify the partition table
  w   write table to disk and exit
  x   extra functionality (experts only)

Command (m for help): x

Expert command (m for help): m
Command action
  b   move beginning of data in a partition
  c   change number of cylinders
  d   print the raw data in the partition table
  e   list extended partitions
  f   fix partition order
  g   create an IRIX (SGI) partition table
  h   change number of heads
  m   print this menu
  p   print the partition table
  q   quit without saving changes
  r   return to main menu
  s   change number of sectors/track
  v   verify the partition table
  w   write table to disk and exit

Expert command (m for help): p

Disk /dev/sde: 255 heads, 63 sectors, 243201 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl     Start      Size ID
 1 00   1   1    0 254  63 1023         63 3907024002 83
 2 00   0   0    0   0   0    0          0          0 00
 3 00   0   0    0   0   0    0          0          0 00
 4 00   0   0    0   0   0    0          0          0 00

Expert command (m for help): b
Partition number (1-4): 1
New beginning of data (63-3907024064, default 63): 64

Expert command (m for help): p

Disk /dev/sde: 255 heads, 63 sectors, 243201 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl     Start      Size ID
 1 00   1   1    0 254  63 1023         64 3907024001 83
 2 00   0   0    0   0   0    0          0          0 00
 3 00   0   0    0   0   0    0          0          0 00
 4 00   0   0    0   0   0    0          0          0 00

ELRepo レポジトリ

# rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://elrepo.org/elrepo-release-5-3.el5.elrepo.noarch.rpm

これで準備完了。

ドライバの導入

# yum install kmod-nvidia

このあととりあえず再起動

Xorg の設定

# Xorg -configure

で新しい xorg.conf を自動でつくる。 その後、試しに X を立ち上げてマウスカーソルが表示されればOK。

# X -configure /root/xorg.conf.new

正しく設定されていれば /etc/X11/xorg.conf としてコピーする。
X を再起動すると新しい設定で X が立ち上がる。