-
Notifications
You must be signed in to change notification settings - Fork 6
Winston Install on CentOS 7
-
Install MariaDB if not already installed:
-
yum install mariadb-server
-
systemctl enable mariadb
-
systemctl start mariadb
-
mysqladmin -u root password 'newpassword' --socket /mysql
-
mysql -u root -p
-
mysql> CREATE USER 'winstonuser'@'localhost' IDENTIFIED BY 'password';
-
mysql> GRANT ALL PRIVILEGES ON . TO 'winstonuser'@'localhost' WITH GRANT OPTION;
-
mysql> CREATE USER 'winstonuser'@'%' IDENTIFIED BY 'password';
-
mysql> GRANT ALL PRIVILEGES ON . TO 'winstonuser'@'%' WITH GRANT OPTION;
-
mysql> flush privileges;
-
-
To access via MySQL workbench on PC (optional):
-
Open port 3306 on router
-
firewall-cmd --zone=public --add-port=3306/tcp --permanent
-
firewall-cmd --reload
-
grant user remote access permissions
-
-
-
Download and install Winston from https://volcanoes.usgs.gov/software/winston/index.shtml
-
Install under /opt/winston (e.g. /opt/winston/winston-1.12.0)
-
Create install link to version
-
cd /opt/winston
-
ln -s /opt/winston/winston-1.12.0 install
-
-
Edit configuration files
-
WWS.config - Edit IP address (and port if necessary)
-
Winston.config - Edit database user and password
-
-
Open up port for external access:
-
firewall-cmd --permanent --zone=public --add-port=16024/tcp
-
firewall-cmd --reload
-
-
Configure router to open port 16024 (if to be accessed externally)
-
Access via URL http://<IP address>:16024/
-
-
Configure instruments - Winston Instruments Configuration
-
Set up service for Winston to start on boot. As root do:
-
Create winston.service in /etc/systemd/system:
-
[Unit] Description = Winston Wants = network.target After = multi-user.target mariadb.service Requires = mariadb.service [Service] #Type = forking WorkingDirectory = /opt/winston/install/ ExecStart = /bin/sh -c '/opt/winston/install/bin/WWS.sh' ExecStop = /bin/pkill -9 `ps -ef | grep wsinton | grep -v grep | awk '{print$2}'` #ExecReload = StandardOutput = null StandardError = null User = winston Group = winston [Install] WantedBy = multi-user.target
-
Run commands:
-
systemctl daemon-reload
-
systemctl start winston.service
-
systemctl enable winston.service
-
-
To troubleshoot:
-
systemctl status winston.service
-
-
To import Earthworm wave data:
-
Set up export_generic in Earthworm
-
Configure ImportEW.config in Winston and test
-
Create importew.service in /etc/systemd/system:
-
[Unit] Description = Winston Earthworm Importer Wants = network.target After = multi-user.target mariadb.service Requires = mariadb.service [Service] WorkingDirectory = /opt/winston/install EnvironmentFile = ExecStart = /bin/sh -c '/bin/java -Xmx64M -cp /opt/winston/install/lib/winston.jar gov.usgs.winston.in.ew.ImportEW /opt/winston/install/ImportEW.config -i > /opt/winston/install/log/ImportEW.log 2>&1' ExecStop = /bin/pkill -f gov.usgs.winston.in.ew.ImportEW ExecReload = StandardOutput = null StandardError = null User = winston Group = winston [Install] WantedBy = multi-user.target