一、使用root用户登录Ubuntu
安装完成如需使用root身份登录,可打开终端输入以下命令:
#设置root密码
1 sudo passwd root
#切换到root用户
1 sudo -s
#输入:(注意空格)
1 sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
#在弹出的编辑框里输入:
50-ubuntu.conf:
1 [SeatDefaults] 3 autologin-user=root 5 user-session=ubuntu 7 greeter-show-manual-login=true
#保存关闭,回到终端窗口,输入:
1 sudo passwd root
#回车,并输入两次密码
#重启,按root用户登录,密码为上一步设置的密码
二、准备工作(root权限下)
输入以下命令(不分先后),完成Ubuntu的初步配置。
1 apt-get install gfortran//安装gfortran4.2编译器及其依赖的全部软件包; 2 3 apt-get install libx11-dev//安装 libx11-dev软件包及其依赖的全部软件包; 4 5 apt-get install csh//安装csh; 6 7 apt-get install tcsh//安装tcsh; 8 9 apt-get install gmt//安装gmt4.2及其相关的软件包。
完成后输入
‘chsh’然后输入‘/bin/csh’,重启,使用echo $SHELL验证
准备工作
三、安装GAMIT10.35
首先在/opt目录(用于存放可选的应用程序)下建立GAMIT/GLOBK的安装目录,并将安装文件拷贝释放到该目录下。
终端中输入
1 Searching your system for X11 installation 2 3 Found these paths to X11 libs and includes on your system 4 5 X11LIBPATH: /usr/lib 6 7 X11INCPATH: /usr/include/X11 8 9 Are these correct for your system? 10 11 Continue? (y/n)
开始安装
安装进行到
1 Searching your system for X11 installation 2 3 Found these paths to X11 libs and includes on your system 4 5 X11LIBPATH: /usr/lib 6 7 X11INCPATH: /usr/include/X11 8 9 Are these correct for your system? 10 11 Continue? (y/n)
打开
1 /opt/gamit_globk/libraries/Makefile.config
修改内容:
maxatm = 13
改为25,确认继续直至安装完成
四、.cshrc的配置
主文件夹中新建.cshrc文件,输入如下配置信息
1 # set prompt 2 3 set prompt = "[`echo $cwd`]% " 4 5 set history = 50 6 7 #set system path 8 9 set path = (. /bin /sbin /etc /usr/bin /usr/sbin /usr/bin/X11 /usr/X11R6/bin $path) 10 11 set path = (. /usr/local/bin /usr/local/sbin /usr/local/lib /usr/lib $path) 12 13 setenv PATH "/usr/sbin:/sbin:${PATH}" 14 15 setenv MANPATH /usr/local/man:/usr/X11R6/man 16 17 setenv LIBPATH /usr/lib:/usr/local/lib 18 19 #set Gamit/Globk path 20 21 set gamitpath = /opt/gamit_globk 22 23 set path = (. $gamitpath/gamit/bin $gamitpath/kf/bin $gamitpath/com $path) 24 25 setenv HELP_DIR $gamitpath/help/ 26 27 #set GMT path 28 29 set gmtpath = /usr/lib/gmt/ 30 31 set path = (. $gmtpath/bin $gmtpath/include $gmtpath/lib $gmtpath/man $gmtpath/share $gmtpath/www $path) 32 33 set path = (. /etc/gmt /usr/include/gmt /usr/lib/gmt /usr/share/gmt /usr/share/doc/gmt $path) 34 35 setenv MANPATH $gmtpath/man 36 37 #set full domain for GAMIT shell-scripts used to transfer data (sh_get_nav, sh_get_rinex, sh_get_orbits, and sh_get_hfiles) 38 39 set host = `\hostname | \awk -F. '{print $1}'` 40 41 set dom = `\hostname | \awk -F. '{print $2}'` 42 43 if( $dom == '' ) then 44 45 alias hostname 'echo $host.mit.edu' 46 47 endif 48 49 # set alias 50 51 alias cd 'cd \!*; set prompt = "[`echo $cwd`]% "' 52 53 alias pwd 'echo $cwd' 54 55 alias ls 'ls --classify' 56 57 alias ll 'ls -l' 58 59 alias la 'ls -a' 60 61 alias rm 'rm -i' 62 63 alias mv 'mv -i'
保存关闭
终端中输入
1 Source .cshrc
配置完成
五、使用doy命令验证
返回,安装完成
1 DOY: Converts various date formats 2 3 4 5 DOY: Converts various date formats. 6 7 8 9 Runstring: 10 11 % doy <jd/year> <doy/month> <day> <hr> <min> 12 13 or 14 15 % doy <gps_week>W <gps_sow/gps_dow> 16 17 or 18 19 % doy <DecYear>Y 20 21 22 23 where jd is Julian date (assumed if only one argument) 24 25 year is calender year 26 27 doy is day of year (assumed if two arguments) 28 29 month is month 30 31 day is day of month. 32 33 hr min is hrs and minutes of day (Only if ymd form used). 34 35 In the second form (i.e. W appended to the first value), 36 37 the entries are assumed to gps week no and the second entry 38 39 (optional) is either gps day of week (0-6) or seconds of 40 41 gps week. 42 43 NOTE: GPS Day of Week runs from 0-6 (Changed May 20, 1997). 44 45 In the third form with Y appended, the argument is taken as 46 47 deciminal year. (Versions after 2004/12/21 correctly account 48 49 for leap years in converting deciminal years back to Julian dates) 50 51 52 53 The conversions made are based on the number of arguments 54 55 passed. 56 57 58 59 NDOY: Version of doy of year which takes keyboard input in the 60 61 forms above. (^D ends program input). 62 63 64 65 Example: doy 92 200 66 67 Date 1992/07/18 0:00 hrs, DOY 200 JD 2448821.5000 MJD 48821.0000 68 69 GPS Week 653 Day of week 6, GPS Seconds 518400 Day of Week Sat 70 71 Decimal Year 1992.54372 72 73 74 75 Example: doy 654W 345600 76 77 Date 1992/07/23 0:00 hrs, DOY 205 JD 2448826.5000 MJD 48826.0000 78 79 GPS Week 654 Day of week 4, GPS Seconds 345600 Day of Week Thu 80 81 Decimal Year 1992.55738 82 83 84 85 ***TODAY*** IS: 86 87 Date 2015/12/29 14:09 hrs, DOY 363 JD 2457386.0902 MJD 57385.5902 88 89 GPS Week 1877 Day of week 2, GPS Seconds 223790 Day of Week Tue 90 91 Decimal Year 2015.993398
GAMIT10.6安装包下载 http://www.linuxidc.com/Linux/2016-02/128333.htm
GAMIT相关阅读:http://www.linuxidc.com/GAMIT/
GAMIT10.4及最新版本的GAMIT下载在Linux公社5号FTP服务器,具体下载见 http://www.linuxidc.net/thread-1186-1-1.html
更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2
本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-04/129732.htm