Last active
November 22, 2023 04:03
-
-
Save daryltucker/56c1724a606e4e5017bee1e63615676d to your computer and use it in GitHub Desktop.
Upgrade Node for Kibana
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NODE_VERSION=v18.18.2 | |
cd /tmp/ | |
wget --no-clobber https://nodejs.org/download/release/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64.tar.xz | |
sudo systemctl stop kibana | |
tar -xvf node-${NODE_VERSION}-linux-x64.tar.xz --strip-components=1 \ | |
--overwrite \ | |
--directory /usr/share/kibana/node/ | |
cat <<EOF | tee /tmp/node_version_validator.js.patch | |
--- /usr/share/kibana/src/setup_node_env/node_version_validator.js 2023-08-31 11:23:41.000000000 +0000 | |
+++ /tmp/node_version_validator.js 2023-09-06 23:28:58.632477706 +0000 | |
@@ -22,6 +22,6 @@ | |
var errorMessage = 'Kibana does not support the current Node.js version ' + currentVersion + '. Please use Node.js ' + requiredVersion + '.'; | |
// Actions to apply when validation fails: error report + exit. | |
- console.error(errorMessage); | |
- process.exit(1); | |
-} | |
\ No newline at end of file | |
+ //console.error(errorMessage); | |
+ //process.exit(1); | |
+} | |
EOF | |
cd /usr/share/kibana/src/setup_node_env | |
sudo patch < /tmp/node_version_validator.js.patch | |
sudo systemctl restart kibana |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment