Solarsoft (SSW及SSWDB)的配置流程 on Linux
虚词用错了,比较汗噻。。。
- 从Lmsal网站上填安装单,或者照下面的代码改。
#!/bin/csh -f
############################################################
# created via WWW at Mon Mar 30 21:12:13 2009
############################################################
setenv SSW /usr/local/ssw
setenv ssw_host sohoftp.nascom.nasa.gov
setenv ssw_sw_host sohoftp.nascom.nasa.gov
setenv ssw_tar_old_style ""
setenv ssw_sw_sets "ssw_ssw_site ssw_hinode_gen ssw_hinode_sot ssw_packages_panorama ssw_packages_pdl ssw_packages_nlfff ssw_packages_nrl ssw_packages_ngdc ssw_packages_poa ssw_packages_ztools ssw_packages_xray ssw_packages_vdem ssw_packages_spex ssw_packages_pfss ssw_packages_mjastereo ssw_packages_cmes ssw_packages_cactus ssw_packages_binaries ssw_packages_andril ssw_packages_ana ssw_packages_chianti ssw_packages_lparl ssw_packages_findstuff ssw_packages_hydro ssw_packages_festival ssw_packages_corimp ssw_ssw_gen"
setenv ssw_db_sets ""
setenv ssw_passive_ftp
setenv ssw_skip_sizechk 1
############################################################
#
# S.L.Freeland
# 27-May-1996 - adapt from ys_install for SSW
#
#; Name: ssw_install
#;
#; Purpose: auto-ftp, then install or upgrade from compressed tar files
#;
#; Calling Sequence:
#; ssw_install [/noftp] [/site] [/nodelete] [/nodbase] [/noexe] [/help]
#;
#; Optional Parameters (override defaults):
#; /full - force full upgrade
#; /noftp - dont ftp new files (use existing $SSW/offline/swmaint/tar)
#; /site - force installation of site branch
#; /nodbase - dont unpack data base files
#; /nodelete - dont remove tar files
#; /noexe - inhibits execution of customized script
#; /size - print installation disk size requirements and exit
#; /ysrem - remove branches from ys PRIOR to ftp transfer
#; /help - print out this header and exit with no action
#; /nomail - if set, inhibit mail (in case system dependent problem)
#;
#; Notes:
#; site branch - available for local routines and local cusomization
#; default is to not clobber this if it exists
#; dbase files - these include Yohkoh ephemeris, Yohkoh event logs
#; goes events/data.... etc These are highly recommended
#; for full SW function unless disk space is extremely
#; limited at your site
#;
#;History:
#; 27-May-1996 - Samuel Freeland, adapted for SSW
#; ys->SSW, permit SW installation package from $ssw_host
#; (default host = sohoftp.nascom.nasa.gov)
#; 14-Jul-2005 - S.L.Freeland - check $ssw_passive_ftp
#; 20-Jul-2005 - S.L.Freeland - gunzip instead of uncompress
#;
set curdir=`pwd`
setenv ssw_curdir $curdir
if (!($?SSW)) then
if ($curdir:t == "tar") set curdir=$curdir:h
if ($curdir:t == "swmaint") then
setenv SSW $curdir:h
else
if( (!($?ys)) && (-e /ys) ) then
setenv ys /ys
else
echo Please define environmental variable SSW and retry
echo or run this from your tar file location...
exit #### unstructured exit
endif
endif
endif
# --- setup defaults---
setenv ssw_noftp 0 # default is to ftp files required
setenv ssw_dosite 0 # instll ys_site
setenv ssw_dodata 1 # install any existing non-ys (ydb,etc)
setenv ssw_remove 1 # remove tar files after installation
setenv ssw_doexe 1 # execute customized script
setenv ssw_dohelp 0 # dont show help
setenv ssw_full 0 # default is incremental if available
setenv ssw_size 0 # if set, print size diagnostics and exit
setenv ssw_ysrem 0 # if set, remove ys before ftp transfer
setenv ssw_nomail 0 # if set, inhibit mail-> user and SSW
# ----------------------------------------------------------------------
# update defaults if site config file exists
if (-e $SSW/site/setup/ssw_install.config) source $$SSW/site/setup/ssw_install.config
# ----------------------------------------------------------------------
# --- handle parameters ---
foreach argx ($argv)
switch ($argx)
case full: # force full upgrade (def=incremental)
case /full:
setenv ssw_full 1
breaksw
case site: # force site branch expansion
case /site:
setenv ssw_dosite 1
breaksw
case dbase: # force data base expansion (default)
case /dbase:
setenv ssw_dodata 1
breaksw
case nodbase: # inhibit data base expansion
case /nodbase:
setenv ssw_dodata 0
breaksw
case delete: # force tar file removal
case /delete:
case remove:
case /remove:
setenv ssw_remove 1
breaksw
case /nodelete: # inhibit tar file removal
case nodelete:
case noremove:
case /noremove:
setenv ssw_remove 0
breaksw
case noexe: # inhibit exectution of script
case /noexec:
case /noexe:
setenv ssw_doexe 0
breaksw
case help:
case /help:
setenv ssw_dohelp 1
breaksw
case noftp:
case /noftp:
setenv ssw_noftp 1
breaksw
case ysrem:
case /ysrem:
setenv ssw_ysrem 1
breaksw
case size:
case /size:
setenv ssw_size 1
breaksw
case /nomail: # Inhibit mail
setenv ssw_nomail 1
breaksw
default: # dont know this one
echo Unrecognized option: $argx
echo Exiting....
exit ### unstructured exit
breaksw
endsw
end
# ------------------------------------------------------------------
if ($ssw_dohelp == 1) then
cat $SSW/offline/swmaint/tar/ssw_install | grep "#;"
exit
endif
# ----- get newest installation kit ------------
unset noclobber # protect agains local environ
set workdir=$SSW/offline/swmaint/script
set host=`hostname`
mkdir -p $workdir
# slf 13-Jul-1994 - make boot tape (/noftp) compatible with network install
set instools=ssw_install.tar
if (!($?ssw_sw_host)) then
setenv ssw_host "150.144.30.91"
endif
if (!($?user)) then
set user=`whoami`
endif
if ( (-e ssw_install.tar.Z) && ($ssw_noftp == 1)) then
cp -p ssw_install.tar.Z $workdir # probably boot tape
cd $workdir
else
cd $workdir
set ftpins = $workdir/getins.ftp
set passive=`printenv ssw_passive_ftp`
echo "===== passive="$passive" ============"
echo Generating ftp transfer script
########## build ftp script ########
echo "open "$ssw_host > $ftpins
echo user ftp "$user""@""$host" >> $ftpins
if ($passive == "1") echo passive on >> $ftpins
echo binary >> $ftpins
echo cd /solarsoft/offline/swmaint/tar >> $ftpins
echo get $instools".Z" >> $ftpins
echo bye >> $ftpins
####################################
echo Starting ftp transfer of installation package: $instools".Z"
ftp -in < $ftpins
endif
if (!(-e $instools".Z")) then
if ($ssw_noftp == 1) then
echo "Could not find installation package:"$instools.".Z"
echo "Contact freeland@penumbra.nascom.nasa.gov for guidence..."
else
echo "Trouble transfering installation package, try again later..."
endif
endif
gunzip -f $instools".Z"
tar -xf $instools
# transfer control to $workdir/ssw_install.control
echo Transferring control to: $workdir/ssw_install.control
source $workdir/ssw_install.control
exit
ssw_sw_sets
; 如果在教育网内,还要在ssw_passive_ftp
后面添个1
,以启用被动连接。 - 用
csh -f
后跟脚本文件名,启动安装脚本。需要root权限。这个时间很长,需要等。 - 照Lmsal上面的说明,配置
~/.tcshrc
启动文件:
setenv SSW /usr/local/ssw
setenv SSW_INSTR "hinode hinode_sot"
source $SSW/gen/setup/setup.ssw /loud - 以root权限进入CShell。在Lmsal网站上生成SSWDB的安装文件,或者照下面写,放在
$SSW/site/setup/setup.sswdb_upgrade
里
#soho/eit
#DIR_GEN_G0D
#DIR_GEN_G2D
#DIR_GEN_G8D
#DIR_GEN_G9D
hinode/sot
#hinode/xrt - 进入SSWIDL,输入命令
sswdb_upgrade, /spawn, /loud/passive
参数。这一步更加漫长。不过做完了就好了。