1: Get root privileges (only for users who have not modified the root password after ubunt, if the password has been modified, but forgotten, then go to single-user mode to modify): Open command line : Ctrl + Alt+t
Enter sudo passwd and enter the password two times, this is the correct root password (then enter the password is the screen will not have any reaction, so do not think the keyboard is bad or the system has a problem).
then enter the SU root, and then enter the modified root password to get root permissions.
2:gamit installation requires CSH (TCSH) environment, GNU gfortran 4.2 compiler, and Libx11-dev library support. Gfortran is the compiler recommended by the software. Libx11-dev is X11 's program development Library, which provides lib.h and libx11.a (libx11.so) are the two library files that must be used for gamit installation, mainly for the GLOBK to provide a graphics library support. The above three conditions are not.
Ubuntu system does not have CSH, default is bash. So install CSH first.
The Ubuntu system comes with gcc4.2, but does not have the Gfortran compiler installed. When you install, the installer will call the default Gfortran compiler unless you specify GCC as your compiler.
First, log in as root, open the terminal, enter
Apt-get Install CSH
The system automatically downloads and installs the CSH, after the installation completes in the terminal input
Chsh
tip: changing the root SHELL
Enter a new value, or hit enter directly to use the default value. Then start logging into the Shell [/bin/bash]:
Enter the command:
/bin/csh
Modify bash for CSH. Restart Ubuntu, log in as root, open terminal, enter
# echo $SHELL
Returns S "/bin/csh", indicating that the shell modification was successful.
then enter
Apt-get Install Gfortran
The system automatically downloads and installs the Gfortran.
Re-enter
Apt-get Install Libx11-dev
The system automatically downloads and installs the Libx11-dev library support.
3: First right-click to extract the gamit10.6 to the current folder, and then copy the gamit10.6 to the/opt file under root permission to use the command:
Cp–r/home/wanghui (here is your username)/ desktop /10.6/opt
4: Enter the file 10.6:cd/opt/10.6 Assign execute permission to install_software , enter the command:
chmod 777./install_software
5: Run the installation script and enter the command:
./Install_software
This is going to prompt you to enter y/n continue, he is asking you the directory configuration is correct, here first do not rush input, first look at the terminal in the X11libpath and x11incpath back there is no specific path, if there is, do not move, if not, press N, then he will search again, When finished, X11libpath and X11incpath on the terminal should have a path, and he will prompt you to enter y/n again. Then do not move, the X11libpath and X11incpath behind the path of the copy down to save it, immediately to use. Then we'll change something:
Press Ctrl+alt+t again, open a new terminal, enter the command:
Cd/opt/gamit10.6/libraries
Go to this directory and enter the command:
sudo gedit makefile.config
Then there will be a file editor, similar to Notepad under Windows, where we need to modify three places:
1th, as shown in the following:
See #generric ... That line does not, remember is to change that line below, change other invalid, change good later save.
2nd, we need to modify the internal parameters of gamit, here we just need to change the MAXATM to 25. :
The 3rd and final point is to modify the operating system version number. At this time, click Ctrl+alt+t, open a new terminal, enter the command:
Uname-a
You can view the version number of the system,
In this figure, the operating system version number 3.0.0-12, we only take the first four bits that is 3001, remember it. Pull the file down, you can see the OS dependeent blocks words, continue to pull down, find for the Linux from the 0.01 to 3.0.0 word, and then we modify OS_ID Linux 0001 3001, 0001 words, remember to only modify it, Replace it with 3001 and then save to turn it off.
fourth (generally 64-bit), if your computer is a three-bit, then the file will be all m64 to m32, in addition /opt /10.6/gamit/solve/makefile.generic All m64 in the file are also changed to M32.
6: In the return to the Linux installation Gamit terminal, press Y to continue to install, the middle will keep you waiting for a long time, and finally it will ask you whether to create a GG link file, is actually a shortcut under Windows, press Y to determine.
7: Configure the command path of the Gamit, this step is also very important, if not configured well, the above will be white. If you use CSH to install Gamit, you will need to click Ctrl+h to display the hidden file in the main file directory first. Then create a new blank document and rename it to. CSHRC (with. Indicates a hidden file), double-click the new CSHRC file, and copy the following to the file:
#/etc/csh.cshrc:system-wide. cshrc file for CSH (1) and tcsh (1)
# Set Prompt
#set prompt = "[' Echo [email protected]$cwd ']%"
Set history = 50
#set system path
#set path = (./bin/sbin/etc/usr/bin/usr/sbin/usr/bin/x11/usr/x11r6/bin)
Set path = (./bin/sbin/etc/usr/bin/usr/sbin)
Set path = (/usr/local/bin/usr/local/sbin/usr/local/lib/usr/lib $path)
Setenv PATH "/usr/sbin:/sbin:${path}"
#setenv Manpath/usr/local/man:/usr/x11r6/man
Setenv Libpath/usr/lib:/usr/local/lib
#set GAMIT/GLOBK Path
Set Gamitpath =/opt/gg
Set path = ($gamitpath/gamit/bin $gamitpath/kf/bin $gamitpath/com $path)
setenv Help_dir $gamitpath/help/
Setenv _posix2_version 199209
#set GMT Path
#set Gmtpath =/usr/lib/gmt
#set Path = ($gmtpath/bin $gmtpath/include $gmtpath/lib $gmtpath/man $gmtpath/share $gmtpath/www $path)
#set Path = (/etc/gmt/usr/include/gmt/usr/lib/gmt/usr/share/gmt/usr/share/doc/gmt $path)
#setenv MANPATH "$gmtpath/man: $MANPATH"
#set full domain for gamit shell-scripts used to transfer data (Sh_get_nav, Sh_get_rinex, #sh_get_orbits, and
# Sh_get_hfiles)
Set host = ' \hostname | \awk-f. ' {print '} '
Set dom = ' \hostname | \awk-f. ' {print $} '
if ($dom = = ") Then
Alias hostname ' echo $host. mit.edu '
endif
# set Alias
# alias CD ' CD \!*; Set prompt= ' [' Echo [email protected]$cwd ']% '
Alias pwd ' echo $cwd '
Alias ls ' ls--classify '
Alias ll ' Ls-l '
Alias la ' ls-a '
Alias RM ' Rm-i '
Alias MV ' Mv-i '
Alias CLS ' Clear '
Then do not close the file, first change the set gamitpath=/opt/gamit10.6 to your own installation directory, and then save. Back to the terminal, enter the command:
SOURCE ~/.CSHRC
Then enter the command:
Echo $PATH
If the terminal displays a path in the path that is Gamit, the success is indicated. Then open a new terminal, enter the command:
Sh_get_rinex
If command not found is displayed, the installation fails, and if a large stack of information is displayed, the installation succeeds.
8:
This paragraph is a reference to Baidu on.
9: If the intermediate installation fails, simply remove the installation directory and reinstall.
UBUNTU14 under Gamit Installation