so confused about setting up environment
Hi all,
I am so confused about .cshrc and .bashrc. Any way, I have been using .bashrc for my database and application, below is what I have:
#SDE 8.3 number 1
export SDEHOME=/home/sde/sdeexe83
export ORACLE_HOME=/home/oracle/product/9.2.0
export ORACLE_SID=test
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:$SDEHOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$SDEHOME/lib:$ORACLE_HOME/lib
export ESRI_ARCSDE_LICENSE_FILE=27005@linux
right now, I have one instance running on this server with the a third party application called ESRI, in order to run ESRI service, I have to have the above env setup. So now, I want to add another instance and I want ESRI service running on this instance as well but it seems like I have problem with env. Below is what I have in addition with the env above:
#SDE 8.3 number 2
export SDEHOME=/home/sde/sdeexe83_2
export ORACLE_HOME=/home/oracle/product/9.2.0
export ORACLE_SID=mydummy
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:$SDEHOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$SDEHOME/lib:$ORACLE_HOME/lib
export ESRI_ARCSDE_LICENSE_FILE=27005@linux
as you see, I have different Oracle SId b/c I have two instances, and different SDEHOME b/c it required by ESRI. I spoke with one of the ESRI support and they send me the env but it's .cshrc which I told them I am using .bashrc. Below is the .cshrc they sent me based on the bashrc I have sent them:
revised .cshrc file
**************************************************************************************************** *****
.bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
alias sde83 setenv VERSION sde83
alias sde83_2 setenv VERSION sde83_2
alias so 'source ~/.cshrc'
export ESRI_LICENSE_FILE 27005@linux
if($?VERSION == 0)then
setenv VERSION sde83
endif
switch ($VERSION)
echo $VERSION
case "sde83"
setenv SDEHOME /home/sde/sdeexe83
setenv ORACLE_HOME ORACLE_HOME /home/oracle/product/9.2.0
setenv ORACLE_SID test
setenv TNS_ADMIN $ORACLE_HOME/network/admin
setenv LD_LIBRARY_PATH /usr/lib:/usr/ucblib:$SDEHOME/lib:$ORACLE_HOME/lib
set path = ( ./ $path /sbin /usr/sbin /usr/bin /usr/ccs/bin /usr/ucb /etc /usr/etc $ORACLE_HOME/bin /usr/local/bin $SDEHOME/lib $SDEHOME/bin /usr/openwin/bin)
setenv SDEINSTANCE esri_sde
setenv ESRI_ARCSDE_LICENSE_FILE 27005@linux
echo ""
echo "Machine is now setup for ArcSDE 83 on Oracle 9.2 on port 5151"
echo ""
echo "**(For ArcSDE 83(second instance) setup type: sde83_2;so )**"
echo ""
set prompt = "$VERSION > "
breaksw
#####SDE 8.3
####export SDEHOME=/home/sde/sdeexe83
####export ORACLE_HOME=/home/oracle/product/9.2.0
####export ORACLE_SID=test
####export TNS_ADMIN=$ORACLE_HOME/network/admin
####export PATH=$PATH:$SDEHOME/bin:$ORACLE_HOME/bin
####export LD_LIBRARY_PATH=$SDEHOME/lib:$ORACLE_HOME/lib
####export ESRI_ARCSDE_LICENSE_FILE=27005@linux
case "sde83_2"
setenv SDEHOME /home/sde/sdeexe83_2
setenv ORACLE_HOME /home/oracle/product/9.2.0
setenv ORACLE_SID mydummy
setenv TNS_ADMIN $ORACLE_HOME/network/admin
setenv LD_LIBRARY_PATH /usr/lib:/usr/ucblib:$SDEHOME/lib:$ORACLE_HOME/lib
set path = ( ./ $path /sbin /usr/sbin /usr/bin /usr/ccs/bin /usr/ucb /etc /usr/etc $ORACLE_HOME/bin /usr/local/bin $SDEHOME/lib $SDEHOME/bin /usr/openwin/bin)
setenv SDEINSTANCE esri_sde2
setenv ESRI_ARCSDE_LICENSE_FILE 27005@linux
echo ""
echo "Pride is now setup for ArcSDE 83_2 on Oracle 9.20 on port 5152"
echo ""
echo " **(For ArcSDE 83 setup type: sde83;so )**"
echo ""
set prompt = "$VERSION > "
endsw
####SDE 8.3 for mydummy
####export SDEHOME=/home/sde/sdeexe83_2
####export ORACLE_HOME=/home/oracle/product/9.2.0
####export ORACLE_SID=mydummy
####export TNS_ADMIN=$ORACLE_HOME/network/admin
####export PATH=$PATH:$SDEHOME/bin:$ORACLE_HOME/bin
####export LD_LIBRARY_PATH=$SDEHOME/lib:$ORACLE_HOME/lib
####export ESRI_ARCSDE_LICENSE_FILE=27005@linux
**************************************************************************************************** *********************
can someone help me to translate the above cshrc to bashrc???
thanks,
|