在Fedora 10中安装IRAF

版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明

据说,每一个版本的Linux上安装iraf的方法都不相同。下面的方法在我使用的Fedora 10上是安装成功了的,至于其它版本的Linux上是否适用便不得而知了,即使是fedora10 也不能保证成功。

1.把名为xgterm.fedora的补丁贴到/usr/local/bin/下,改名xgterm。

2.打开终端以root用户登录,创建目录:/iraf和/iraf/iraf。

3.创建用户iraf,根目录设为“/iraf/iraf/local/”,切记登陆shell是/bin/csh。

4.把/iraf/和/iraf/iraf/的所有者都改成iraf。

具体做法是在终端中,以root身份进行如下操作:

# chown -R iraf /iraf

# chown -R iraf /iraf/iraf

# chgrp -R iraf /iraf

# chgrp -R iraf /iraf/iraf

# chmod 777 /iraf

# chmod 777 /iraf/iraf

5.重新以iraf用户登录系统。创建如下的目录树:

mkdir /iraf/irafbin

mkdir /iraf/irafbin/bin.RedHat

mkdir /iraf/irafbin/noao.bin.redhat

mkdir /iraf/extern

mkdir /iraf/extern/mscred

mkdir /iraf/extern/stsdas

mkdir /iraf/x11ira

6.把从 上下载下来的as.pcix.gen.gz文件复制到/iraf/iraf目录下,把ib.rhux.x86.gz复制到目录/iraf/irafbin/bin.redhat下,把nb.rhux.x86.gz复制到目录/iraf/irafbin/noao.bin.redhat下。然后进行如下操作:

cd /iraf/iraf/

cat as.pcix.gen.gz | zcat | tar -xpf –

cd /iraf/irafbin/bin.redhat

cat ib.rhux.x86.gz | zcat | tar -xpf –

cd /iraf/irafbin/noao.bin.redhat

cat nb.rhux.x86.gz | zcat | tar -xpf –

7.设定环境。在终端中运行命令:

setenv iraf /iraf/iraf/local

8.安装。分为两步,既在iraf安装和在root下安装。

首先是在iraf下安装。

cd /iraf/iraf/unix/hlib/

source irafuser.csh

./install –n

首先,按其提示设置一下目录。往下,一路回车即可。遇到网络配置选项,如出问题可选择否:Configure IRAF Networking on this machine? (yes): n 。其它的一路回车。最后终端中会有安装成功的提示。

然后是在root下安装。在终端中输入:

su

# ./install –n

做法和在iraf安装一样。

9.mkiraf 。在终端中以iraf的身份在进行以下操作:

cd

mkiraf

此时会出现选项,在终端中输入xgterm。

10. 运行。

安装过程到这里应该都比较顺利,在下一步运行时可能会出问题。在终端中输入:

cl

如果运行成功,,终端中会出现以下信息:

setting terminal type to xgterm…

timeout – terminal type set wrong? (`stty termtype’ to reset)

NOAO/IRAFNET PC-IRAF Revision 2.14.1 Mon Sep 15 10:12:05 MST 2008

This is the RELEASED version of IRAF V2.14 supporting PC systems.

Welcome to IRAF. To list the available commands, type ? or ??. To get

detailed information about a command, type `help <command>’. To run a

command or load a package, type its name. Type `bye’ to exit a

package, or `logout’ to get out of the CL. Type `news’ to find out

what is new in the version of the system you are using.

Visit if you have questions or to report problems.

The following commands or packages are currently defined:

dataio. images. lists. obsolete. proto. system.

dbms. language. noao. plot. softools. utilities.

否则,应该会出现:

/iraf/iraf/bin.redhat/ecl.e: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory

我在安装的时候就遇到了第二种情况。这时在终端中运行:

cd /usr/lib

ln -s libncurses.so libtermcap.so.2

此时问题应该可以解决了,以后在终端中直接输入“cl”即可使用iraf了。

注:文中黑体为可直接输入的命令,红色黑斜体为终端中输出的内容。前面带有#的命令是以root身份使用的,其他命令是以iraf用户身份使用的。

穿过紫堇,穿过木棉,穿过时影时现的悲喜和无常。

在Fedora 10中安装IRAF

相关文章:

你感兴趣的文章:

标签云: