● rokkaku に IRAF V2.14.1、STSDAS、MSCRED をインストール 2009.07.14-15 三谷 本原さんの IRAF 2.14.1 のインストールメモを参考にしてやってみる。 1. IRAF インストール ~~~~~~~~~~~~~~~~~~~~~~ まず、インストール済みのirafディレクトリのバックアップを作成。 [anir@rokkaku local]$ su - Password: [root@rokkaku root]# cd /usr/local/ [root@rokkaku local]# ls Adobe/ bin/ etc/ info/ lib/ sbin/ OMRONDp/ doc/ games/ iraf/ man/ src/ [root@rokkaku local]# mv iraf 090714_iraf [root@rokkaku local]# ls 090714_iraf/ OMRONDp/ doc/ games/ lib/ sbin/ Adobe/ bin/ etc/ info/ man/ src/ 本原メモでは useradd -u 200 -g adm -d /usr/local/iraf/iraf/local -s /bin/tcsh -c "IRAF" iraf を実行してある。 確認すると、rokkaku にもユーザ iraf が作られている。 [root@rokkaku iraf]# cat /etc/passwd | grep iraf iraf:x:200:4:IRAF:/usr/local/iraf/iraf/local:/bin/tcsh [root@rokkaku iraf]# id iraf uid=200(iraf) gid=4(adm) 所属グループ=4(adm) インストール先のディレクトリirafを作成。iraf 以下のユーザをirafグループをadmにする。 [root@rokkaku local]# mkdir iraf [root@rokkaku local]# chown iraf.adm iraf/ [root@rokkaku local]# ls -ld iraf drwxr-xr-x 2 iraf adm 4096 Jul 14 14:31 iraf/ root@rokkaku iraf]# mkdir iraf [root@rokkaku iraf]# chown iraf.adm iraf/ [root@rokkaku iraf]# ls -l 合計 4 drwxr-xr-x 2 iraf adm 4096 Jul 14 14:35 iraf/ [root@rokkaku iraf]# cd iraf/ [root@rokkaku iraf]# mkdir local [root@rokkaku iraf]# chown iraf.adm local [root@rokkaku iraf]# ls -l 合計 4 drwxr-xr-x 2 iraf adm 4096 Jul 14 14:36 local/ 本原メモに touch /etc/redhat-release と書いてあったが、rokkakuには既に作成済みだった。 [root@rokkaku iraf]# ls /etc/redhat-release /etc/redhat-release さらに本原メモに export INSTALLER=/mnt/sscr2/motohara/INSTALL と書いてあった。 [root@rokkaku iraf]# ls /mnt/sscr2/motohara/INSTALL/ ACROREAD/ IRAF2141/ Vine42-i386.iso nittei-1.81mot03.tgz CFITSIO/ JPEG2PS/ WINFONTS/ setups/ FLASH/ MNEWS/ WNN7/ sm2_4_7.linux.tar.gz IRAF212/ NRC/ XPLNS/ test/ IRAF2122a/ OOO/ YEBISU/ xv-3.10a-13.i386.rpm IRAF212a/ SAO/ eWnn/ IRAF214/ VINE42CR/ kterm/ 最新版のIRAF 2.14.1のインストールファイルらしきものがあった。 本原さんに問い合わせてみると、これは本原さんのローカルPCに置いてあるデータがNFSで見えているものだそうで、これを展開して問題ないとのこと。 [root@rokkaku iraf]# echo $INSTALLER [root@rokkaku iraf]# export INSTALLER=/mnt/sscr2/motohara/INSTALL [root@rokkaku iraf]# echo $INSTALLER /mnt/sscr2/motohara/INSTALL [root@rokkaku iraf]# su iraf [iraf@rokkaku iraf]$ cd /usr/local/iraf [iraf@rokkaku iraf]$ mkdir irafbin [iraf@rokkaku iraf]$ echo $iraf iraf: 変数を定義していません. [iraf@rokkaku iraf]$ setenv iraf /usr/local/iraf/iraf/ [iraf@rokkaku iraf]$ echo $iraf /usr/local/iraf/iraf/ [iraf@rokkaku iraf]$ mkdir irafbin/bin.redhat [iraf@rokkaku iraf]$ mkdir irafbin/noao.bin.redhat [iraf@rokkaku iraf]$ ls irafbin/ bin.redhat noao.bin.redhat このファイルは何に必要なんだろう。。 いよいよ解凍します。 [iraf@rokkaku iraf]$ cd $iraf iraf@rokkaku iraf]$ tar zxvpf $INSTALLER/IRAF2141/as.pcix.gen.gz [iraf@rokkaku iraf]$ cd $iraf/bin.redhat [iraf@rokkaku bin.redhat]$ tar zxvpf $INSTALLER/IRAF2141/ib.rhux.x86.gz [iraf@rokkaku iraf]$ cd $iraf/noao/bin.redhat [iraf@rokkaku bin.redhat]$ tar zxvpf $INSTALLER/IRAF2141/nb.rhux.x86.gz まずインストール手順を確認するようだ。 [iraf@rokkaku bin.redhat]$ echo $LANG ja_JP.eucJP [iraf@rokkaku bin.redhat]$ setenv LANG C [iraf@rokkaku bin.redhat]$ echo $LANG C [iraf@rokkaku bin.redhat]$ cd $iraf/unix/hlib [iraf@rokkaku hlib]$ source irafuser.csh [iraf@rokkaku hlib]$ ./install -n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - New iraf root directory (/usr/local/iraf/iraf): Default root image storage directory (/iraf/imdirs): Local unix commands directory (/usr/local/bin): Proceed with installation? (yes): Proceed to post-install configuration stage? (yes): Configure IRAF Networking on this machine? (yes): Recommended dev$hosts file entry used for this machine: rokkaku : rokkaku!/usr/local/iraf/iraf/bin.redhat/irafks.e Proceed with this entry? (yes): Creating backup of default dev$hosts file... Initializing dev$hosts file ... # HOSTS -- IRAF local network host table. # Logical nodes (lpnode = line printeroutput, plnode = plotter output). #lpnode : @ursa #plnode : @ursa # Host table. rokkaku : rokkaku!/usr/local/iraf/iraf//bin.redhat/irafks.e Host 'rokkaku' has been added to the network configuration file... Checking that iraf networking is properly enabled ... [ FAIL ] *** The NETSTATUS task claims that networking is disabled. *** Please contact http://iraf.net with questions or check *** the Site Manager's Guide for details on how to properly *** configure networking. Would you like to return to networking setup? (yes): Configure IRAF Networking on this machine? (yes): に戻ってしまう。下記URLや他のサイトによると、ここで no と答えて良いらしい。 http://co.maxwell.jp/?page=iraf%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB Configure IRAF Networking on this machine? (yes): no Create a default tapecap file? (yes): Creating default file 'tapecap.rokkaku' from tapecap.linux... Do you wish to create a default dev$tapecap link? (yes): Tapecap symlink 'tapecap' exists and is ok. Do you wish to delete these unused HSI binaries? (yes): Do you wish to strip the system of sources? (no): - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - スーパーユーザになって、インストールスクリプトを実行する。 [iraf@rokkaku hlib]$ exit [root@rokkaku iraf]# tcsh [root@rokkaku iraf]# setenv iraf /usr/local/iraf/iraf [root@rokkaku iraf]# cd $iraf/unix/hlib [root@rokkaku hlib]# source irafuser.csh [root@rokkaku hlib]# ./install 今度は、 Configure IRAF Networking on this machine? (yes): で no にしなくても通った。 iraf を使い易いよう login.cl を変更する。 mkirafを実行すると、 /iraf/iraf/unix/hlib/login.clが作業ディレクトリにコピーされるようになっているらしい。 [root@rokkaku hlib]# su iraf iraf@rokkaku% setenv iraf /usr/local/iraf/iraf/ iraf@rokkaku% cd /usr/local/iraf/iraf/unix/hlib/ iraf@rokkaku% ls 合計 488 4 README 4 helplog.csh* 4 mkpkg.sf.I386 4 allocate.cl 24 i1mach.f 4 mkpkg.sf.LNUX 4 buglog.csh* 104 install* 4 mkpkg.sf.MACX 8 cl.csh* 24 install.old* 4 mkpkg.sf.OS4 8 cl.csh.ORIG* 4 iraf.h 4 mkpkg.sf.S34 4 cllogout.cl 8 irafuser.csh 4 mkpkg.sf.SF2C 4 clpackage.cl 4 knet.h 4 mkpkg.sf.SSUN 4 clpackage.hd 0 libboot.a@ 4 mkpkg.sf.SUN3 4 clpackage.men 0 libboot_p.a@ 4 mkpkg.sf.SUN4 4 config.h 4 libc/ 4 mkpkg.sf.SX86 20 d1mach.f 0 libos.a@ 4 motd 4 deallocate.cl 0 libos_p.a@ 16 r1mach.f 4 devstatus.cl 4 login.cl 4 spy.cl 4 diskspace.cl 4 mach.h 0 strip 0 ecl.csh@ 4 math.h 4 strip.iraf 4 extern.pkg 8 mkfloat.csh* 80 sysinfo* 4 extern.pkg.DEF 4 mkiraf.csh* 12 uninstall* 4 extern.pkg.IRAFNET 4 mkmlist.csh* 0 utime 8 f77.sh* 4 mkpkg.inc 0 vocl.csh@ 4 fc.csh* 4 mkpkg.sf.CYGW 4 zzsetenv.def 4 gripes.cl 4 mkpkg.sf.FBSD iraf@rokkaku% cp login.cl login.cl.org iraf@rokkaku% sed 's/xgterm/xterm/g' login.cl.org | sed '/imt800/s/#set/set/g' | sed 's/imt800/imt1024/'| sed '/\"imh\"/s/#set/set/g' | sed 's/U_IMDIR/\/tmp\/U_USER\//' > login.cl iraf@rokkaku% diff login.cl.org login.cl 画像本体(.pixファイル)の格納先を変更。 "U_IMDIR"は、インストール時に Default root image storage directoryとして設定したディレクトリらしい。 8c8 < set imdir = "U_IMDIR" --- > set imdir = "/tmp/U_USER/" dispコマンドでfitsを表示するときに 1024x1024 pixel を全て表示できるようにする。 24c24 < #set stdimage = imt800 --- > set stdimage = imt1024 IRAFが扱うデフォルトの画像形式。 31c31 < #set imtype = "imh" --- > set imtype = "imh" iraf@rokkaku% exit 本原さんはemacsで書き直さないのか。。 sed は文字列を置換するシェルスクリプトコマンドみたい。 http://itpro.nikkeibp.co.jp/article/COLUMN/20060228/231161/ 2.STSDAS インストール ~~~~~~~~~~~~~~~~~~~~~~~~~ iraf@rokkaku% cd $iraf/unix/hlib extern.pkg というファイルを編集するみたいだけど、本原メモにどう編集するか 書いてないので、とりあえず昔インストールされていた iraf の extern.pkg と diff をとってみる。 iraf@rokkaku% pwd /usr/local/iraf/iraf/unix/hlib iraf@rokkaku% diff /usr/local/090714_iraf/iraf/unix/hlib/extern.pkg extern.pkg 8,14d7 < reset tables = iraf$tables/ < task tables.pkg = tables$tables.cl < reset stsdas = iraf$stsdas/ < task stsdas.pkg = stsdas$stsdas.cl < reset mscred = iraf$mscred/ < reset mscdb = iraf$mscdb/ < task mscred.pkg = mscred$mscred.cl 20,22d12 < ,tables$lib/helpdb.mip\ < ,stsdas$lib/helpdb.mip\ < ,mscred$lib/helpdb.mip\ たくさん追記されているみたい。 昔インストールされていた iraf の extern.pkg をそのまま使うので良さそうな気がする。。コピーして試してみる。 iraf@rokkaku% cp extern.pkg extern.pkg.org iraf@rokkaku% cp /usr/local/090714_iraf/iraf/unix/hlib/extern.pkg . 必要なディレクトリを作成。 iraf@rokkaku% cd /usr/local/iraf/iraf iraf@rokkaku% mkdir tables iraf@rokkaku% mkdir stsdas ソースの解凍。ソースファイルは iraf のときと同じく下記を使わせてもらう。 iraf@rokkaku% ls /mnt/sscr2/motohara/INSTALL/IRAF2141/STSDAS 合計 149076 109504 stsdas39.bin.redhat.tar.gz 7280 tables39.bin.redhat.tar.gz 26908 stsdas39.tar.gz 5384 tables39.tar.gz iraf@rokkaku% setenv INSTALLER /mnt/sscr2/motohara/INSTALL/IRAF2141/STSDAS iraf@rokkaku% echo $INSTALLER /mnt/sscr2/motohara/INSTALL/IRAF2141/STSDAS iraf@rokkaku% cd tables iraf@rokkaku% tar zxvpf $INSTALLER/tables39.tar.gz バイナリ・リンクの作成 iraf@rokkaku% setenv IRAFARCH redhat iraf@rokkaku% echo $IRAFARCH redhat raf@rokkaku% mkpkg redhat deleting any dreg .e files left lying about in the source directories... done archiving and deleting generic objects... restoring archived redhat objects... no object archive found; full sysgen will be needed 下記 URL にしたがって再度 mkpkg してみる。。 http://astro.u-gakugei.ac.jp/~nishiura/MEMO/stsdas_install_j.html iraf@rokkaku% cd $iraf/unix/hlib/ iraf@rokkaku% source irafuser.csh iraf@rokkaku% cd /usr/local/iraf/iraf/tables/ iraf@rokkaku% mkpkg redhat system is already configured for redhat いいのかなあ?よくわからないけど、続きをやってみる。 またソースの解凍&バイナリ・リンクの作成。 iraf@rokkaku% cd bin.redhat iraf@rokkaku% pwd /usr/local/iraf/iraf/tables/bin.redhat iraf@rokkaku% tar zxvpf $INSTALLER/tables39.bin.redhat.tar.gz iraf@rokkaku% cd $iraf/stsdas iraf@rokkaku% pwd /usr/local/iraf/iraf/stsdas iraf@rokkaku% ls 合計 0 iraf@rokkaku% tar zxvpf $INSTALLER/stsdas39.tar.gz iraf@rokkaku% ls 合計 148 4 addpath.py 4 bin.sparc/ 4 pkg/ 4 apropos.cl 4 bin.ssun/ 4 problems.cl 0 bin@ 4 bin.suse/ 4 pyexecute.cl 4 bin.alpha/ 4 copyright.stsdas 4 python/ 4 bin.freebsd/ 4 data/ 4 stsci_remember_svn_info 4 bin.generic/ 4 describe.cl 4 stsdas.cl 4 bin.hp700/ 4 doc/ 4 stsdas.hd 4 bin.irix/ 4 examples.cl 4 stsdas.hlp 4 bin.linux/ 4 fix_symlinks.sh* 4 stsdas.men 4 bin.macintel/ 4 lib/ 4 stsdas.par 4 bin.macosx/ 4 load.cl 4 stsdas_motd 4 bin.redhat/ 8 mkpkg 4 bin.rs6000/ 4 nopyraf.cl iraf@rokkaku% mkpkg redhat system is already configured for redhat そもそもこれは何をするコマンドなのかね。。 iraf@rokkaku% pwd /usr/local/iraf/iraf/stsdas/bin.redhat iraf@rokkaku% tar zxvpf $INSTALLER/stsdas39.bin.redhat.tar.gz iraf@rokkaku% exit 3. MSCRED インストール ~~~~~~~~~~~~~~~~~~~~~~~~ [anir@rokkaku anir]$ su - Password: [root@rokkaku root]# su iraf iraf@rokkaku% cd $iraf iraf@rokkaku% pwd /usr/local/iraf/iraf iraf@rokkaku% mkdir mscred iraf@rokkaku% mkdir mscdb iraf@rokkaku% setenv INSTALLER /mnt/sscr2/motohara/INSTALL/IRAF2141/MSCRED iraf@rokkaku% cd mscred iraf@rokkaku% tar zxvpf $INSTALLER/mscred.tar.Z iraf@rokkaku% tar zxvpf $INSTALLER/mscred-bin.redhat.tgz iraf@rokkaku% cd $iraf/mscdb iraf@rokkaku% tar zxvpf $INSTALLER/mscdb.tar.Z iraf@rokkaku% exit exit