-
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:
NOTE: A problem has been identified where the user is unable to get the MB-System programs that use X11/Motif/OpenGL to run successfully when using Homebrew. Follow this installation process in order to remedy this.
OLD MBSystem installation process
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/ 1.8/ Download GMRTTiling Bundle to your machine and uncompress in a known location which will serve as your working directory.
Note: GMRTTiling-1.2 or older will need an updated GeoMapApp.jar file: Download Here
GMRTTiling-1.2.tgz
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_341.jdk/Contents/Home
.bash_profile:
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$JAVA_HOME/bin
source ~/.bashrc
WSL can be used instead of setting up a virtual machine. The WSL installation instructions were provided by Paul Johnson.
1.) Install Windows Terminal - Microsoft Store (If not already installed)
2.) Install Distro with Powershell Terminal
wsl --install
wsl --update
wsl --list --online
wsl --install -d Ubuntu-22.04
Restart your computer
3.) Startup Terminal (might need to select Ubuntu 20.04 LTS as it will default to Powershell)
username: drennon
password: yourpassword
4.) Update Ubuntu
sudo apt update
sudo apt upgrade
5.) Add the unstable branch of the ubuntu gis repository
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt upgrade
6.) Install MB-System & GMT Packages
sudo apt install build-essential
sudo apt install libtirpc-dev netcdf-bin libnetcdf-dev libgdal-dev gmt libgmt6 libgmt-dev libproj-dev libfftw3-3 libfftw3-dev libmotif-dev xfonts-75dpi xfonts-base xfonts-100dpi libglu1-mesa-dev libopencv-dev cmake gfortran
sudo apt install libtirpc-dev \ netcdf-bin libnetcdf-dev libgdal-dev \ gmt libgmt6 libgmt-dev libproj-dev \ libfftw3-3 libfftw3-dev libmotif-dev \ xfonts-100dpi libglu1-mesa-dev \ libopencv-dev cmake gfortran
7.) Install other useful packages
sudo apt install gdal-bin csvkit libalgorithms1 pktools python3-csvkit python3-gdal python3-rasterio rasterio postgresql postgresql-contrib postgresql-14-ogr-fdw tcsh gmt-gshhg gmt-gshhg-full gmt-gshhg-low
sudo apt install libx11-dev xorg-dev libmotif-common libsdl1.2-dev libsdl-image1.2-dev unzip x11-apps imagemagick gv dos2unix xmlstarlet python3-pip csh dateutils units gpsbabel python3-babel ipython3 xml-core bpytop csh
8.) Download mbsystem and install
cd
wget --no-check-certificate https://github.com/dwcaress/MB-System/archive/refs/tags/5.8.2beta05.tar.gz
sudo mv 5.8.2beta05.tar.gz /usr/local/src
cd /usr/local/src
sudo tar -xvzf 5.8.2beta05.tar.gz
cd MB-System-5.8.2beta05
sudo mkdir build
cd build
sudo cmake ..
sudo make
sudo make install
9.) Add info to .bashrc
cd ~
cp .bashrc .bashrc.bak
echo ' ' >> ~/.bashrc
echo '# Add LD_LIBRARY_PATH for MBsystem' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
echo ' ' >> ~/.bashrc
echo '# Add MBsystem to GMT' >> ~/.bashrc
echo 'gmt gmtset GMT_CUSTOM_LIBS /usr/local/lib/mbsystem.so' >> ~/.bashrc
echo ' ' >> ~/.bashrc
echo ' ' >> ~/.bashrc
echo '# Add some additional aliases' >> ~/.bashrc
echo 'alias .=ZZZpwdZZZ' >> ~/.bashrc
echo 'alias ..=ZZZcd ..ZZZ' >> ~/.bashrc
echo 'alias bin=ZZZcd ~/binZZZ' >> ~/.bashrc
echo 'alias cp=ZZZcp -iZZZ' >> ~/.bashrc
echo 'alias h=ZZZhistory | tail -20ZZZ' >> ~/.bashrc
echo 'alias more=ZZZlessZZZ' >> ~/.bashrc
echo 'alias open=ZZZdisplayZZZ' >> ~/.bashrc
echo 'alias sc=ZZZsource ~/.bashrcZZZ' >> ~/.bashrc
echo 'alias te=ZZZcode .ZZZ' >> ~/.bashrc
echo 'alias top=ZZZbpytopZZZ' >> ~/.bashrc
echo 'alias x=ZZZchmod u+xZZZ' >> ~/.bashrc
echo ' ' >> ~/.bashrc
echo '# Add additional locations to the path' >> ~/.bashrc
echo 'export PATH=~/bin:~/bin/GMRTTiling/bin:~/.local/bin:$PATH' >> ~/.bashrc
echo ' ' >> ~/.bashrc
sed "s/ZZZ/\'/g" ~/.bashrc > /tmp/tmpaa
mv /tmp/tmpaa ~/.bashrc
cd
mbdefaults -Dgv -Idisplay -V
mkdir bin
10.) Install Java 1.8 (NOTE - MUST INSTALL THIS VERSION)
sudo apt-get install openjdk-8-jdk
11.) Install PIP and PHP and GDOWN
sudo apt install pip
sudo apt install php
sudo apt install php-xml
pip install gdown
12.) Download GMRT Tiler Package into ~/bin in your WSL environment either directly from GDrive or using gdown
Download GMRT Tiler Package via Google Drive
Via gdown
/home/drennon/.local/bin/gdown https://drive.google.com/uc?id=1L52OQbDbKkuy3Ef_JJ3GS2gav7CB0EmS
13.) Update Java Path in GMRTTiling
Navigate to ~/bin/GMRTTiling/bin
vi GmrtTiling.config
Update Java Path to wherever your java is. Mine is here:
cd~
ls -a
vi .bashrc
;PATH TO JAVA bin DIRECTORY
JAVAPATH = "/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin"
To find where yours is
dpkg -L openjdk-8-jdk
14.) Download GeoMapApp
In your tiles directory ~/bin/GMRTTiling/tiles wget the updated GeoMapApp.jar
wget https://app.geomapapp.org/MapApp/GeoMapApp.jar
Test Launch GeoMapApp
java -jar GeoMapApp.jar
(Mounting GMA@Sea Instructions to come)