Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Valve Install on CentOS 7

Diana Norgaard edited this page Aug 25, 2018 · 7 revisions
  • Install Java 8 if not already there
  • Install tomcat
    • yum install tomcat*
    • systemctl start tomcat
    • systemctl enable tomcat
    • edit /usr/share/tomcat/conf/tomcat-users.xml
      • add admin user
      • add user for access (optional)
    • open up firewall
      • firewall-cmd --permanent --zone=public --add-service=http
      • firewall-cmd --permanent --zone=public --add-port=8080/tcp
      • firewall-cmd --reload
    • Make sure tomcat is running (e.g. http://localhost:8080)
  • Install Valve
    • Easy way is to deploy through manager app (under Deploy -> WAR file to deploy)
    • Or you can build from scratch and install manually:
      • From Eclipse project, run build.xml file with dist target. This will create dist/valve3-bin.tar.gz.
      • Untar valve3-bin.tar.gz into /usr/share/tomcat/webapps
      • Ensure tomcat user owns the data and img directories
    • You should now see Valve3 under Manager App.
  • Configure Valve:
    • Edit filters.txt, images.txt, and labels.txt in /usr/share/tomcat/webapps/Valve3 (changes to these later will require reload of Valve3)
      • filters.txt - list of region shortcuts; bounding box of lat/lon
      • images.txt - list of background map images
      • labels.txt - list of labels to display on maps
    • In /usr/share/tomcat/webapps/Valve3/WEB-INF/config, rename dist-valve3.config to valve3.config and edit:
      • title
      • admin.name
      • admin.email
      • timeZoneAbbr
      • logFile
      • labelIndex
      • imageIndex
    • In /usr/share/tomcat/webapps/Valve3/config, rename dist-data.config to data.config and edit.
  • Install and configure VDX
    • Install mariadb
      • yum install mariadb-server
      • systemctl start mariadb
      • systemctl enable mariadb
    • Configure mariadb
      • mysql -u root -p
      • grant all on `v3\_%`.* to 'vdx'@'localhost' identified by 'vdx';
    • Obtain vdx package from https://github.com/usgs/vsc-vdx/releases
      • Or, from Eclipse, run build.xml with dist target. This will create dist/vdx-bin.tar.gz
    • Untar vdx-bin.tar.gz into /opt/vdx and configure
      • Copy dist-VDX.config to config/VDX.config
        • In config/VDX.config edit Vdx.url to specify user and password (vdx and vdx)
      • Copy dist-vdx.sh to bin/vdx.sh
        • Edit VDX and LOG variables up top, e.g.:
          • VDX=/opt/vdx
          • LOG=/opt/vdx/log/vdx.log
      • Copy dist-vdxSources.config to config/vdxSources.config and edit
    • Create the root database
      • cd /opt/vdx
      • java -cp lib/vdx.jar gov.usgs.volcanoes.vdx.db.VDXDatabase -c config/VDX.config -a createvdx
    • chmod +x bin/vdx.sh
    • dos2unix bin/vdx.sh
      • yum install dos2unix if dos2unix not found
    • Edit bin/vdx.sh to cd into $VDX/config (needs to be in same dir as VDX.config when starting)
    • Test start up script:
      • cd ~vdx/bin
      • ./vdx.sh start
      • Check logs (/opt/vdx/log/vdx.log); fix issues
    • Configure VDX to start on boot:
      • Create /etc/systemd/system/vdx.service
      • systemctl daemon-reload
      • systemctl enable vdx
      • reboot and see if vdx is running
        • ps -efwww | grep vdx
        • and look at /opt/vdx/log/vdx.log
    • Note, Valve can connect to multiple VDX
  • See https://github.com/usgs/vsc-vdx for VDX data import configurations
Clone this wiki locally