-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
This is where we'll drop the installation instructions and links to the code
MacOS Instructions
1/ Installation & Setup
1.1/ If not already installed, install homebrew: https://brew.sh/
1.2/ Check to see what version of Java is installed. You need java version 1.8:
Drive Download Link
OR
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
(create a user account at Oracle and download)
dhcp-40-200:Documents ferrini$ java -version
java version "1.8.0_201" Java(TM) SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
1.3/ Install gawk:
brew install gawk
1.4/ Install readlink:
brew install coreutils
1.5/ Install xquartz:
http://www.xquartz.org
1.6/ Install gdal:
brew install gdal
1.7/ Install MBSystem:
https://www.mbari.org/products/research-software/mb-system/how-to-download-and-install-mb-system/#toggle-id-1
Users of the Homebrew package manager for MacOs can upgrade to the current release using: brew upgrade mbsystem or, if MB-System is being installed using Homebrew for the first time: brew update brew tap dwcaress/mbsystem brew install otps --with-tpxo8 brew install mbsystem
To update mbsystem use these commands
brew update brew upgrade
1.7/ Make sure you’re using GMT v 5*
1.8/ Download:
GMRTTiling-1.2.tgz bundle to your machine and uncompress it in the folder wherever you’d like it to be.
Older version(s):
GMRTTiling-1.0.tgz
1/9 If necessary update the Config.php *this should not need to be edited unless the paths are not where they are specified below. To confirm use which mbedit which java
;PATH TO GMT bin DIRECTORY GMTPATH = "/usr/bin"
;PATH TO JAVA bin DIRECTORY JAVAPATH = "/usr/bin"
;PATH TO MBSYSTEM bin DIRECTORY MBSYSTEMPATH = "/usr/local/bin"
;PATH TO tiles DIRECTORY ;DEFAULT IS GmrtTiling/tiles DIRECTORY ;Uncomment this line to set another location ;TILEROOT = "/path/to/tiles"
;PATH TO GeoMapApp JAR FILE ;DEFAULT IS GeoMappApp.jar PACKAGED WITH GmrtTiling ;Uncomment this line to set another GeoMapApp.jar ;GMAPATH = "/path/to/GeoMapApp.jar"
1.10/ Make sure the path to the GMRTTool/bin folder is in your path E.g. use sudo nano /etc/paths or sudo vi /etc/paths to edit the /etc/paths file and add the path
ferrini@MacBook-Pro TestCruise % more /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Users/ferrini/Documents/GMRTTiling/bin
Setup should be complete!
For detailed instructions on how to execute the code, see: GMRTTiling: How-to
Troubleshooting:
GMRT_preproc issues: Java error: Confirm the version of java you’re using. ($ java -version). Should be version 1.8 as noted above.
Check preproc.log and confirm where java is being pulled from when creating grids.
Error: java.io.IOException: Cannot run program “/Library/Internet”: error=2, No such file or directory Should be from somewhere like this: /Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home/jre/bin/java Check which versions of java are installed: /usr/libexec/java_home -V Matching Java Virtual Machines (3): 14 (x86_64) "Oracle Corporation" - "Java SE 14" /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home 1.8.321.07 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home 1.8.0_321 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home
The java path with /Library/Internet Will cause preproc to fail. Do not use this one. Make sure you’re using bash shell. Update the .bashrc and .bash_profile to insert the new paths.
.bashrc : export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home
.bash_profile: PATH=$PATH:$HOME/.local/bin:$HOME/bin:$JAVA_HOME/bin source ~/.bashrc
We are in the process of streamlining the Windows installation of this package. We strongly recommend installing Mac if possible.
There is no Windows-specific installation; the workaround is to run Linux in your Windows environment. If you are running Windows 10, you can run WSL -- Windows Subsystem for Linux -- rather than installing a full Linux VM
WLS vs VM: Documentation for WSL says that it isn’t meant to support GUIs. There are freeware terminal emulators that will allow you to display and use GUIs with WSL if you are interested in doing so (ex. VcXsrv Windows X Server https://sourceforge.net/projects/vcxsrv/).
WSL 1 vs. WSL 2: At the time of this writing, WSL 1 was fine for this use, and WS2 was not supported on all user machines anyway.
1/ Installation & Setup
1.1/ Follow the directions here to enable the WSL optional feature.
1.2/ Download Ubuntu 18.04 LTS from the Microsoft store (260 MB). Once download completes, click Launch. If will complete the installation and then prompt you to create a new UNIX username and UNIX password. You should then get s notification that installation was successful.
1.3/ Once a prompt appears, type: sudo apt-get update sudo apt-get upgrade
in order to update and upgrade the package listings for trusted repositories. Say yes if it asks about using extra space.
1.4/ Go to the MBSystems Download & Install instructions and expand the directions for Prerequisite Installation, Configure Arguments and Add-ons for Ubuntu Linux (https://www.mbari.org/products/research-software/mb-system/how-to-download-and-install-mb-system/#toggle-id-9).
1.5/ Open Notepad or another text editor. 1.6/ Copy the command listed there for Ubuntu Linux 18 into the text editor. Edit as necessary so that the command is one continuous line (there shouldn’t be any returns in it).
1.7/ Copy and paste the edited command into your Ubuntu window and hit Enter. This will install the MB-System prerequisites (except OTPS, Oregon State Tidal Program, for MB-System. This can be installed after the fact if you want to use it).
1.8/ Download the MB-Systems install from the MBARI FTP.
You can try doing it from the command line: mkdir temp cd temp ftp mbsystemftp@ftp.org
Or if that doesn’t work (common!):
Copy ftp://mbsystemftp@ftp.mbari.org/ into a browser. No password if prompted, just hit Enter. Grab your preferred version of MB-System (at time of writing we installed MB-System-5.7.6beta26.tar.gz).
1.8/ In your Ubuntu window, make a temporary directory; move the MB-System tar.gz to that directory and mount it, taking care to modify commands below with your download location (change the Users/ejhef/Downloads section appropriately) and the version of correct name of the MB-System gz you downloaded. cd cd temp mv /mnt/c/Users/ejhef/Downloads/MB-System-5.7.6beta26.tar.gz .
Note: there is a space and a period after gz in the command above, it is necessary!
1.9/ Unzip the install. gunzip MB-System-5.7.6beta26.tar.gz tar -xvf MB-System-5.7.6beta26.tar
1.10/ Change directory to the new directory that was created during the last step. Call configure to install MB-System in /usr/local, entering your UNIX password when requested. cd MB-System-5.7.6beta26 sudo ./configure
1.11/ Build and install. sudo make sudo make install
1.12/ Close and reopen the Ubuntu window.
1.13/ Download and install terminal emulator software (https://sourceforge.net/projects/vcxsrv/).
1.14/ Launch terminal emulator (XLaunch), configure (accept defaults). Allow access if you get a Windows
1.15/ Add library paths that MBS needs to run and turn on ability to use graphical displays: vi .bashrc
Use the down arrow key to go down to bottom of document, use the right arrow to get to area after fi.
Hit the a key (to append).
Hit return a couple of times.
Paste this in the Ubuntu window: add LD_LIBRARY_PATH for mbsystem export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH set display to local DISPLAY=:0.0 export DISPLAY
After pasting, type: :wq
to write, quit.
1.16/ Close and reopen Ubuntu window. You should now be able to launch GUIs (try by typing mbedit and hitting return).
1.17/ Download and install java. sudo apt-get update sudo apt-get install openjdk-8-jdk
1.18/ Install PHP sudo apt-get install php sudo apt-get install php-xml
1.19/ Download GMRTTiling-1.0.tgz bundle to your machine and uncompress it; location isn’t important as you’ll move it in the next step.
1.20/ Move the GMRTTiling folder to your Linux environment.
Open Ubuntu. Move the folder: mv [path_to_GMRTTiling] ~
For example, mv /mnt/c/Users/ejhef/Desktop/GMRT_WORKSPACE/GMRTTiling ~
1.21/ Use nano to edit .bashrc, adding the path to the GMRTTile folder. Refresh .bashrc.
Return to your home directory if necessary (cd ~). Type: nano .bashrc
Use the down arrow to get to the bottom of the shell script that opens.
On the next empty line, paste this:Y PATH=.:~/GMRTTiling/bin:$PATH
Then CTRL+x to exit, Y to save modified buffer, Enter to save to .bashrc. Type: source ~/.bashrc
to refresh the bashrc script.
1.22/ Use nano to update the Config.php in the GMRTTiling/bin directory. cd ~/GMRTTiling/bin nano Config.php
Edit the script to look like this (probably only need to add ‘local’ to the public static $MBSYSTEMPATH based on the version provided in the tar bundle): class Config { //PATH TO GMT bin DIRECTORY public static $GMTPATH = "/usr/local/bin/"; //PATH TO JAVA bin DIRECTORY public static $JAVAPATH = "/usr/bin/"; //PATH TO MBSYSTEM bin DIRECTORY public static $MBSYSTEMPATH = "/usr/local/bin/"; //PATH TO CRUISE TILE OUTPUT DIRECTORY public static $TILEROOT; //TILEROOT SET TO GMRTTiling tiles directory public static function init() { self::$TILEROOT = dirname(DIR)."/tiles/"; } }
Config::init();
Then CTRL+x to exit, Y to save modified buffer, Enter to save to .Config.php.
Setup should be complete! Confirm by typing “which GMRT_preproc” - it should show you the path to the script
1.23/ OPTIONAL: Edit the location of the GeoMapApp.jar instance utilized by the GMRT_preview script.
If you are using GMRTTiling at sea and don’t want to eat bandwidth accessing GeoMapApp online, you can request a GeoMapApp At Sea hard drive with an image of the current GMRT database. Plug this drive into the machine where you’ve installed GMRTTiling and will be using it to review data.
Open Ubuntu.
Access the GMRTTiling bin directory: cd ~/GMRTTiling/bin
Use nano to open the GMRT_preview script: nano GMRT_preview
Edit the passthru statement to contain the physical location of the GeoMapApp.jar, for example change from this:
passthru(sprintf( '%sjava -cp %s/GeoMapApp.jar haxby.db.mb.PreviewCruise file://%s %s', Config::$JAVAPATH, DIR, $gmrt->gmrtToolDir, $gmrt->gmrtProperties['pixelRes']
to this: passthru(sprintf( '%sjava -cp %s/GeoMapApp.jar haxby.db.mb.PreviewCruise file://%s %s', Config::$JAVAPATH, DIR, $gmrt->gmrtToolDir, $gmrt->gmrtProperties['pixelRes']
Now go to GMRTTiling: How-to to build and view your tiles!
Linux Instructions
-> MBSystem
-> GMT
-> gdal
-> java 1.8