Question
How to manually install older versions of Node.js that are not available in the Node.js Toolkit?
Answer
Node.js Toolkit allows only installation of LTS versions of Node.js which currently are supported by their vendor. Old versions of Node.js cannot be installed by the means of Node.js Toolkit, but it is possible to install them manually with the steps provided below.
Note: Using Node.js versions that have reached their end of life is a security risk and it is not recommended for installation. Instead, consider updating the application code to be compatible with modern Node.js versions.
The below example gives steps for the latest Node.js 14 build. Replace the required version accordingly.
1. Connect to the server via SSH
2. Download the required Node version, which can be found at https://nodejs.org/download/release/
3. To install Node.js 14 run the command:
# wget https://nodejs.org/download/release/v14.21.3/node-v14.21.3-linux-x64.tar.gz
4. Unpack the archive (replace the <node-v14.21.3-linux-x64.tar.gz> with the actual archive name downloaded in previous step):
# tar xzf node-v14.21.3-linux-x64.tar.gz
5. Create a directory within Plesk's Node directory (replace <14> if another version needs to be installed):
# mkdir -p /opt/plesk/node/14/
6. Move the Node files to the directory (make sure that correct paths are indicated in the command depending on the Node.js version downloaded in step 2):
# mv node-v14.21.3-linux-x64/* /opt/plesk/node/14
7. Login to Plesk and navigate to Extensions > Node.js Toolkit > Open
8. The downloaded and installed Node.js version will be detected by Node.js Toolkit automatically
Comments
0 comments
Please sign in to leave a comment.