QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1771|回复: 29

请问如下环境变量应该如何设置

[复制链接]
发表于 2004-3-5 18:25:07 | 显示全部楼层 |阅读模式
应该放到什么地方呢?原文说加到“your .cshrc (or other startup) file”,根本找不到这个文件啊。
我用的是RH 9.0,原文如下。请大家帮忙。

Several environment variables are required for the RenderMan Artist Tool applications to function correctly. The RAT tools utilize a combination of your searchpath and environment variables to specify versions and locations of the various components of the toolset. You'll find that this simple mechanism allows you to quickly switch between versions of RAT and RenderMan. Please add the following lines to your .cshrc (or other startup) file:

# RMANTREE establishes the location of your prman distribution
# RATTREE establishes the location of your RAT distribution
# RATDOCTREE establishes the location of your Pixar documentation distribution
# RMANFB establishes your framebuffer display program
# MAYA_PLUG_IN_PATH tells maya's plugin manager where to consider looking
#      for plugins.
# MAYA_SCRIPT_PATH establishes the location of maya scripts.
# MAYA_LOCATION establishes the location of maya - used below for convenience only
# XBMLANGPATH establishes the location of additional icons
# LD_LIBRARY_PATH establishes the search order used by the dynamic loader
#      to locate shared objects
# path established the searchpath for the execution of programs.  Because
#      RAT tools execute other programs (eg: MTOR launches glimpse), this path
#      governs application versions.
#
setenv RMANTREE /opt/pixar/prman-10.0
setenv RATTREE /opt/pixar/rat-5.0
setenv RATDOCTREE /opt/pixar/docs-5.0
setenv RMANFB it
setenv AW_LOCATION /usr/aw
setenv MAYA_LOCATION $AW_LOCATION/maya
setenv MAYA_PLUG_IN_PATH  $RATTREE/bin
setenv MAYA_SCRIPT_PATH $RATTREE/lib/mtor/resources
setenv XBMLANGPATH "$RATTREE/lib/mtor/resources/%B"
setenv LD_LIBRARY_PATH "$MAYA_LOCATION/lib:$RATTREE/bin"
if ($RATTREE == $RMANTREE) then
     set path = ($path $RMANTREE/bin)
else
     set path = ($path $RATTREE/bin $RMANTREE/bin)
endif
 楼主| 发表于 2004-3-6 16:01:24 | 显示全部楼层
请大家帮忙
回复

使用道具 举报

发表于 2004-3-6 16:10:43 | 显示全部楼层
rh9 默认用的是 bash
原文说加到“your .cshrc (or other startup) file

ls -a ~/.bashrc #《---- 这个文件吧
//
要是你想修改的话先备份
cd ~/
cp .bashrc .bashrc.bak
vi .bashrc
# bash 的最后添加这些,不过语法得改一下
export RMANTREE=/opt/pixar/prman-10.0 # <---  改成这种形式,下同.

setenv RATTREE /opt/pixar/rat-5.0
setenv RATDOCTREE /opt/pixar/docs-5.0
setenv RMANFB it
setenv AW_LOCATION /usr/aw
setenv MAYA_LOCATION $AW_LOCATION/maya
setenv MAYA_PLUG_IN_PATH $RATTREE/bin
setenv MAYA_SCRIPT_PATH $RATTREE/lib/mtor/resources
setenv XBMLANGPATH "$RATTREE/lib/mtor/resources/%B"
setenv LD_LIBRARY_PATH "$MAYA_LOCATION/lib:$RATTREE/bin"
#
# 下面的 path 是否试 bash 中的 PATH ?
# 你如果运行有问题你换一下试试。
#
if [ $RATTREE = $RMANTREE ]; then # <--- if 语法要改
export path=$path:$RMANTREE/bin # <---- 这里这样改一下试试, 下同
else
set path = ($path $RATTREE/bin $RMANTREE/bin)
fi
回复

使用道具 举报

 楼主| 发表于 2004-3-6 16:51:00 | 显示全部楼层
谢谢斑竹的指导,我在linux上不了网,现在马上去试。
另外,请问把这些内容加到
/etc/profile
里面也是一样的吗?

修改内容是否应该这样:
export RMANTREE=/opt/pixar/prman-10.0
export RATTREE=/opt/pixar/rat-5.0
export RATDOCTREE=/opt/pixar/docs-5.0
export RMANFB=it
export AW_LOCATION=/usr/aw
export MAYA_LOCATION=$AW_LOCATION/maya
export MAYA_PLUG_IN_PATH=$RATTREE/bin
export MAYA_SCRIPT_PATH=$RATTREE/lib/mtor/resources
export XBMLANGPATH="$RATTREE/lib/mtor/resources/%B"
export LD_LIBRARY_PATH="$MAYA_LOCATION/lib:$RATTREE/bin"
if [ $RATTREE = $RMANTREE ]; then
export path=$path:$RMANTREE/bin
else
export path=$path:$RATTREE/bin:$RMANTREE/bin
fi

另外,我装的软件,RAT,是在RH7.3下面的版本,我现在装的是RH9,请问一般来说需要改哪些地方呢?
谢谢。
回复

使用道具 举报

发表于 2004-3-6 17:03:44 | 显示全部楼层
嗯,可以写到 /etc/profile  中,不过备份先!!
那个 path 问题我觉得还是用 PATH
也就是改成:
export PATH=$PATH:$RMANTREE/bin
这样的形式。
//
这个没有 rh9 下的版本吗?
没有用过,你装的是 xxxx.bin 吗?
你可以试试看!
回复

