歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu下安裝配置Gamit10.35總結

Ubuntu下安裝配置Gamit10.35總結

日期:2017/2/28 13:53:26   编辑:Linux教程

一、使用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

Copyright © Linux教程網 All Rights Reserved