2008年4月12日土曜日

さらに追加ソフトのインストール

いろんなソフトをコンパイルするためにビルド環境を構築していきます。さらに追加でgrepとcoreutilsのインストールです。玄箱の素のgrepは正常に動作しない問題があるらしく、grepを新しいものに入れ替えます。coreutilsは、玄箱の素の状態では色々とコマンド類が足りず、この先の作業がとても不便です。基本コマンド類集のcoreutilsもインストールします。
まず、以下のURLよりgrepとcoreutilsのソースコードを入手しました。
http://ftp.yz.yamagata-u.ac.jp/pub/GNU/grep/
http://ftp.yz.yamagata-u.ac.jp/pub/GNU/coreutils/
  • grep-2.51
$ tar xvzf grep-2.51a.tar.gz
$ cd grep-2.51a
$ ./configure
$ make
$ make check
# make install
# strip -p /usr/bin/grep
# rm /bin/grep /bin/egrep /bin/fgrep
# if echo GNU | egrep '(GNU|BFD)' > /dev/null; then echo "Good egrep"; else echo "Bad egrep"; fi
Good egrepとでればOK
  • coreutils-5.96
$ tar xvzf coreutils-5.96.tar.gz
$ cd coreutils-5.96
$ ./configure --prefix=/usr
$ make
$ make check
# make install
# cd /usr/bin
# strip -p [ date false ln paste sha1sum tee users basename dd fmt logname pathchk shred test vdir cat df fold ls pinky sleep touch wc chgrp dir groups md5sum pr sort tr who chmod dircolors head mkdir printenv split true whoami chown dirname hostid mkfifo printf stat tsort yes chroot du hostname mknod ptx stty tty cksum echo id mv pwd su uname comm env install nice readlink sum unexpand cp expand join nl rm sync uniq csplit expr kill nohup rmdir tac unlink cut factor link od seq tail uptime
なんだかよくわかりませんが、以下もやっておくといいらしいです
# ln -s /bin/vi /usr/bin/editor
# ln -s /usr/bin/true /bin/true
# ln -s /usr/bin/false /bin/false
# ln -s /usr/bin/pwd /bin/pwd