使用道具 举报

 楼主| 发表于 2004-3-6 17:28:28 | 显示全部楼层
在Maya里面装载的路径是找到了,应该没大问题,不过还是装载不了,估计就是版本的兼容问题了。
RenderMan Artist Tools本来就是稀有资源,在windows下的版本都是很难找,不过还能有,呵呵。在Linux下的版本就很罕见了,估计没几个人能装上的原因。
软件一共是5个rpm包:
license-2.0-0.i386.rpm
docs-5.5-RH7.2.i386.rpm
prman-11.3-0.i386.rpm
(这三个是不分版本的)
alfserver-2.5-RH7.2.i386.rpm
(这个可以不装)
rat-5.5.1-RH7.3.i386.rpm
(问题的关键就是这个包)

一般情况下可能需要改哪些地方呢?
回复

使用道具 举报

发表于 2004-3-6 17:38:12 | 显示全部楼层
你启动或运行这个程序的时候有什么提示吗?最好能从终端中启动,把程序输出的信息贴出来,
不太明白你说的改动?
回复

使用道具 举报

 楼主| 发表于 2004-3-6 18:09:21 | 显示全部楼层
我把path改成path后启动不了了……
连ls,vi这些命令都认不到了,cd还能认。
可能是什么原因呢?
回复

使用道具 举报

 楼主| 发表于 2004-3-6 18:11:33 | 显示全部楼层
也可能是这些改动的原因:
我照说明来做的。

Running the License Server
After installing your license, you will need to start a license server daemon on the license server host. The license server daemon can be manually started on a host by using the shell script /opt/pixar/license-version/startlm.sh. The script may be invoked interactively by any user or from the system startup. The license manager needs no special privileges to run.

In order to have the license server be started automatically, you may want to install an rc.d script. For example:

#!/bin/sh

# Start the license manager
case "$1" in
    'start')
        ( cd /opt/pixar/license-1.0 ; ./startlm.sh) > /dev/null 2>&1
            ;;
    'stop')
        ( cd /opt/pixar/license-1.0 ; ./stoplm.sh) > /dev/null 2>&1
            ;;
    *)
        echo "usage: $0 {start|stop}"
            ;;
esac
can be placed into the directory /etc/rc2.d and renamed to S99startlm.



Running the Alfred Maitre-d
If you have decided to run an Alfred Maitre-d, and you have already configured alfred.ini (see the above section on Alfred), you will need to ensure that the maitre-d machine is running the alfred maitre-d before running the alfred UI or dispatcher on other machines.

The alfred maitre-d is started by running alfred with the -maitre_d flag. The alfred executable is located by default in /opt/pixar/rat-version/bin. It should not be run as root, since it does not require special permissions.

In order to have the license server be started automatically, you may want to install an rc.d script. For example:

#!/bin/sh

# Start the license manager
case "$1" in
    'start')
        ( cd /opt/pixar/rat-5.0/bin ; ./alfred -maitre_d) > /dev/null 2>&1
            ;;
    'stop')
        ( cd /opt/pixar/rat-5.0/bin ; ./alfred -maitre_d) > /dev/null 2>&1
            ;;
    *)
        echo "usage: $0 {start|stop}"
            ;;
esac
can be placed into the directory /etc/rc2.d and renamed to S99maitred.


那个改动是问题的关键呢?
应该怎么恢复呢?我没软驱。
回复

使用道具 举报

发表于 2004-3-6 19:44:54 | 显示全部楼层
[quote:22ba41794d="lf426"]我把path改成path后启动不了了……
连ls,vi这些命令都认不到了,cd还能认。
可能是什么原因呢?[/quote]
这个 path 是大写!
出现无法找到 ls, vi ??
你 echo $PATH 看看,如果没有解决,在你的 /etc/profile 中的
[code:1]
#!/bin/sh
#<-------- 这之后添加
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11"

[/code:1]
//
至于你贴的这两个脚本,我不太清楚它的使用,看它说明是要你
将这两个脚本改名 放到 /etc/rc2.d 目录中 ....
回复

使用道具 举报

 楼主| 发表于 2004-3-6 19:52:41 | 显示全部楼层
是的,那两个脚本我就是做好了,放到了/ect/rc2.d目录中。

现在的问题是启动不了X,Ctral+Alt+F1退出也无法来用init 3命令,说都不认识这些命令。
现在好象就只能用cd,怎么解决应该?
回复

使用道具 举报

发表于 2004-3-6 20:00:52 | 显示全部楼层
老兄你能把你的 echo $PATH 输出贴出来吗?
我也有个参考啊
回复

使用道具 举报

 楼主| 发表于 2004-3-6 20:11:48 | 显示全部楼层
马上哈,我菜,刚才没理解你意思。
不知道这个命令能不能用。
回复

使用道具 举报

 楼主| 发表于 2004-3-6 20:21:54 | 显示全部楼层
echo $PATH
的结果是
/opt/pixar/rat-5.5.1/bin:/opt/pixar/prman-11.3/bin:/root/bin

前面那两个是我设置的,下面应该怎么操作?
回复

使用道具 举报

发表于 2004-3-6 20:36:51 | 显示全部楼层
/opt/pixar/rat-5.5.1/bin:/opt/pixar/prman-11.3/bin:/root/bin

前面那两个是我设置的

//
你怎么设置的,是用上面的 /etc/profile 吗? 没有 /root/bin 这个目录!
//
如果找不到命令你可以手动增加 shell 搜索路径
PATH=$PATH:/bin:/usr/bin:/usr/loca/bin:/usr/bin/X11
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-29 21:26 , Processed in 0.052049 second(s), 17 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表