diff --git a/platform-rhel9/cs_custom_processor.ini b/platform-rhel9/cs_custom_processor.ini index cae6e50d..bc661cff 100644 --- a/platform-rhel9/cs_custom_processor.ini +++ b/platform-rhel9/cs_custom_processor.ini @@ -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 diff --git a/platform-rhel9/cs_data_processor.ini b/platform-rhel9/cs_data_processor.ini index 2a793d49..0ffb1e54 100644 --- a/platform-rhel9/cs_data_processor.ini +++ b/platform-rhel9/cs_data_processor.ini @@ -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 diff --git a/platform-rhel9/json-scada-install.sh b/platform-rhel9/json-scada-install.sh index 73642692..3fe75b25 100644 --- a/platform-rhel9/json-scada-install.sh +++ b/platform-rhel9/json-scada-install.sh @@ -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 @@ -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 @@ -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 &' diff --git a/platform-rhel9/mongofw.ini b/platform-rhel9/mongofw.ini index 70152d13..bc061a6d 100644 --- a/platform-rhel9/mongofw.ini +++ b/platform-rhel9/mongofw.ini @@ -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 diff --git a/platform-rhel9/mongowr.ini b/platform-rhel9/mongowr.ini index 0ebdc93d..7a81e4ef 100644 --- a/platform-rhel9/mongowr.ini +++ b/platform-rhel9/mongowr.ini @@ -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 diff --git a/platform-rhel9/mqtt-sparkplug.ini b/platform-rhel9/mqtt-sparkplug.ini index 5e34cfee..a9bc2642 100644 --- a/platform-rhel9/mqtt-sparkplug.ini +++ b/platform-rhel9/mqtt-sparkplug.ini @@ -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 diff --git a/platform-rhel9/opcua_server.ini b/platform-rhel9/opcua_server.ini index 65790178..2650e40c 100644 --- a/platform-rhel9/opcua_server.ini +++ b/platform-rhel9/opcua_server.ini @@ -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 diff --git a/platform-rhel9/server_realtime_auth.ini b/platform-rhel9/server_realtime_auth.ini index 5ac5fcea..be5e640a 100644 --- a/platform-rhel9/server_realtime_auth.ini +++ b/platform-rhel9/server_realtime_auth.ini @@ -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) diff --git a/platform-rhel9/telegraf_listener.ini b/platform-rhel9/telegraf_listener.ini index 05882a4e..223514da 100644 --- a/platform-rhel9/telegraf_listener.ini +++ b/platform-rhel9/telegraf_listener.ini @@ -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