Skip to content

Commit

Permalink
RHEL install script and configs updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed May 31, 2024
1 parent 4401bba commit 5bd325c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion platform-rhel9/cs_custom_processor.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[program:cs_custom_processor]
; args: instance# loglevel
command=/home/jsonscada/.nvm/versions/node/v20.13.1/bin/node /home/jsonscada/json-scada/src/cs_custom_processor/cs_custom_processor.js 1 1
command=node /home/jsonscada/json-scada/src/cs_custom_processor/cs_custom_processor.js 1 1
numprocs=1 ; number of processes copies to start (def 1)
directory=/home/jsonscada/json-scada/src/cs_custom_processor/ ; directory to cwd to before exec (def no cwd)
user=jsonscada ; setuid to this UNIX account to run the program
Expand Down
2 changes: 1 addition & 1 deletion platform-rhel9/cs_data_processor.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[program:cs_data_processor]
; args: instance# loglevel
command=/home/jsonscada/.nvm/versions/node/v20.13.1/bin/node /home/jsonscada/json-scada/src/cs_data_processor/cs_data_processor.js 1 1
command=/usr/bin/node /home/jsonscada/json-scada/src/cs_data_processor/cs_data_processor.js 1 1
numprocs=1 ; number of processes copies to start (def 1)
directory=/home/jsonscada/json-scada/src/cs_data_processor/ ; directory to cwd to before exec (def no cwd)
user=jsonscada ; setuid to this UNIX account to run the program
Expand Down
10 changes: 5 additions & 5 deletions platform-rhel9/json-scada-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ sudo dnf -y remove golang nodejs java-1.8.0-openjdk-headless
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
sudo dnf -y install epel-release
sudo dnf -y install tar vim nano nginx wget chkconfig dotnet-sdk-6.0 java-21-openjdk php
sudo dnf -y install tar vim nano nginx wget chkconfig dotnet-sdk-6.0 java-21-openjdk php curl
sudo update-crypto-policies --set LEGACY

wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz
Expand Down Expand Up @@ -128,9 +128,9 @@ sudo systemctl enable grafana-server
sudo -u $JS_USERNAME sh -c 'mkdir ../metabase'
sudo -u $JS_USERNAME sh -c 'wget https://downloads.metabase.com/v0.49.10/metabase.jar -O ../metabase/metabase.jar'

# install nvm (for the jsonscada user) to be able to choose a specific nodejs version
sudo -u $JS_USERNAME sh -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash'
sudo -u $JS_USERNAME sh -c 'source ~/.bashrc; nvm install 20.13.1; npm install -g npm; source ~/.bashrc;'
sudo -u $JS_USERNAME sh -c 'curl -fsSL https://rpm.nodesource.com/setup_20.x -o nodesource_setup.sh'
sudo bash nodesource_setup.sh
sudo dnf -y install nodejs

sudo systemctl daemon-reload
sudo systemctl start postgresql-16
Expand Down Expand Up @@ -165,5 +165,5 @@ sudo systemctl start telegraf

sleep 10
sudo supervisorctl status
sudo -u $JS_USERNAME sh -c 'firefox http://localhost &'
# sudo -u $JS_USERNAME sh -c 'firefox http://localhost &'

2 changes: 1 addition & 1 deletion platform-rhel9/mongofw.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:mongofw]
command=/home/jsonscada/.nvm/versions/node/v20.13.1/bin/node /home/jsonscada/json-scada/src/mongofw/index.js
command=/usr/bin/node /home/jsonscada/json-scada/src/mongofw/index.js
numprocs=1 ; number of processes copies to start (def 1)
directory=/home/jsonscada/json-scada/src/mongofw/ ; directory to cwd to before exec (def no cwd)
user=jsonscada ; setuid to this UNIX account to run the program
Expand Down
2 changes: 1 addition & 1 deletion platform-rhel9/mongowr.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:mongowr]
command=/home/jsonscada/.nvm/versions/node/v20.13.1/bin/node /home/jsonscada/json-scada/src/mongowr/index.js
command=/usr/bin/node /home/jsonscada/json-scada/src/mongowr/index.js
numprocs=1 ; number of processes copies to start (def 1)
directory=/home/jsonscada/json-scada/src/mongowr/ ; directory to cwd to before exec (def no cwd)
user=jsonscada ; setuid to this UNIX account to run the program
Expand Down
2 changes: 1 addition & 1 deletion platform-rhel9/mqtt-sparkplug.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[program:mqtt-sparkplug]
; args: instance# loglevel
command=/home/jsonscada/.nvm/versions/node/v20.13.1/bin/node /home/jsonscada/json-scada/src/mqtt-sparkplug/index.js 1 1
command=/usr/bin/node /home/jsonscada/json-scada/src/mqtt-sparkplug/index.js 1 1
numprocs=1 ; number of processes copies to start (def 1)
directory=/home/jsonscada/json-scada/src/mqtt-sparkplug/ ; directory to cwd to before exec (def no cwd)
user=jsonscada ; setuid to this UNIX account to run the program
Expand Down
2 changes: 1 addition & 1 deletion platform-rhel9/opcua_server.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[program:opcua_server]
; args: instance# loglevel
command=/home/jsonscada/.nvm/versions/node/v20.13.1/bin/node /home/jsonscada/json-scada/src/OPC-UA-Server/index.js 1 1
command=/usr/bin/node /home/jsonscada/json-scada/src/OPC-UA-Server/index.js 1 1
numprocs=1 ; number of processes copies to start (def 1)
directory=/home/jsonscada/json-scada/src/OPC-UA-Server/ ; directory to cwd to before exec (def no cwd)
user=jsonscada ; setuid to this UNIX account to run the program
Expand Down
2 changes: 1 addition & 1 deletion platform-rhel9/server_realtime_auth.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:server_realtime_auth]
command=/home/jsonscada/.nvm/versions/node/v20.13.1/bin/node /home/jsonscada/json-scada/src/server_realtime_auth/index.js
command=/usr/bin/node /home/jsonscada/json-scada/src/server_realtime_auth/index.js
;environment=PGHOSTADDR=127.0.0.1,PGPORT=27017,PGDATABASE=json_scada,PGUSER=json_scada,PGPASSWORD=json_scada
numprocs=1 ; number of processes copies to start (def 1)
directory=/home/jsonscada/json-scada/src/server_realtime_auth/ ; directory to cwd to before exec (def no cwd)
Expand Down
2 changes: 1 addition & 1 deletion platform-rhel9/telegraf_listener.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[program:telegraf-listener]
; args: instance# loglevel
command=/home/jsonscada/.nvm/versions/node/v20.13.1/bin/node /home/jsonscada/json-scada/src/telegraf-listener/index.js 1 1
command=/usr/bin/node /home/jsonscada/json-scada/src/telegraf-listener/index.js 1 1
numprocs=1 ; number of processes copies to start (def 1)
directory=/home/jsonscada/json-scada/src/telegraf-listener/ ; directory to cwd to before exec (def no cwd)
user=jsonscada ; setuid to this UNIX account to run the program
Expand Down

0 comments on commit 5bd325c

Please sign in to comment.