Merge commit '3b916f1cdfebe223517290fbecc4a0df5936fb39' as 'nodesource'

This commit is contained in:
Andrew
2025-05-07 20:41:48 -04:00
34 changed files with 5328 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
---
name: Issue/Bug report
about: Create a report to help us improve. or resolve any issue
title: "[ERROR] Node.js XX on UbuntuXX Installation fail"
labels: bug
assignees: ''
---
**Describe your bug**
A clear and concise description of what the bug is.
**Distribution Information:**
- OS: [e.g. Ubuntu]
- Version [e.g. focal (20.04)]
- Other info if applicable [e.g. Docker image XXX, AWS AMI ID]
**Node Version:**
- Node: [e.g. Node.js v18.x:]
**To Reproduce**
Steps to reproduce the behavior:
1. Execute Ubuntu Docker Image XX
2. Execute Installation instructions for Node.js v1x.x:
3. ....
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here, specify if already has another NodeJS version or if trying to re-install the current version.
+118
View File
@@ -0,0 +1,118 @@
name: "Test Installation Scripts"
on:
schedule:
- cron: "00 00 * * *"
push:
branches:
- master
pull_request:
branches:
- master
jobs:
deb:
name: "NodeJS ${{ matrix.version }}(${{ matrix.os }})"
runs-on: ubuntu-latest
strategy:
matrix:
version: [18, 20, 22, 23, 24]
os: ["ubuntu:24.04", "ubuntu:22.04", "debian:10"]
container:
image: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Run Istallation Script
run: ./scripts/deb/setup_${{ matrix.version }}.x
- name: Install Nodejs
run: |
apt-get install nodejs -y
- name: Validate Node Version
run: |
node -e "console.log(process.version)"
NODE_VERSION=$(node -e "console.log((process.version).split('.')[0])")
if [[ ${NODE_VERSION} != "v${{ matrix.version }}" ]]; then
echo "Node version is not ${{ matrix.version }}. It is $NODE_VERSION"
exit 1
fi
rpm:
name: "NodeJS ${{ matrix.version }}(${{ matrix.os }})"
runs-on: ubuntu-latest
strategy:
matrix:
version: [18, 20, 22, 23, 24]
os: ["fedora:36", "amazonlinux:2023", "rockylinux:9", "redhat/ubi9:latest"]
container:
image: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: install git
run: |
dnf update -y
dnf install git -y
- name: Checkout Repo
uses: actions/checkout@v4
- name: Run Istallation Script
run: ./scripts/rpm/setup_${{ matrix.version }}.x
- name: Install Nodejs
run: |
dnf install nodejs -y
- name: Validate Node Version
run: |
node -e "console.log(process.version)"
NODE_VERSION=$(node -e "console.log((process.version).split('.')[0])")
if [[ ${NODE_VERSION} != "v${{ matrix.version }}" ]]; then
echo "Node version is not ${{ matrix.version }}. It is $NODE_VERSION"
exit 1
fi
rpm-minimal:
name: "NodeJS ${{ matrix.version }}(${{ matrix.os }})"
runs-on: ubuntu-latest
strategy:
matrix:
version: [18, 20, 22, 23, 24]
os: ["rockylinux:9-minimal", "redhat/ubi9-minimal:latest"]
container:
image: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: install git
run: |
microdnf update -y
microdnf install git -y
- name: Checkout Repo
uses: actions/checkout@v4
- name: Run Istallation Script
run: ./scripts/rpm/setup_${{ matrix.version }}.x
- name: Install Nodejs
run: |
microdnf install nodejs -y
- name: Validate Node Version
run: |
node -e "console.log(process.version)"
NODE_VERSION=$(node -e "console.log((process.version).split('.')[0])")
if [[ ${NODE_VERSION} != "v${{ matrix.version }}" ]]; then
echo "Node version is not ${{ matrix.version }}. It is $NODE_VERSION"
exit 1
fi
+81
View File
@@ -0,0 +1,81 @@
name: "Test Installation Scripts DEPRECATED VERSIONS"
on:
schedule:
- cron: "00 00 * * *" # Run every day at midnight
push:
branches:
- master
pull_request:
branches:
- master
jobs:
deb:
name: "NodeJS ${{ matrix.version }}(${{ matrix.os }})"
runs-on: ubuntu-latest
strategy:
matrix:
version: [16]
os: ["ubuntu:20.04", "debian:10"]
container:
image: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Run Istallation Script
run: ./scripts/deb/setup_${{ matrix.version }}.x
- name: Install Nodejs
run: |
apt-get install nodejs -y
- name: Validate Node Version
run: |
node -e "console.log(process.version)"
NODE_VERSION=$(node -e "console.log((process.version).split('.')[0])")
if [[ ${NODE_VERSION} != "v${{ matrix.version }}" ]]; then
echo "Node version is not ${{ matrix.version }}. It is $NODE_VERSION"
exit 1
fi
rpm:
name: "NodeJS ${{ matrix.version }}(${{ matrix.os }})"
runs-on: ubuntu-latest
strategy:
matrix:
version: [16]
os: ["fedora:29", "amazonlinux:2023"]
container:
image: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: install git
run: |
yum update -y
yum install git -y
- name: Checkout Repo
uses: actions/checkout@v4
- name: Run Istallation Script
run: ./scripts/rpm/setup_${{ matrix.version }}.x
- name: Install Nodejs
run: |
yum install nodejs -y
- name: Validate Node Version
run: |
node -e "console.log(process.version)"
NODE_VERSION=$(node -e "console.log((process.version).split('.')[0])")
if [[ ${NODE_VERSION} != "v${{ matrix.version }}" ]]; then
echo "Node version is not ${{ matrix.version }}. It is $NODE_VERSION"
exit 1
fi
+2
View File
@@ -0,0 +1,2 @@
.DS_Store
.idea
+11
View File
@@ -0,0 +1,11 @@
The MIT License (MIT)
=====================
Copyright (c) 2024 NodeSource LLC
---------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+68
View File
@@ -0,0 +1,68 @@
## [Node.js](https://nodejs.org) on Older Linux Distributions
At [NodeSource](https://nodesource.com), one of our primary missions is to encourage adoption of Node.js as much as possible. One of the ways we do this is by supplying binary packages of Node in formats compatible with the package management systems of various [Linux Distributions](https://github.com/nodesource/distributions/), so long as those distributions are still getting security updates from their respective sponsor entities.
Unfortunately, this is more complicated in certain instances than in others. Due to the extremely long support cycles of some releases, such as LTS releases for Ubuntu, the components that the distributions ship with are not always sufficient to build or sometimes even to run very new and fast-moving software such as Node.
### Debian Style Distributions
Two such examples that highlight this situation are the Debian Wheezy and Ubuntu Precise releases. Both are still currently receiving security updates. However, the default versions of the `C++` compilers that each ships with are not modern enough to build the current iterations of the V8 Javascript engine.
In order to get around this issue, we build the packages <= v6.x for Debian Wheezy with [clang-3.4](http://clang.llvm.org/). Ubuntu Precise ships with [clang-3.4](http://clang.llvm.org) available, so we use that instead of GCC.
The current expectation for v7.x of Node is that going forward, it will require use of even newer parts of the C++ standard than v6.x did. This will in turn require a compiler newer than both the `gcc` that ships on these distributions and `clang-3.4`. For this reason, we do not support Wheezy or Precise on version 7.x of Node.
The relevant bits of our build scripts to install the needed compilers looks like this:
```bash
#!/bin/bash
if [ "x${DIST}" == "xprecise" ]; then
echo "Calling $0"
apt-get update
apt-get install -y clang-3.4
fi
if [ "x${DIST}" == "xwheezy" ]; then
echo "Calling $0"
apt-get update
apt-get -y install curl apt-transport-https ca-certificates
echo "deb https://deb.nodesource.com/clang-3.4 wheezy main" >> /etc/apt/sources.list
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
apt-get update
apt-get install -y clang-3.4
fi
```
To actually use these compilers during the build, the scripts look like this:
```bash
if [ "x${DIST}" == "xprecise" ]; then
CC=/usr/bin/clang
export CC
CXX=/usr/bin/clang++
export CXX
fi
if [ "x${DIST}" == "xwheezy" ]; then
CC=/usr/bin/clang
export CC
CXX=/usr/bin/clang++
export CXX
fi
```
Please note that `arm` builds are not available for these two distributions, as we don't have compilers available for that target.
### RedHat Style Distributions
Another example of this circumstance is RHEL6 / CentOS6 which use `rpm` packages. Much like in the Debian Style examples above, EL6 does not ship with a `C++` compiler that can build a modern version of V8. Additionally, the version of `python` in the distribution is not new enough to properly execute the `configure` script for the build.
Fortunately, RedHat supports [SoftwareCollections.org](https://www.softwarecollections.org) and these collections can provide EL6 with newer versions of `GCC` and `python`.
- The [Devtoolset-3](https://www.softwarecollections.org/en/scls/rhscl/devtoolset-3/) collection provides `GCC`
- The [Python27](https://www.softwarecollections.org/en/scls/rhscl/python27/) collection provides `python`
If you are running EL6 with our `rpm` packages for Node, and you intend to build any native add-on modules, you need to install and enable both of these collections by following the instructions at the links above.
Also please note that for EL6, only the `x86_64` architecture is supported, as the aforementioned software collections do not have 32bit support.
+636
View File
@@ -0,0 +1,636 @@
# [NodeSource](https://nodesource.com) Node.js Binary Distributions
[![NodeSource](images/ns-linux-distributions.svg)](https://nodesource.com)
[![CircleCI](https://circleci.com/gh/nodesource/distributions/tree/master.svg?style=svg)](https://circleci.com/gh/nodesource/distributions/tree/master)
This repository contains documentation for using the **[NodeSource](https://nodesource.com)** **[Node.js](http://nodejs.org)** Binary Distributions via .rpm and .deb as well as their setup and support scripts.
If you are looking for NodeSource's low-impact Node.js performance monitoring platform, please **[get started here](https://accounts.nodesource.com/sign-up-linuxdistro).**
Please file an issue if you are experiencing a problem or would like to discuss something related to the distributions.
Pull requests are encouraged if you have changes you believe would improve the setup process or increase compatibility across Linux distributions.
Looking for the oldversion of [README.md](./OLD_README.md)
## Table of Contents
* **[Debian and Ubuntu based distributions](#deb)** (deb)
* [Installation instructions](#debinstall)
* [Uninstall instructions](#debuninstall)
* [Manual installation](#debmanual)
* **[Enterprise Linux based distributions](#rpm)** (rpm)
* [Installation instructions](#rpminstall)
* [Uninstall instructions](#rpmuninstall)
* **[Tests](#tests)**
* **[FAQ](#questions)**
* **[Requested Distributions](#requests)**
* **[License](#project-license)**
`<a name="deb"></a>`
## Debian and Ubuntu based distributions
**Available architectures:**
NodeSource will continue to maintain the following architectures and may add additional ones in the future.
* **amd64** (64-bit)
* **armhf** (ARM 32-bit hard-float, ARMv7 and up: _arm-linux-gnueabihf_)
* **arm64** (ARM 64-bit, ARMv8 and up: _aarch64-linux-gnu_)
**Supported Ubuntu versions:**
NodeSource will maintain Ubuntu distributions in active support by Canonical, including LTS and the intermediate releases.
* ~~**Ubuntu 16.04 LTS** (Xenial Xerus)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Ubuntu 18.04 LTS** (Bionic Beaver)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Ubuntu 18.10** (Cosmic Cuttlefish)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Ubuntu 19.04** (Disco Dingo)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Ubuntu 19.10** (Eoan Ermine)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **Ubuntu 20.04 LTS** (Focal Fossa)
* **Ubuntu 20.10** (Groovy Gorilla)
* **Ubuntu 21.04** (Hirsute Hippo)
* **Ubuntu 21.10** (Impish Indri)
* **Ubuntu 22.04** (Jammy Jellyfish)
* **Ubuntu 22.10** (Kinetic Kudu)
**Supported Debian versions:**
NodeSource will maintain support for stable, testing and unstable releases of Debian, due to the long release cycle a considerable number of users are running unstable and testing.
* ~~**Debian 9 / oldoldstable** (Stretch)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **Debian 10 / oldstable** (Buster)
* **Debian 11 / stable** (Bullseye)
* **Debian unstable** (Sid)
* **Debian testing** (Bookworm)
**Supported Linux Mint versions:**
* ~~**Linux Mint 18 "Sarah"** (via Ubuntu 16.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Linux Mint 18.1 "Serena"** (via Ubuntu 16.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Linux Mint 18.2 "Sonya"** (via Ubuntu 16.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Linux Mint 18.3 "Sylvia"** (via Ubuntu 16.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Linux Mint Debian Edition (LMDE) 2 "Betsy"** (via Debian 8)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Linux Mint 19 "Tara"** (via Ubuntu 18.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Linux Mint 19.1 "Tessa"** (via Ubuntu 18.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Linux Mint 19.2 "Tina"** (via Ubuntu 18.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Linux Mint 19.3 "Tricia"** (via Ubuntu 18.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **Linux Mint 20 "Ulyana"** (via Ubuntu 20.04 LTS)
* **Linux Mint 20.1 "Ulyssa"** (via Ubuntu 20.04 LTS)
* **Linux Mint 20.2 "Uma"** (via Ubuntu 20.04 LTS)
* **Linux Mint 20.3 "Una"** (via Ubuntu 20.04 LTS)
* **Linux Mint 21 "Vanessa"** (via Ubuntu 22.04 LTS)
* **Linux Mint 21.1 "Vera"** (via Ubuntu 22.04 LTS)
* ~~**Linux Mint Debian Edition (LMDE) 3 "Cindy"** (via Debian 9)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **Linux Mint Debian Edition (LMDE) 4 "Debbie"** (via Debian 10)
* **Linux Mint Debian Edition (LMDE) 5 "Elsie"** (via Debian 11)
**Supported Devuan versions:**
* ~~**Ascii / oldoldstable** (via Debian 9)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **Beowulf / oldstable** (via Debian 10)
* **Chimaera / stable** (via Debian 11)
* **Ceres / unstable** (via Debian unstable)
**Supported elementary OS versions:**
* ~~**elementary OS 0.4 Loki** (via Ubuntu 16.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**elementary OS 5 Juno** (via Ubuntu 18.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**elementary OS 5.1 Hera** (via Ubuntu 18.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **elementary OS 6 Odin** (via Ubuntu 20.04 LTS)
* **elementary OS 6.1 Jolnir** (via Ubuntu 20.04 LTS)
* **elementary OS 7 horus** (via Ubuntu 22.04 LTS)
**Supported Trisquel versions:**
* ~~**Trisquel 8 "Flidas"** (via Ubuntu 16.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Trisquel 9 "Etiona"** (via Ubuntu 18.04 LTS)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
**Supported BOSS versions:**
* ~~**BOSS 7.0 "Drishti"** (via Debian 9)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **BOSS 8.0 "Unnati"** (via Debian 10)
* **BOSS 9.0 "Urja"** (via Debian 11)
**Supported BunsenLabs versions:**
* ~~**Helium** (via Debian 9)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **Lithium** (via Debian 10)
**Supported MX Linux versions:**
* ~~**MX-17 Horizon** (via Debian 9)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**MX-18 Continuum** (via Debian 9)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **MX-19 Patito Feo** (via Debian 10)
* **MX-21 Wildflower** (via Debian 11)
**Supported Sparky Linux versions:**
* ~~**Sparky 4.x "Tyche"** (via Debian 9)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **Sparky 5.x "Nibiru"** (via Debian 10)
* **Sparky 6.x "Po Tolo"** (via Debian 11)
**Supported PureOS Linux versions:**
* **PureOS 9.0 "Amber"** (via Debian 10)
* **PureOS 10.0 "Byzantium"** (via Debian 11)
**Supported Astra Linux CE versions:**
* ~~**Astra Linux CE 2.12 "Orel"** (via Debian 9)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
**Supported Ubilinux versions:**
* ~~**Ubilinux 4.0 "Dolcetto"** (via Debian 9)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
**Supported Parrot OS Linux versions:**
* **Parrot OS 5.0 "Electro Ara"** (via Debian 11)
**Supported Deepin Linux versions:**
* **Deepin 20 "Apricot"** (via Debian 10)
`<a name="debinstall"></a>`
### Installation instructions
**Node.js v20.x**:
##### Using Ubuntu
```sh
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
```
##### Using Debian, as root
```sh
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&\
apt-get install -y nodejs
```
**Node.js v19.x**:
##### Using Ubuntu
```sh
curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
```
##### Using Debian, as root
```sh
curl -fsSL https://deb.nodesource.com/setup_19.x | bash - &&\
apt-get install -y nodejs
```
**Node.js v18.x**:
##### Using Ubuntu
```sh
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
```
##### Using Debian, as root
```sh
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &&\
apt-get install -y nodejs
```
**Node.js v16.x**:
##### Using Ubuntu
```sh
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
```
##### Using Debian, as root
```sh
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
apt-get install -y nodejs
```
**Node.js LTS (v18.x)**:
##### Using Ubuntu
```sh
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
```
##### Using Debian, as root
```sh
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - &&\
apt-get install -y nodejs
```
**Node.js Current (v20.x)**:
##### Using Ubuntu
```sh
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
```
##### Using Debian, as root
```sh
curl -fsSL https://deb.nodesource.com/setup_current.x | bash - &&\
apt-get install -y nodejs
```
***Optional***: install build tools
To compile and install native addons from npm you may also need to install build tools:
##### use `sudo` on Ubuntu or run this as root on debian
```sh
apt-get install -y build-essential
```
`<a name="debuninstall"></a>`
### Uninstall `nodejs` Ubuntu & Debian packages
To completely remove Node.js installed from the deb.nodesource.com package methods above:
##### use `sudo` on Ubuntu or run this as root on debian
```sh
apt-get purge nodejs &&\
rm -r /etc/apt/sources.list.d/nodesource.list
```
`<a name="debmanual"></a>`
### Manual installation
If you're not a fan of `curl <url> | bash -`, or are using an unsupported distribution, you can try a manual installation.
These instructions assume `sudo` is present, however some distributions do not include this command by default, particularly those focused on a minimal environment. In this case, you should install `sudo` or `su` to root to run the commands directly.
**1. Remove the old PPA if it exists**
This step is only required if you previously used Chris Lea's Node.js PPA.
```sh
# add-apt-repository may not be present on some Ubuntu releases:
# sudo apt-get install python-software-properties
sudo add-apt-repository -y -r ppa:chris-lea/node.js &&\
sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list &&\
sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list.save
```
**2. Add the NodeSource package signing key**
```sh
KEYRING=/usr/share/keyrings/nodesource.gpg
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee "$KEYRING" >/dev/null
# wget can also be used:
# wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee "$KEYRING" >/dev/null
gpg --no-default-keyring --keyring "$KEYRING" --list-keys
chmod a+r /usr/share/keyrings/nodesource.gpg
```
The key ID is `9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280`.
**3. Add the desired NodeSource repository**
```sh
# Replace with the branch of Node.js or io.js you want to install: node_8.x, node_16.x, etc...
VERSION=node_16.x
# Replace with the keyring above, if different
KEYRING=/usr/share/keyrings/nodesource.gpg
# The below command will set this correctly, but if lsb_release isn't available, you can set it manually:
# - For Debian distributions: jessie, sid, etc...
# - For Ubuntu distributions: xenial, bionic, etc...
# - For Debian or Ubuntu derived distributions your best option is to use the codename corresponding to the upstream release your distribution is based off. This is an advanced scenario and unsupported if your distribution is not listed as supported per earlier in this README.
DISTRO="$(lsb_release -s -c)"
echo "deb [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
echo "deb-src [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list
```
**4. Update package lists and install Node.js**
```sh
sudo apt-get update
sudo apt-get install nodejs
```
`<a name="rpm"></a>`
## Enterprise Linux based distributions
**Available architectures:**
NodeSource will continue to maintain the following architectures and may add additional ones in the future.
* **x86_64** (64-bit)
* **arm64** (ARM 64-bit, ARMv8 and up: _aarch64-linux-gnu_)
**Supported Red Hat® Enterprise Linux® versions:**
* ~~**RHEL 7** (64-bit)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **RHEL 8** (64-bit)
**Supported CentOS versions:**
* ~~**CentOS 7** (64-bit)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **CentOS 8** (64-bit)
* **CentOS 8 Stream** (64-bit)
**Supported AlmaLinux OS versions:**
* **AlmaLinux 8** (64-bit)
**Supported Mageia Linux versions:**
* ~~**Mageia 7** (64-bit)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* **Mageia 8** (64-bit)
**Supported Rocky Linux OS versions:**
* **Rocky 8** (64-bit)
**Supported CloudLinux versions:**
* **CloudLinux 6** (32-bit for Node <= 10.x and 64-bit)
**Supported Fedora versions:**
* **Fedora 33** (64-bit)
* **Fedora 34** (64-bit)
* **Fedora 35** (64-bit)
* **Fedora 36** (64-bit)
**Supported Amazon Linux versions:**
* ~~**Amazon Linux** (64-bit)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Amazon Linux 2** (64-bit)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Amazon Linux 2023** (64-bit)
`<a name="rpminstall"></a>`
### Installation instructions
_NOTE: If you are using RHEL 6 or CentOS 6, you might want to read about [running Node.js on older distros](https://github.com/nodesource/distributions/blob/master/OLDER_DISTROS.md)._
The Nodesource RPM package signing key is available here: <https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL>
Run on RHEL, CentOS, CloudLinux, Amazon Linux or Fedora:
**Node.js v20.x**
##### As root
```sh
curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
```
##### No root privileges
```sh
curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -
```
**Node.js v19.x**
##### As root
```sh
curl -fsSL https://rpm.nodesource.com/setup_19.x | bash -
```
##### No root privileges
```sh
curl -fsSL https://rpm.nodesource.com/setup_19.x | sudo bash -
```
**Node.js v18.x**
##### As root
```sh
curl -fsSL https://rpm.nodesource.com/setup_18.x | bash -
```
##### No root privileges
```sh
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
```
**Node.js v16.x**
##### As root
```sh
curl -fsSL https://rpm.nodesource.com/setup_16.x | bash -
```
##### No root privileges
```sh
curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash -
```
**Node.js LTS (18.x)**
##### As root
```sh
curl -fsSL https://rpm.nodesource.com/setup_lts.x | bash -
```
##### No root privileges
```sh
curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
```
**Node.js Current (20.x)**
##### As root
```sh
curl -fsSL https://rpm.nodesource.com/setup_current.x | bash -
```
##### No root privileges
```sh
curl -fsSL https://rpm.nodesource.com/setup_current.x | sudo bash -
```
***Optional***: install build tools
To compile and install native addons from npm you may also need to install build tools:
```text
yum install gcc-c++ make
# or: yum groupinstall 'Development Tools'
```
`<a name="rpmuninstall"></a>`
### Uninstall `nodejs` Enterprise Linux packages
To completely remove Node.js installed from the rpm.nodesource.com package methods above:
#### use `sudo` or run this as root
```sh
yum remove nodejs &&\
rm -r /etc/yum.repos.d/nodesource*.repo &&\
yum clean all
```
`<a name="tests"></a>`
## Tests
To test an installation is working (and that the setup scripts are working!) use:
```sh
curl -fsSL https://deb.nodesource.com/test | bash -
```
`<a name="questions"></a>`
# FAQ
Q: How do I use this repo when behind a proxy?
A: Please take a look at [issue #9](https://github.com/nodesource/distributions/issues/9)
---
Q: How do I pin to specific versions of Node.js?
A: Please take a look at [issue #33](https://github.com/nodesource/distributions/issues/33#issuecomment-169345680)
---
Q: I upgraded to a new major version of Node.js using the scripts, but the old version is still being installed, what is going on?
A: You probably need to clear out your package manager's cache. Take a look at [issue #191](https://github.com/nodesource/distributions/issues/191)
---
Q: I'm trying to install Node.js on CentOS 5 / RHEL 5 and it is failing, why?
A: Due to the limitations of the compiler toolchain on EL 5 and its end of general support, we no longer support. See [issue #190](https://github.com/nodesource/distributions/issues/190)
---
Q: I'm seeing "Your distribution, identified as "_.i686" or "_.i386, is not currently supported, why?
A: Node.js 4.x and newer require a 64bit os for rpms. See [issue #268](https://github.com/nodesource/distributions/issues/268)
---
Q: Why have certain versions of platforms/releases stopped receiving updates to Node.js?
A: Unfortunately, newer versions of V8 require a modern compiler toolchain. On some platforms, such as ARM wheezy, that toolchain is not available. See [issue #247](https://github.com/nodesource/distributions/issues/247)
---
Q: Why is my Node.js version newer than the one of the script Ive run?
A: Your package manager is probably installing a newer Node.js version from a different source. See [issue #657](https://github.com/nodesource/distributions/issues/657)
---
Q: What is the current status of IPv6 support?
A: See [issue #170](https://github.com/nodesource/distributions/issues/170)
---
Q: I cannot install Node.js on Debian Jessie or Ubuntu Trusty Tahr: GPG error, why?
A: See [issue #1181](https://github.com/nodesource/distributions/issues/1181)
`<a name="requests"></a>`
# Requested Distributions
We, unfortunately, do not have the resources necessary to support and test the plethora of Linux releases in the wild, so we rely on community members such as yourself to get support on your favorite distributions! This is a list of releases that have been requested by the community. If you are interested in contributing to this project, this would be a great place to start!
* OpenSUSE - [Issue #199](https://github.com/nodesource/distributions/issues/199)
* Scientific Linux - [Issue #251](https://github.com/nodesource/distributions/issues/251)
* TANGLU Bartholomea - [Issue #81](https://github.com/nodesource/distributions/issues/81)
* Korora - [Issue #130](https://github.com/nodesource/distributions/issues/130)
* FreePBX - [Issue #257](https://github.com/nodesource/distributions/issues/257)
* PopOS - [Issue #924](https://github.com/nodesource/distributions/issues/924)
* Kylin - [Issue #1011](https://github.com/nodesource/distributions/issues/1011)
* MakuluLinux - [Issue #1012](https://github.com/nodesource/distributions/issues/1012)
* GuixSD - [Issue #1297](https://github.com/nodesource/distributions/issues/1297)
* XCP-ng - [Issue #1061](https://github.com/nodesource/distributions/issues/1061)
* VzLinux - [Issue #1060](https://github.com/nodesource/distributions/issues/1060)
`<a name="authors-contributors"></a>`
## Authors and Contributors
<table><tbody>
<tr><th align="left">Chris Lea</th><td><a href="https://github.com/chrislea">GitHub/chrislea</a></td><td><a href="http://twitter.com/chrislea">Twitter/@chrislea</a></td></tr>
<tr><th align="left">Rod Vagg</th><td><a href="https://github.com/rvagg">GitHub/rvagg</a></td><td><a href="http://twitter.com/rvagg">Twitter/@rvagg</a></td></tr>
<tr><th align="left">William Blankenship</th><td><a href="https://github.com/retrohacker">GitHub/retrohacker</a></td><td><a href="http://twitter.com/retrohack3r">Twitter/@retrohack3r</a></td></tr>
<tr><th align="left">Harry Truong</th><td><a href="https://github.com/harrytruong">GitHub/harrytruong</a></td><td></td></tr>
<tr><th align="left">Matteo Brunati</th><td><a href="https://github.com/mattbrun">GitHub/mattbrun</a></td><td></td></tr>
<tr><th align="left">Brian White</th><td><a href="https://github.com/mscdex">GitHub/mscdex</a></td><td></td></tr>
<tr><th align="left">Matt Lewandowsky</th><td><a href="https://github.com/lewellyn">GitHub/lewellyn</a></td><td></td></tr>
<tr><th align="left">Jan-Hendrik Peters</th><td><a href="https://github.com/hennr">GitHub/hennr</a></td><td></td></tr>
<tr><th align="left">Andris Reinman</th><td><a href="https://github.com/andris9">GitHub/andris9</a></td><td></td></tr>
<tr><th align="left">Carvilsi</th><td><a href="https://github.com/carvilsi">GitHub/carvilsi</a></td><td></td></tr>
<tr><th align="left">Krasimir Trenchev</th><td><a href="https://github.com/Ava7">GitHub/Ava7</a></td><td></td></tr>
<tr><th align="left">Phil Helm</th><td><a href="https://github.com/phelma">GitHub/phelma</a></td><td></td></tr>
<tr><th align="left">0xmohit</th><td><a href="https://github.com/0xmohit">GitHub/0xmohit</a></td><td></td></tr>
<tr><th align="left">jdarling</th><td><a href="https://github.com/jdarling">GitHub/jdarling</a></td><td></td></tr>
<tr><th align="left">Prayag Verma</th><td><a href="https://github.com/pra85">GitHub/pra85</a></td><td></td></tr>
<tr><th align="left">Misha Brukman</th><td><a href="https://github.com/mbrukman">GitHub/mbrukman</a></td><td></td></tr>
<tr><th align="left">Simon Lydell</th><td><a href="https://github.com/lydell">GitHub/lydell</a></td><td></td></tr>
<tr><th align="left">Sebastian Blei</th><td><a href="https://github.com/iamsebastian">GitHub/iamsebastian</a></td><td></td></tr>
<tr><th align="left">Jorge Maldonado Ventura</th><td><a href="https://notabug.org/jorgesumle">NotABug/jorgesumle</a></td><td></td></tr>
<tr><th align="left">Mayank Metha</th><td><a href="https://github.com/mayankmetha">GitHub/mayankmetha</a></td><td><a href="https://twitter.com/mayankmethad">Twitter/@mayankmethad</a></td></tr>
<tr><th align="left">Adrian Estrada</th><td><a href="https://github.com/edsadr">GitHub/edsadr</a></td><td><a href="https://twitter.com/edsadr">Twitter/@edsadr</a></td></tr>
<tr><th align="left">Iván Iguarán</th><td><a href="https://github.com/igsu">GitHub/igsu</a></td><td></td></tr>
<tr><th align="left">Jesus Paz</th><td><a href="https://github.com/JesusPaz">GitHub/JesusPaz</a></td><td></td></tr>
</tbody></table>
Contributions are welcomed from anyone wanting to improve this project!
`<a name="project-license"></a>`
## License
This material is Copyright (c) NodeSource and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included [LICENSE.md](./LICENSE.md) file for more details.
---
*Supported with love by the [NodeSource](https://nodesource.com) team*
*This project is not affiliated with Debian, Ubuntu, Red Hat, CentOS or Fedora.*`<br>`
*Ubuntu is a registered trademark of Canonical Ltd.*`<br>`
*Debian is a registered trademark owned by Software in the Public Interest, Inc.*`<br>`
*Red Hat, CentOS and Fedora are trademarks of Red Hat, Inc.*`<br>`
*CloudLinux is a trademark of Cloud Linux, Inc*
+1365
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,284 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 728 216" style="enable-background:new 0 0 728 216;" xml:space="preserve">
<style type="text/css">
.st0{fill:#A80030;}
.st1{fill:#DD4814;}
.st2{fill:#FFFFFF;}
.st3{fill:#020001;}
.st4{fill:#E03127;}
.st5{fill:#072B61;}
.st6{fill:#0A57A4;}
.st7{fill:#262577;}
.st8{fill:#932279;}
.st9{fill:#EFA724;}
.st10{fill:#9CCD2A;}
.st11{fill:#FCE94F;}
.st12{fill:#202525;}
.st13{fill:#89A19C;}
.st14{fill:none;stroke:#E1E7E6;stroke-miterlimit:10;}
</style>
<path class="st0" d="M90.2,130.2c0.2,0,0.5,0.1,0.5,0.1C90.9,130.3,91,130.3,90.2,130.2"/>
<polyline class="st0" points="90.7,130.4 90.5,130.4 90.6,130.4 90.7,130.4 "/>
<path class="st0" d="M90.3,130c0.3-0.1,0.8-0.1,1.1-0.1c-0.4,0-0.8,0.1-1.3,0.1H90.3"/>
<g>
<circle class="st1" cx="230.1" cy="156.9" r="4.9"/>
<path class="st2" d="M227.1,156.3c-0.3,0-0.6,0.3-0.6,0.6s0.3,0.6,0.6,0.6c0.3,0,0.6-0.3,0.6-0.6
C227.7,156.5,227.4,156.3,227.1,156.3z M231.3,159c-0.3,0.2-0.4,0.5-0.2,0.8c0.2,0.3,0.5,0.4,0.8,0.2s0.4-0.5,0.2-0.8
C232,158.9,231.6,158.8,231.3,159z M228.4,156.9c0-0.6,0.3-1.1,0.7-1.4l-0.4-0.7c-0.5,0.3-0.9,0.9-1.1,1.5c0.2,0.2,0.3,0.4,0.3,0.6
c0,0.3-0.1,0.5-0.3,0.6c0.2,0.6,0.5,1.2,1.1,1.5l0.4-0.7C228.6,158,228.4,157.4,228.4,156.9z M230.1,155.1c0.9,0,1.6,0.7,1.7,1.6
h0.8c0-0.7-0.3-1.2-0.8-1.7c-0.2,0.1-0.5,0.1-0.7-0.1c-0.2-0.1-0.4-0.3-0.4-0.6c-0.2-0.1-0.5-0.1-0.7-0.1c-0.4,0-0.8,0.1-1.1,0.3
l0.4,0.7C229.6,155.2,229.8,155.1,230.1,155.1z M230.1,158.6c-0.3,0-0.5-0.1-0.7-0.2l-0.4,0.7c0.3,0.2,0.7,0.3,1.1,0.3
c0.2,0,0.5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0.7-1.4-0.7c-0.3,0-0.5,0.1-0.8,0.2
c-0.9,0.5-2,0.8-3.2,0.8h-1.3c-0.6-1.9-1-3.9-1-6.1c0-10.5,8.5-18.9,18.9-18.9c10.5,0,18.9,8.5,18.9,18.9
C315.9,162.7,314.8,166.2,312.9,169.2z"/>
<path class="st3" d="M301.1,167.4c0.1,0.1,0.3,0.4,0.1,0.8c-0.1,0.2-0.2,0.4-0.5,0.5c-0.3,0.2-0.8,0.5-1.5,0
c-0.4-0.2-0.4-0.3-0.9-0.3c-0.4,0-0.5-0.3-0.4-0.7c0.1-0.3,0.7-0.6,1.4-0.2c0.3,0.2,0.8,0.6,1.2,0.2
C300.7,167.8,300.8,167.7,301.1,167.4L301.1,167.4L301.1,167.4z"/>
<path class="st4" d="M307.6,153.9c-0.2,0.6-0.5,1.4-1.6,2c-0.2,0.1-0.2-0.1-0.2-0.2c0.4-0.8,0.5-1,0.7-1.3c0.2-0.4,0.3-1.1-0.1-2.4
c-0.7-2.6-2.2-6-3.3-7.1c-1-1.1-2.9-1.4-4.6-0.9c-0.6,0.2-1.9,0.8-4.1,0.3c-3.9-0.9-4.5,1.1-4.8,1.9c-0.2,0.9-0.8,3.3-0.8,3.3
c-0.2,1-0.4,2.7,5.7,3.9c2.9,0.5,3,1.3,3.1,1.8c0.2,1,0.6,1.5,1,1.8s0,0.5-0.5,0.5c-1.2,0.1-5.7-1.2-8.4-2.7
c-2.2-1.3-2.2-2.5-1.7-3.5c-3.3-0.4-5.7,0.3-6.2,1.9c-0.8,2.7,5.9,7.2,13.4,9.5c7.9,2.4,16.1,0.7,17-4.3
C312.8,156.3,310.9,154.6,307.6,153.9z"/>
<path class="st3" d="M315.2,168.4h0.1l0.2,0.3h0.1l-0.2-0.3c0.1,0,0.2-0.1,0.2-0.2c0-0.1-0.1-0.2-0.3-0.2H315v0.7h0.1L315.2,168.4
L315.2,168.4z M315.2,168.3v-0.2h0.2c0.1,0,0.2,0,0.2,0.1c0,0.1-0.1,0.1-0.2,0.1H315.2z"/>
<path class="st3" d="M316,168.3c0,0.4-0.3,0.7-0.7,0.7c-0.4,0-0.7-0.3-0.7-0.7c0-0.4,0.3-0.7,0.7-0.7
C315.7,167.6,316,167.9,316,168.3z M315.3,167.7c-0.3,0-0.6,0.3-0.6,0.6c0,0.3,0.3,0.6,0.6,0.6c0.3,0,0.6-0.3,0.6-0.6
C315.9,168,315.6,167.7,315.3,167.7z"/>
<path class="st3" d="M295.5,149c-2.2,0.2-2.4,0.4-2.8,0.8c-0.6,0.6-1.3-0.8-1.3-0.8c-0.5-0.1-1-0.8-0.7-1.5s0.8-0.5,1-0.3
c0.2,0.3,0.6,0.7,1.2,0.7s1.2-0.1,2.2-0.1c0.9,0,1.6,0.3,1.6,0.6C296.6,148.7,296.5,148.9,295.5,149z"/>
<path class="st3" d="M297.8,145.4L297.8,145.4L297.8,145.4L297.8,145.4c0.4-0.3,1.1-0.5,1.8-0.6c0.2,0,0.4,0,0.6,0h0.1
c1.2,0,2.2,0.5,2.2,1.1c0,0.6-1,1-2.2,1c-0.4,0-0.8-0.1-1.1-0.2l-0.1-0.1l0.1-0.1c0.8-0.2,1.3-0.5,1.2-0.7c0-0.4-1-0.6-2.2-0.4
C298,145.3,297.9,145.4,297.8,145.4z"/>
<path class="st3" d="M325.8,160.8c0-1.7,0-3-0.1-4.1h2.8l0.1,2.4h0.1c0.6-1.8,2.1-2.7,3.5-2.7c0.3,0,0.5,0,0.8,0.1v3
c-0.3-0.1-0.6-0.1-1-0.1c-1.5,0-2.6,1-2.9,2.4c-0.1,0.3-0.1,0.6-0.1,1v6.7h-3.2L325.8,160.8z"/>
<path class="st3" d="M336.8,164c0.1,2.3,1.9,3.3,3.9,3.3c1.5,0,2.5-0.2,3.5-0.6l0.5,2.2c-1.1,0.5-2.6,0.8-4.4,0.8
c-4.1,0-6.5-2.5-6.5-6.4c0-3.5,2.1-6.8,6.2-6.8s5.5,3.4,5.5,6.2c0,0.6-0.1,1.1-0.1,1.4L336.8,164z M342.4,161.7
c0-1.2-0.5-3.1-2.6-3.1c-2,0-2.8,1.8-2.9,3.1H342.4z"/>
<path class="st3" d="M382.9,166.5c0,1,0,2,0.2,3H382l-0.2-1.8h-0.1c-0.6,1-2,2.1-4,2.1c-2.5,0-3.7-1.8-3.7-3.4
c0-2.9,2.5-4.6,7.6-4.6v-0.3c0-1.2-0.2-3.7-3.2-3.7c-1.1,0-2.2,0.3-3.1,0.9l-0.4-0.9c1.1-0.8,2.5-1.1,3.7-1.1
c3.6,0,4.3,2.7,4.3,4.9L382.9,166.5L382.9,166.5z M381.7,162.8c-2.7-0.1-6.3,0.3-6.3,3.3c0,1.8,1.2,2.6,2.5,2.6
c2.1,0,3.3-1.3,3.7-2.5c0.1-0.3,0.1-0.5,0.1-0.8L381.7,162.8L381.7,162.8z"/>
<path class="st3" d="M388,154.2v2.8h3.6v1H388v8.1c0,1.6,0.5,2.6,1.8,2.6c0.6,0,1.1-0.1,1.4-0.2l0.2,1c-0.4,0.2-1,0.3-1.7,0.3
c-0.9,0-1.7-0.3-2.2-0.9c-0.6-0.7-0.8-1.7-0.8-3V158h-2.1v-1h2.1v-2.3L388,154.2z"/>
<path class="st3" d="M367.6,156.7c-1,0-1.8,0.3-2.5,0.7c-0.7,0.4-1.4,1.1-1.7,1.8h-0.1V153l-1.2-0.3v16.8h1.2v-7.7
c0-0.5,0-0.9,0.2-1.2c0.5-1.6,2-2.8,3.8-2.8c2.6,0,3.4,2.1,3.4,4.3v7.4h1.2V162C372,157.2,368.8,156.7,367.6,156.7z"/>
<path class="st3" d="M359.2,151.9L356,151v7.1h-0.1c-0.6-0.9-1.8-1.7-3.6-1.7c-3.1,0-5.7,2.5-5.7,6.8c0,3.9,2.4,6.5,5.4,6.5
c1.8,0,3.4-0.9,4.1-2.3h0.1l0.1,2h2.9c-0.1-0.9-0.1-2.3-0.1-3.6v-13.9H359.2z M356,164c0,0.3,0,0.7-0.1,0.9
c-0.3,1.4-1.5,2.3-2.8,2.3c-2,0-3.2-1.7-3.2-4c0-2.4,1.1-4.2,3.2-4.2c1.4,0,2.5,1,2.8,2.3c0.1,0.3,0.1,0.6,0.1,0.8V164z"/>
<path class="st3" d="M393.3,168.9h0.2l0.2,0.4h0.1l-0.2-0.4c0.1,0,0.2-0.1,0.2-0.2c0-0.2-0.1-0.2-0.3-0.2h-0.3v0.9h0.1L393.3,168.9
L393.3,168.9z M393.3,168.8v-0.3h0.2c0.1,0,0.2,0,0.2,0.1c0,0.1-0.1,0.1-0.2,0.1L393.3,168.8L393.3,168.8z"/>
<path class="st3" d="M394.3,168.8c0,0.5-0.4,0.9-0.9,0.9s-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9C393.9,168,394.3,168.4,394.3,168.8z
M393.5,168.1c-0.4,0-0.7,0.3-0.7,0.7c0,0.4,0.3,0.7,0.7,0.7c0.4,0,0.7-0.3,0.7-0.7C394.2,168.5,393.8,168.1,393.5,168.1z"/>
<path class="st5" d="M663.5,148.7c0-4.2-3.4-7.6-7.6-7.6c-4.2,0-7.6,3.4-7.6,7.6l0,0v5.8l0,0c0,0.9,0.8,1.7,1.7,1.7l0,0l0,0h5.8
C660.1,156.2,663.5,152.8,663.5,148.7"/>
<path class="st6" d="M658.2,142.9c-2,0-3.5,1.6-3.5,3.5v1.9h-1.9c-2,0-3.5,1.6-3.5,3.5c0,2,1.6,3.5,3.5,3.5c2,0,3.5-1.6,3.5-3.5
v-1.9h1.9c2,0,3.5-1.6,3.5-3.5C661.7,144.5,660.1,142.9,658.2,142.9z M658.2,144.6c1,0,1.9,0.8,1.9,1.9c0,1-0.8,1.9-1.9,1.9l0,0
h-1.6c-0.1,0-0.3-0.1-0.3-0.3v-1.6C656.3,145.4,657.1,144.6,658.2,144.6z M609.5,149.3c-0.7,0-1.4,0.6-1.4,1.3v7.1
c-0.7-1.3-2.2-2.1-3.9-2.1c-3.6,0-6,2.7-6,6.3s2.5,6.3,6,6.3c1.6,0,2.9-0.6,3.7-1.8l0.3,0.8c0.2,0.5,0.7,0.9,1.3,0.9
c0.7,0,1.3-0.6,1.3-1.3l0,0v-16.2C610.8,149.9,610.2,149.3,609.5,149.3z M582,149.4c-2.8,0-5.1,2.3-5.1,5.1v1.6h-1.7
c-0.6,0-1.1,0.5-1.1,1.1c0,0.6,0.5,1.2,1.1,1.2h1.7v8.5c0,0.7,0.6,1.4,1.4,1.4c0.7,0,1.4-0.6,1.4-1.4v-8.5h1.8
c0.6,0,1.1-0.6,1.1-1.2c0-0.6-0.5-1.1-1.1-1.1h-1.8v-1.6c0-1.3,1.1-2.5,2.4-2.5c0.1,0,0.2,0,0.4,0c0.7,0.1,1.4-0.2,1.5-1
c0.1-0.7-0.4-1.4-1.1-1.5C582.5,149.4,582.2,149.4,582,149.4z M652.7,150h1.6c0.1,0,0.3,0.1,0.3,0.3v1.6c0,1-0.8,1.9-1.9,1.9
c-1,0-1.9-0.8-1.9-1.9C650.9,150.8,651.7,150,652.7,150z M661.4,154.4L661.4,154.4l0.1,0.1v0.4h0.1v-0.4h0.1v-0.1H661.4z
M661.8,154.4v0.5h0.1v-0.3l0,0l0,0l0.1,0.3l0.1-0.3v-0.1v0.1v0.3h0.1v-0.5h-0.1l-0.1,0.3v0.1v-0.1L661.8,154.4L661.8,154.4z
M589.9,155.6c-3.5,0-6.2,2.8-6.2,6.3s2.8,6.3,6.3,6.3c1.9,0,3.9-0.8,5-2.1c0.2-0.2,0.4-0.6,0.4-0.9c0-0.2-0.1-0.4-0.2-0.6
c-0.2-0.3-0.6-0.4-0.9-0.4c-0.2,0-0.5,0.1-0.7,0.2c-1,0.9-2.2,1.5-3.6,1.5c-2,0-3.5-1.4-3.6-3.2c8.5,0,8.5,0,8.5,0
c0.5,0,1-0.4,1-0.9C596,158.3,593.4,155.6,589.9,155.6z M619.3,155.6c-3.5,0-6.3,2.8-6.3,6.3s2.8,6.3,6.3,6.3s6.3-2.8,6.3-6.3
C625.6,158.5,622.8,155.6,619.3,155.6z M634.7,155.6c-1.8,0-3.1,0.6-4.2,1.9l-0.1-0.6c-0.1-0.7-0.6-1.2-1.3-1.2s-1.4,0.6-1.4,1.4
l0,0v9.7c0,0.7,0.6,1.4,1.4,1.4c0.7,0,1.4-0.6,1.4-1.4v-5.2c0-2.4,2.1-3.6,4.2-3.6c0.7,0,1.2-0.5,1.2-1.2
C635.9,156.2,635.4,155.6,634.7,155.6z M642.7,155.6c-3.5,0-6.3,2.8-6.3,6.3s2.8,6.3,6.1,6.3c1.7,0,3.2-0.9,3.8-1.8l0.3,0.8
c0.2,0.5,0.6,0.8,1.2,0.8c0.7,0,1.2-0.6,1.2-1.2v-3.2v-1.7C649,158.6,646.6,155.6,642.7,155.6z M589.9,157.9c1.8,0,3.1,1.3,3.4,3
c0,0-2.6,0-6.8,0C586.8,159.1,588,157.9,589.9,157.9z M604.5,158c2.2,0,3.6,1.7,3.6,3.9s-1.4,3.9-3.6,3.9c-2.2,0-3.6-1.8-3.6-3.9
C600.9,159.8,602.3,158,604.5,158z M619.3,158c2.2,0,3.6,1.8,3.6,3.9c0,2.1-1.4,3.9-3.6,3.9c-2.2,0-3.6-1.8-3.6-3.9
C615.7,159.8,617.1,158,619.3,158z M642.7,158c2.2,0,3.6,1.8,3.6,3.9c0,2.1-1.4,3.9-3.6,3.9c-2.2,0-3.6-1.8-3.6-3.9
C639,159.8,640.5,158,642.7,158z M649.3,166.4L649.3,166.4l0.1,0.1v0.4h0.1v-0.4h0.1v-0.1H649.3z M649.8,166.4v0.5h0.1v-0.3v-0.1
l0,0l0.1,0.3l0.1-0.3l0,0v0.1v0.3h0.1v-0.5h-0.1l-0.1,0.3v0.1v-0.1L649.8,166.4L649.8,166.4z"/>
<path class="st2" d="M654.6,148.3v-1.8l0,0c0-2,1.6-3.5,3.5-3.5c0.3,0,0.5,0,0.8,0.1c0.4,0.1,0.7,0.4,0.7,0.8
c0,0.5-0.3,0.8-0.8,0.8c-0.2,0-0.3,0-0.7,0c-1,0-1.9,0.8-1.9,1.9v1.6l0,0c0,0.1,0.1,0.3,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-1.5-0.8l0.2-0.3c-0.4,0-0.9-0.6-1.1-0.9h-0.4
c-0.5-0.6-0.7-1-0.7-1.3l-0.1,0.2c-0.1-0.2-1.7-2.2-0.9-1.7c-0.2-0.1-0.4-0.2-0.6-0.6l0.2-0.2c-0.4-0.5-0.7-1.2-0.7-1.4
c0.2,0.3,0.4,0.3,0.5,0.4c-1-2.5-1.1-0.1-1.8-2.5H81c-0.1-0.2-0.2-0.4-0.3-0.6l0.1-0.7c-0.7-0.8-0.2-3.5-0.1-5
c0.1-0.6,0.6-1.2,1-2.3h-0.2c0.5-0.8,2.7-3.3,3.7-3.2c0.5-0.6-0.1,0-0.2-0.2c1.1-1.1,1.4-0.8,2.2-1c0.8-0.5-0.7,0.2-0.3-0.2
c1.4-0.4,1-0.8,2.8-1c0.2,0.1-0.4,0.2-0.6,0.3c1.1-0.6,3.6-0.4,5.2,0.3c1.9,0.9,4,3.4,4,5.9h0.1c0,1,0.1,2.1-0.2,3.1L98.2,151.8"/>
<path class="st0" d="M86.9,155l-0.1,0.3c0.3,0.4,0.5,0.8,0.9,1.2C87.5,156,87.3,155.8,86.9,155"/>
<path class="st0" d="M87.6,155c-0.2-0.2-0.3-0.4-0.4-0.6c0.1,0.4,0.3,0.7,0.5,1L87.6,155"/>
<path class="st0" d="M100.2,152.3l-0.1,0.2c-0.1,0.9-0.4,1.7-0.8,2.5C99.7,154.1,100,153.2,100.2,152.3"/>
<path class="st0" d="M79.4,145.8c0.1,0.7-0.5,0.9,0.1,0.5C79.9,145.5,79.4,146,79.4,145.8"/>
<path class="st0" d="M78.7,148.8c0.1-0.4,0.2-0.7,0.2-1C78.5,148.4,78.8,148.5,78.7,148.8"/>
<path d="M77.4,178.1c0,0,0,2.3,0,2.9c0,0.5-0.1,1.5-1.1,1.5s-1.3-1.2-1.4-1.7c-0.1-0.6-0.1-1.1-0.1-1.3c0-0.7,0-2.6,1.6-2.6
c0.5,0,0.7,0.1,1,0.3V178.1z M73.3,179.8c0,4,2.1,4,2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.3-2.7,0.8-3.8c0.6-1.2,1.4-2.1,2.5-2.5c0.8-0.3,1.7-0.5,2.6-0.5h5.4v2.6h-5.6c-0.9,0-1.6,0.5-2,1.5
c-0.3,0.8-0.5,1.8-0.5,3c0,1,0.2,1.9,0.6,2.7c0.5,0.9,1.1,1.3,2,1.3h5.5V167.4L472.9,167.4z"/>
<path class="st7" d="M483,167.5h-4.7c-1.1,0-2.1-0.5-3-1.5c-0.8-1-1.2-2.1-1.2-3.4c0-1.4,0.5-2.6,1.4-3.6s1.9-1.5,3.1-1.5h4.4v2
h-3.3c-0.4,0-0.8,0-1.1,0.1c-0.3,0.1-0.5,0.2-0.8,0.4c-0.4,0.4-0.7,1-0.7,1.6h5.7v2.1h-5.7c0,0.3,0,0.5,0.1,0.7s0.2,0.4,0.4,0.6
c0.2,0.2,0.5,0.3,0.8,0.4c0.3,0.1,0.7,0.1,1.1,0.1h3.4v2C482.9,167.5,483,167.5,483,167.5z"/>
<path class="st7" d="M494.1,167.4h-2.7v-6.5c0-0.2,0-0.3-0.1-0.4c-0.1-0.1-0.2-0.3-0.3-0.4c-0.3-0.2-0.5-0.3-0.9-0.3h-2.6v7.7h-2.6
v-10h5.1c0.9,0,1.6,0.1,2,0.2c0.6,0.2,1.1,0.5,1.5,1c0.4,0.6,0.7,1.3,0.7,2v6.7C494.2,167.4,494.1,167.4,494.1,167.4z"/>
<path class="st7" d="M502.2,159.6h-2.6v4.5c0,0.4,0.1,0.7,0.4,1c0.3,0.3,0.7,0.4,1.3,0.4h0.8v1.9h-2.5c-0.7,0-1.6-0.3-2.1-0.8
c-0.3-0.3-0.5-0.7-0.6-1.1c-0.1-0.4-0.1-0.8-0.1-1.4v-4.6h-1.7v-2h1.7V154h2.8v3.5h2.6L502.2,159.6L502.2,159.6z"/>
<path class="st7" d="M518.1,160.7c0,2.6-0.7,4.5-2.2,5.6c-1.2,0.9-2.9,1.4-5.1,1.4c-2.5,0-4.3-0.5-5.5-1.6c-1.3-1.1-2-3-2-5.5
c0-2.1,0.6-3.7,1.7-4.9c1.3-1.3,3.2-1.9,5.7-1.9c2.8,0,4.7,0.6,5.9,1.8C517.6,156.7,518.1,158.4,518.1,160.7L518.1,160.7z
M514.6,160.6c0-1.3-0.3-2.4-0.9-3.1c-0.7-0.9-1.7-1.3-3.1-1.3c-1.4,0-2.4,0.5-3.1,1.4c-0.6,0.8-0.9,1.8-0.9,3
c0,1.4,0.2,2.5,0.7,3.2c0.6,1,1.8,1.4,3.5,1.4c1.5,0,2.5-0.5,3.1-1.4C514.4,163.1,514.6,162.1,514.6,160.6L514.6,160.6z"/>
<path class="st7" d="M533.7,163.3c0,1.2-0.4,2.2-1.2,3s-1.8,1.2-3,1.2H520v-2.4h7.8c0.5,0,1-0.1,1.3-0.4c0.4-0.3,0.6-0.7,0.6-1.1
c0-1.1-0.8-1.7-2.4-1.7h-3.9c-1.1,0-2.1-0.4-3-1.1s-1.3-1.6-1.3-2.7c0-1.2,0.4-2.2,1.2-2.9c0.8-0.8,1.9-1.1,3.3-1.1h9.1v2.3h-8
c-0.4,0-0.7,0.2-1.1,0.5c-0.4,0.3-0.5,0.6-0.5,1.1s0.2,0.8,0.5,1.2c0.4,0.3,0.8,0.5,1.3,0.5h4.3c1.4,0,2.4,0.4,3.2,1.1
C533.3,161.2,533.7,162.1,533.7,163.3L533.7,163.3z"/>
<polygon class="st8" points="443.8,160.4 438.5,165.5 433.3,160.4 438.5,155.2 "/>
<polygon class="st2" points="443.8,160.4 443.4,160 438.5,164.8 434,160.4 438.5,155.9 443.4,160.7 443.8,160.4 443.4,160
443.8,160.4 444.1,160 438.5,154.5 432.6,160.4 438.5,166.2 444.5,160.4 444.1,160 "/>
<polygon class="st9" points="444.9,159.3 439.7,154.1 444.9,149 450,154.1 "/>
<polygon class="st2" points="444.9,159.3 445.2,159 440.4,154.1 444.9,149.7 449.3,154.1 444.5,159 444.9,159.3 445.2,159
444.9,159.3 445.2,159.7 450.7,154.1 444.9,148.2 439,154.1 444.9,160 445.2,159.7 "/>
<polygon class="st10" points="450,166.6 444.8,171.8 439.6,166.6 444.8,161.5 "/>
<polygon class="st2" points="450,166.6 449.7,166.3 444.8,171.1 440.3,166.6 444.8,162.2 449.7,167 450,166.6 449.7,166.3
450,166.6 450.4,166.3 444.8,160.8 438.8,166.6 444.8,172.5 450.7,166.6 450.4,166.3 "/>
<polygon class="st7" points="451.1,165.6 446,160.4 451.1,155.2 456.3,160.4 "/>
<polygon class="st2" points="451.1,165.6 451.5,165.2 446.7,160.4 451.1,155.9 455.6,160.4 450.8,165.2 451.1,165.6 451.5,165.2
451.1,165.6 451.5,165.9 457,160.4 451.1,154.5 445.3,160.4 451.1,166.3 451.5,165.9 "/>
<rect x="436.8" y="152.3" class="st11" width="7" height="7"/>
<rect x="445.9" y="161.4" class="st9" width="7" height="7"/>
<rect x="445.9" y="152.3" class="st8" width="7" height="7"/>
<rect x="436.5" y="152" class="st10" width="7.3" height="7.3"/>
<polygon class="st2" points="436.5,152 436.5,152.5 443.3,152.5 443.3,158.8 437,158.8 437,152 436.5,152 436.5,152.5 436.5,152
436,152 436,159.8 444.3,159.8 444.3,151.5 436,151.5 436,152 "/>
<polygon class="st2" points="445.9,161.4 445.9,161.9 452.6,161.9 452.6,168.2 446.4,168.2 446.4,161.4 445.9,161.4 445.9,161.9
445.9,161.4 445.4,161.4 445.4,169.2 453.6,169.2 453.6,160.9 445.4,160.9 445.4,161.4 "/>
<polygon class="st2" points="445.9,152.1 445.9,152.6 452.7,152.6 452.7,158.8 446.4,158.8 446.4,152.1 445.9,152.1 445.9,152.6
445.9,152.1 445.4,152.1 445.4,159.8 453.7,159.8 453.7,151.6 445.4,151.6 445.4,152.1 "/>
<rect x="436.5" y="161.4" class="st7" width="7.3" height="7.3"/>
<polygon class="st2" points="436.5,161.4 436.5,161.9 443.3,161.9 443.3,168.2 437,168.2 437,161.4 436.5,161.4 436.5,161.9
436.5,161.4 436,161.4 436,169.2 444.3,169.2 444.3,160.9 436,160.9 436,161.4 "/>
<polygon class="st2" points="443.8,160.4 443.4,160 438.5,164.8 434,160.4 438.5,155.9 443.4,160.7 443.8,160.4 443.4,160
443.8,160.4 444.1,160 438.5,154.5 432.6,160.4 438.5,166.2 444.5,160.4 444.1,160 "/>
<polygon class="st2" points="444.9,159.3 445.2,159 440.4,154.1 444.9,149.7 449.3,154.1 444.5,159 444.9,159.3 445.2,159
444.9,159.3 445.2,159.7 450.7,154.1 444.9,148.2 439,154.1 444.9,160 445.2,159.7 "/>
<polygon class="st2" points="450,166.6 449.7,166.3 444.8,171.1 440.3,166.6 444.8,162.2 449.7,167 450,166.6 449.7,166.3
450,166.6 450.4,166.3 444.8,160.8 438.8,166.6 444.8,172.5 450.7,166.6 450.4,166.3 "/>
<polygon class="st2" points="451.1,165.6 451.5,165.2 446.7,160.4 451.1,155.9 455.6,160.4 450.8,165.2 451.1,165.6 451.5,165.2
451.1,165.6 451.5,165.9 457,160.4 451.1,154.5 445.3,160.4 451.1,166.3 451.5,165.9 "/>
</g>
<g>
<g>
<path class="st12" d="M316.7,46.8v14.4c0,0.4-0.3,0.8-0.6,0.9c-0.1,0-0.2,0.1-0.3,0.1c-0.3,0-0.6-0.1-0.7-0.4l-9.7-12.3v11.7
c0,0.5-0.4,0.9-0.9,0.9s-0.9-0.4-0.9-0.9V46.8c0-0.4,0.3-0.8,0.6-0.9c0.4-0.1,0.8,0,1.1,0.3l9.7,12.3V46.8c0-0.5,0.4-0.9,0.9-0.9
C316.3,45.8,316.7,46.3,316.7,46.8z M336.1,54c0,4.7-3.6,8.5-8,8.5s-8-3.8-8-8.5s3.6-8.5,8-8.5S336.1,49.3,336.1,54z M334.2,54
c0-3.6-2.8-6.6-6.2-6.6s-6.2,3-6.2,6.6c0,3.6,2.8,6.6,6.2,6.6S334.2,57.6,334.2,54z M400.7,54c0,4.7-3.6,8.5-8,8.5
c-4.4,0-8-3.8-8-8.5s3.6-8.5,8-8.5C397,45.5,400.7,49.3,400.7,54z M398.8,54c0-3.6-2.8-6.6-6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3-0.3,0.5-0.4L276.8,38.7z M284.4,54c0,3.3-2.5,6-5.7,6.3v-5.9l5.1-3C284.2,52.2,284.4,53.1,284.4,54z M272.2,51.4
l5.1,3v5.9c-3.2-0.3-5.7-3-5.7-6.3C271.7,53.1,271.9,52.2,272.2,51.4z M278,53.2l-5.1-3c1.2-1.6,3-2.6,5.1-2.6c2.1,0,4,1,5.1,2.6
L278,53.2z M265.3,62.8c-0.2-0.1-0.4-0.2-0.5-0.4l4.5-2.6c0.3-0.2,0.4-0.6,0.2-0.9c-0.2-0.3-0.6-0.4-0.9-0.2l-4.5,2.6
c-0.1-0.2-0.1-0.4-0.1-0.6l0-13.2c0-0.2,0-0.4,0.1-0.6l6.9,4c-0.5,1-0.7,2.1-0.7,3.2c0,4,3.1,7.3,7,7.6v7.8c0,0.1,0,0.1,0,0.2
c-0.2-0.1-0.4-0.1-0.7-0.3L265.3,62.8z M279.2,69.3c-0.2,0.1-0.4,0.2-0.6,0.3c0-0.1,0-0.1,0-0.2v-7.8c3.9-0.3,7-3.6,7-7.6
c0-1.2-0.3-2.3-0.7-3.2l6.9-4c0.1,0.2,0.1,0.4,0.1,0.6l0,13.2c0,0.2,0,0.4-0.1,0.7l-4.4-2.6c-0.3-0.2-0.7-0.1-0.9,0.2
c-0.2,0.3-0.1,0.7,0.2,0.9l4.4,2.6c-0.1,0.1-0.3,0.3-0.5,0.4L279.2,69.3z"/>
</g>
<line class="st14" x1="51.2" y1="108" x2="676.8" y2="108"/>
</svg>

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 24 KiB

@@ -0,0 +1,49 @@
# Node.js Version Setup Scripts
This repository contains scripts for setting up different versions of Node.js on Debian based Linux systems.
## Modifying the Scripts
Each script in this repository sets up a specific version of Node.js. The version is specified in the line `NODE_VERSION="XX.x"` in each script. To modify the version, simply replace `"XX.x"` with the desired version, e.g., `"18.x"`.
For example, to modify the `setup_18.x` script to install Node.js version 20.x instead, you would change the line to `NODE_VERSION="20.x"`.
## Running the Scripts
To run a script, navigate to the directory containing the script and run the following command:
```bash
sudo bash setup_XX.x
```
Replace `XX.x` with the version number of the script you want to run. For example, to run the `setup_18.x` script, you would use the command `sudo bash setup_18.x`.
## How It Works
Each script in this repository performs the following steps:
1. Checks if the system is an Debian based Linux distribution.
2. Configures the NodeSource Node.js DEB repository for the specified version of Node.js.
3. Logs a message indicating that the repository is configured and updated, and instructs the user to run `apt-get install nodejs -y` to complete the installation.
The `setup_current` and `setup_latest` scripts are special scripts that install the current and latest versions of Node.js, respectively. The current version is 20.x and the latest version is 21.x.
## Updating the Scripts
If you make a change to the base script, you can regenerate all the version-specific scripts by running the generator script:
```bash
bash generator.sh
```
This script iterates over a list of versions (currently 18.x, 20.x, and 21.x), and creates a new script for each version with the updated base script. It also creates setup_current and setup_latest scripts for the current and latest versions of Node.js, respectively.
## Deploying the Scripts
After generating the scripts, you can deploy them to an S3 bucket using the AWS CLI. Here is the command to do so:
```bash
aws s3 sync scripts/deb/ s3://deb.nodesource.com/ --exclude "*/**"
```
This command syncs all the files in the scripts/deb/ directory (but not its subdirectories) with the s3://deb.nodesource.com/ bucket. Make sure to replace s3://deb.nodesource.com/ with the path to your own S3 bucket.
@@ -0,0 +1,113 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
# Define Node.js version
NODE_VERSION="XX.x"
# Check OS
check_os
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
@@ -0,0 +1,41 @@
#!/bin/bash
# Function to create a script for a given Node.js version
create_script() {
local version=$1
local script_name=$2
local target_script="../setup_$script_name.x"
echo "Creating script for Node.js version $version.x"
if sed "s/NODE_VERSION=\"XX.x\"/NODE_VERSION=\"$version.x\"/g" "$base_script" > "$target_script"; then
echo "Script created successfully: $target_script"
chmod +x "$target_script"
echo "Execute permissions set for: $target_script"
else
echo "Error: Failed to create script for version $version.x"
return 1
fi
}
# Check if the base script exists
base_script="./base_script.sh"
if [ ! -f "$base_script" ]; then
echo "Error: Base script not found at $base_script"
exit 1
fi
# List of versions
versions=("18" "20" "22" "23" "24")
# Iterate over the versions and create scripts
for version in "${versions[@]}"; do
create_script "$version" "$version"
done
# Define LTS and current Node.js versions
lts_version="22"
current_version="24"
# Create setup_lts and setup_current scripts
create_script "$lts_version" "lts"
create_script "$current_version" "current"
+172
View File
@@ -0,0 +1,172 @@
#!/bin/bash
if test -t 1; then # if terminal
ncolors=$(which tput > /dev/null && tput colors) # supports color
if test -n "$ncolors" && test $ncolors -ge 8; then
termcols=$(tput cols)
bold="$(tput bold)"
underline="$(tput smul)"
standout="$(tput smso)"
normal="$(tput sgr0)"
black="$(tput setaf 0)"
red="$(tput setaf 1)"
green="$(tput setaf 2)"
yellow="$(tput setaf 3)"
blue="$(tput setaf 4)"
magenta="$(tput setaf 5)"
cyan="$(tput setaf 6)"
white="$(tput setaf 7)"
fi
fi
print_bold() {
title="$1"
text="$2"
echo
echo "${red}================================================================================${normal}"
echo "${red}================================================================================${normal}"
echo
echo -e " ${bold}${yellow}${title}${normal}"
echo
echo -en " ${text}"
echo
echo "${red}================================================================================${normal}"
echo "${red}================================================================================${normal}"
}
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Send deprecation Warning
node_deprecation_warning() {
print_bold \
" DEPRECATION WARNING " "\
${bold}${underline} Node.js 16.x is no longer actively supported!${normal}
${bold}You will not receive security or critical stability updates${normal} for this version.
You should migrate to a supported version of Node.js as soon as possible.
Use the installation script that corresponds to the version of Node.js you
wish to install. e.g.
* ${red}https://deb.nodesource.com/setup_16.x — Node.js 16 \"Gallium\" ${bold}(deprecated)${normal}
* ${green}https://deb.nodesource.com/setup_18.x — Node.js 18 \"Hydrogen\" (Maintenance)${normal}
* ${red}https://deb.nodesource.com/setup_19.x — Node.js 19 \"Nineteen\" ${bold}(deprecated)${normal}
* ${bold}${green}https://deb.nodesource.com/setup_20.x — Node.js 20 LTS \"Iron\" (recommended)${normal}
* ${green}https://deb.nodesource.com/setup_21.x — Node.js 21 \"Iron\" (current)${normal}
Please see ${bold}https://github.com/nodejs/Release${normal} for details about which
version may be appropriate for you.
The ${green}${bold}NodeSource${normal} Node.js distributions repository contains
information both about supported versions of Node.js and supported Linux
distributions. To learn more about usage, see the repository:
${underline}${bold}https://github.com/nodesource/distributions${normal}
"
echo
echo "Continuing in 10 seconds ..."
echo
sleep 10
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run 'mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg'
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully. To install Node.js, run: apt-get install nodejs -y" "success"
fi
}
# Define Node.js version
NODE_VERSION="16.x"
# Check OS
check_os
# Main execution
node_deprecation_warning
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
+113
View File
@@ -0,0 +1,113 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
# Define Node.js version
NODE_VERSION="18.x"
# Check OS
check_os
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
+113
View File
@@ -0,0 +1,113 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
# Define Node.js version
NODE_VERSION="20.x"
# Check OS
check_os
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
+113
View File
@@ -0,0 +1,113 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
# Define Node.js version
NODE_VERSION="21.x"
# Check OS
check_os
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
+113
View File
@@ -0,0 +1,113 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
# Define Node.js version
NODE_VERSION="22.x"
# Check OS
check_os
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
+113
View File
@@ -0,0 +1,113 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
# Define Node.js version
NODE_VERSION="23.x"
# Check OS
check_os
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
+113
View File
@@ -0,0 +1,113 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
# Define Node.js version
NODE_VERSION="24.x"
# Check OS
check_os
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
+113
View File
@@ -0,0 +1,113 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
# Define Node.js version
NODE_VERSION="24.x"
# Check OS
check_os
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
+113
View File
@@ -0,0 +1,113 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}
# Function to configure the Repo
configure_repo() {
local node_version=$1
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
# Define Node.js version
NODE_VERSION="22.x"
# Check OS
check_os
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
@@ -0,0 +1,50 @@
# Node.js Version Setup Scripts
This repository contains scripts for setting up different versions of Node.js on RPM-based Linux systems.
## Modifying the Scripts
Each script in this repository sets up a specific version of Node.js. The version is specified in the line `NODE_VERSION="XX.x"` in each script. To modify the version, simply replace `"XX.x"` with the desired version, e.g., `"18.x"`.
For example, to modify the `setup_18.x` script to install Node.js version 20.x instead, you would change the line to `NODE_VERSION="20.x"`.
## Running the Scripts
To run a script, navigate to the directory containing the script and run the following command:
```bash
sudo bash setup_XX.x
```
Replace `XX.x` with the version number of the script you want to run. For example, to run the `setup_18.x` script, you would use the command `sudo bash setup_18.x`.
## How It Works
Each script in this repository performs the following steps:
1. Checks if the system is an RPM-based Linux distribution.
2. Configures the NodeSource Node.js RPM repository for the specified version of Node.js.
3. Checks if `dnf`, `yum` or `microdnf` is available and updates the system using the available package manager.
4. Logs a message indicating that the repository is configured and updated, and instructs the user to run `dnf install nodejs -y`, `yum install nodejs -y` or `microdnf install nodejs -y` to complete the installation.
The `setup_current` and `setup_latest` scripts are special scripts that install the current and latest versions of Node.js, respectively. The current version is 20.x and the latest version is 21.x.
## Updating the Scripts
If you make a change to the base script, you can regenerate all the version-specific scripts by running the generator script:
```bash
bash generator.sh
```
This script iterates over a list of versions (currently 18.x, 20.x, and 21.x), and creates a new script for each version with the updated base script. It also creates setup_current and setup_latest scripts for the current and latest versions of Node.js, respectively.
## Deploying the Scripts
After generating the scripts, you can deploy them to an S3 bucket using the AWS CLI. Here is the command to do so:
```bash
aws s3 sync scripts/rpm/ s3://rpm.nodesource.com/ --exclude "*/**"
```
This command syncs all the files in the scripts/rpm/ directory (but not its subdirectories) with the s3://rpm.nodesource.com/ bucket. Make sure to replace s3://rpm.nodesource.com/ with the path to your own S3 bucket.
@@ -0,0 +1,132 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="XX.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Check if Node.js version is an LTS version
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
# Repository content for N|Solid
NSOLID_REPO_CONTENT="[nodesource-nsolid]
name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nsolid/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write N|Solid repository content
echo "$NSOLID_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nsolid.repo > /dev/null
log "Added N|Solid repository for LTS version: $NODE_VERSION" "info"
fi
# Check for availability of dnf, yum or microdnf
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
dnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: dnf install nsolid -y" "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'dnf install nodejs -y' to complete the installation." "info"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
yum makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "Run 'yum install nsolid -y' to complete the installation." "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'yum install nodejs -y' to complete the installation." "info"
elif command_exists microdnf; then
log "microdnf available, updating..." "info"
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated. Run 'microdnf install nsolid -y' to complete the installation." "info"
else
log "Repository is configured and updated." "info"
fi
log "Run 'microdnf install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum, dnf nor microdnf package manager was found. Please update your system using your package manager."
fi
@@ -0,0 +1,41 @@
#!/bin/bash
# Function to create a script for a given Node.js version
create_script() {
local version=$1
local script_name=$2
local target_script="../setup_$script_name.x"
echo "Creating script for Node.js version $version.x"
if sed "s/NODE_VERSION=\"XX.x\"/NODE_VERSION=\"$version.x\"/g" "$base_script" > "$target_script"; then
echo "Script created successfully: $target_script"
chmod +x "$target_script"
echo "Execute permissions set for: $target_script"
else
echo "Error: Failed to create script for version $version.x"
return 1
fi
}
# Check if the base script exists
base_script="./base_script.sh"
if [ ! -f "$base_script" ]; then
echo "Error: Base script not found at $base_script"
exit 1
fi
# List of versions
versions=("18" "20" "22" "23" "24")
# Iterate over the versions and create scripts
for version in "${versions[@]}"; do
create_script "$version" "$version"
done
# Define LTS and current Node.js versions
lts_version="22"
current_version="24"
# Create setup_lts and setup_current scripts
create_script "$lts_version" "lts"
create_script "$current_version" "current"
+152
View File
@@ -0,0 +1,152 @@
#!/bin/bash
if test -t 1; then # if terminal
ncolors=$(which tput > /dev/null && tput colors) # supports color
if test -n "$ncolors" && test $ncolors -ge 8; then
termcols=$(tput cols)
bold="$(tput bold)"
underline="$(tput smul)"
standout="$(tput smso)"
normal="$(tput sgr0)"
black="$(tput setaf 0)"
red="$(tput setaf 1)"
green="$(tput setaf 2)"
yellow="$(tput setaf 3)"
blue="$(tput setaf 4)"
magenta="$(tput setaf 5)"
cyan="$(tput setaf 6)"
white="$(tput setaf 7)"
fi
fi
print_bold() {
title="$1"
text="$2"
echo
echo "${red}================================================================================${normal}"
echo "${red}================================================================================${normal}"
echo
echo -e " ${bold}${yellow}${title}${normal}"
echo
echo -en " ${text}"
echo
echo "${red}================================================================================${normal}"
echo "${red}================================================================================${normal}"
}
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Send deprecation Warning
node_deprecation_warning() {
print_bold \
" DEPRECATION WARNING " "\
${bold}${underline} Node.js 16.x is no longer actively supported!${normal}
${bold}You will not receive security or critical stability updates${normal} for this version.
You should migrate to a supported version of Node.js as soon as possible.
Use the installation script that corresponds to the version of Node.js you
wish to install. e.g.
* ${red}https://rpm.nodesource.com/setup_16.x — Node.js 16 \"Gallium\" ${bold}(deprecated)${normal}
* ${green}https://rpm.nodesource.com/setup_18.x — Node.js 18 \"Hydrogen\" (Maintenance)${normal}
* ${red}https://rpm.nodesource.com/setup_19.x — Node.js 19 \"Nineteen\" ${bold}(deprecated)${normal}
* ${bold}${green}https://rpm.nodesource.com/setup_20.x — Node.js 20 LTS \"Iron\" (recommended)${normal}
* ${green}https://rpm.nodesource.com/setup_21.x — Node.js 21 \"Iron\" (current)${normal}
Please see ${bold}https://github.com/nodejs/Release${normal} for details about which
version may be appropriate for you.
The ${green}${bold}NodeSource${normal} Node.js distributions repository contains
information both about supported versions of Node.js and supported Linux
distributions. To learn more about usage, see the repository:
${underline}${bold}https://github.com/nodesource/distributions${normal}
"
echo
echo "Continuing in 10 seconds ..."
echo
sleep 10
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
node_deprecation_warning
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="16.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/NODESOURCE-GPG-SIGNING-KEY-EL
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Check for availability of dnf or yum
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
log "Repository is configured and updated. Run 'dnf install nodejs -y' to complete the installation." "info"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
log "Repository is configured and updated. Run 'yum install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum nor dnf package manager was found. Please update your system using your package manager."
fi
+132
View File
@@ -0,0 +1,132 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="18.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Check if Node.js version is an LTS version
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
# Repository content for N|Solid
NSOLID_REPO_CONTENT="[nodesource-nsolid]
name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nsolid/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write N|Solid repository content
echo "$NSOLID_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nsolid.repo > /dev/null
log "Added N|Solid repository for LTS version: $NODE_VERSION" "info"
fi
# Check for availability of dnf, yum or microdnf
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
dnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: dnf install nsolid -y" "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'dnf install nodejs -y' to complete the installation." "info"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
yum makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "Run 'yum install nsolid -y' to complete the installation." "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'yum install nodejs -y' to complete the installation." "info"
elif command_exists microdnf; then
log "microdnf available, updating..." "info"
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated. Run 'microdnf install nsolid -y' to complete the installation." "info"
else
log "Repository is configured and updated." "info"
fi
log "Run 'microdnf install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum, dnf nor microdnf package manager was found. Please update your system using your package manager."
fi
+132
View File
@@ -0,0 +1,132 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="20.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Check if Node.js version is an LTS version
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
# Repository content for N|Solid
NSOLID_REPO_CONTENT="[nodesource-nsolid]
name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nsolid/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write N|Solid repository content
echo "$NSOLID_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nsolid.repo > /dev/null
log "Added N|Solid repository for LTS version: $NODE_VERSION" "info"
fi
# Check for availability of dnf, yum or microdnf
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
dnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: dnf install nsolid -y" "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'dnf install nodejs -y' to complete the installation." "info"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
yum makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "Run 'yum install nsolid -y' to complete the installation." "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'yum install nodejs -y' to complete the installation." "info"
elif command_exists microdnf; then
log "microdnf available, updating..." "info"
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated. Run 'microdnf install nsolid -y' to complete the installation." "info"
else
log "Repository is configured and updated." "info"
fi
log "Run 'microdnf install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum, dnf nor microdnf package manager was found. Please update your system using your package manager."
fi
+107
View File
@@ -0,0 +1,107 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="21.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Repository content for N|Solid
NSOLID_REPO_CONTENT="[nodesource-nsolid]
name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nsolid/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Check if Node.js version is an LTS version
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]]; then
# Write N|Solid repository content
echo "$NSOLID_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nsolid.repo > /dev/null
log "Added N|Solid repository for LTS version: $NODE_VERSION" "info"
fi
# Check for availability of dnf, yum or microdnf
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "Run 'dnf install nodejs -y' to complete the installation." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: dnf install nsolid -y\n" "success"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "Run 'yum install nodejs -y' to complete the installation." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "Run 'yum install nsolid -y' to complete the installation." "success"
elif command_exists microdnf; then
log "microdnf available, updating..." "info"
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated. Run 'microdnf install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum, dnf nor microdnf package manager was found. Please update your system using your package manager."
fi
+132
View File
@@ -0,0 +1,132 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="22.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Check if Node.js version is an LTS version
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
# Repository content for N|Solid
NSOLID_REPO_CONTENT="[nodesource-nsolid]
name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nsolid/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write N|Solid repository content
echo "$NSOLID_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nsolid.repo > /dev/null
log "Added N|Solid repository for LTS version: $NODE_VERSION" "info"
fi
# Check for availability of dnf, yum or microdnf
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
dnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: dnf install nsolid -y" "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'dnf install nodejs -y' to complete the installation." "info"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
yum makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "Run 'yum install nsolid -y' to complete the installation." "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'yum install nodejs -y' to complete the installation." "info"
elif command_exists microdnf; then
log "microdnf available, updating..." "info"
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated. Run 'microdnf install nsolid -y' to complete the installation." "info"
else
log "Repository is configured and updated." "info"
fi
log "Run 'microdnf install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum, dnf nor microdnf package manager was found. Please update your system using your package manager."
fi
+132
View File
@@ -0,0 +1,132 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="23.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Check if Node.js version is an LTS version
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
# Repository content for N|Solid
NSOLID_REPO_CONTENT="[nodesource-nsolid]
name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nsolid/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write N|Solid repository content
echo "$NSOLID_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nsolid.repo > /dev/null
log "Added N|Solid repository for LTS version: $NODE_VERSION" "info"
fi
# Check for availability of dnf, yum or microdnf
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
dnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: dnf install nsolid -y" "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'dnf install nodejs -y' to complete the installation." "info"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
yum makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "Run 'yum install nsolid -y' to complete the installation." "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'yum install nodejs -y' to complete the installation." "info"
elif command_exists microdnf; then
log "microdnf available, updating..." "info"
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated. Run 'microdnf install nsolid -y' to complete the installation." "info"
else
log "Repository is configured and updated." "info"
fi
log "Run 'microdnf install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum, dnf nor microdnf package manager was found. Please update your system using your package manager."
fi
+132
View File
@@ -0,0 +1,132 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="24.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Check if Node.js version is an LTS version
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
# Repository content for N|Solid
NSOLID_REPO_CONTENT="[nodesource-nsolid]
name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nsolid/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write N|Solid repository content
echo "$NSOLID_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nsolid.repo > /dev/null
log "Added N|Solid repository for LTS version: $NODE_VERSION" "info"
fi
# Check for availability of dnf, yum or microdnf
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
dnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: dnf install nsolid -y" "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'dnf install nodejs -y' to complete the installation." "info"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
yum makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "Run 'yum install nsolid -y' to complete the installation." "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'yum install nodejs -y' to complete the installation." "info"
elif command_exists microdnf; then
log "microdnf available, updating..." "info"
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated. Run 'microdnf install nsolid -y' to complete the installation." "info"
else
log "Repository is configured and updated." "info"
fi
log "Run 'microdnf install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum, dnf nor microdnf package manager was found. Please update your system using your package manager."
fi
+132
View File
@@ -0,0 +1,132 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="24.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Check if Node.js version is an LTS version
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
# Repository content for N|Solid
NSOLID_REPO_CONTENT="[nodesource-nsolid]
name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nsolid/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write N|Solid repository content
echo "$NSOLID_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nsolid.repo > /dev/null
log "Added N|Solid repository for LTS version: $NODE_VERSION" "info"
fi
# Check for availability of dnf, yum or microdnf
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
dnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: dnf install nsolid -y" "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'dnf install nodejs -y' to complete the installation." "info"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
yum makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "Run 'yum install nsolid -y' to complete the installation." "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'yum install nodejs -y' to complete the installation." "info"
elif command_exists microdnf; then
log "microdnf available, updating..." "info"
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated. Run 'microdnf install nsolid -y' to complete the installation." "info"
else
log "Repository is configured and updated." "info"
fi
log "Run 'microdnf install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum, dnf nor microdnf package manager was found. Please update your system using your package manager."
fi
+132
View File
@@ -0,0 +1,132 @@
#!/bin/bash
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
# Check if we are on an RPM-based system
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
fi
log "Cleaning up old repositories..." "info"
rm -f /etc/yum.repos.d/nodesource*.repo
log "Old repositories removed" "info"
# Define Node.js version
NODE_VERSION="22.x"
# Get system architecture
SYS_ARCH=$(uname -m)
# Validate system architecture
case "$SYS_ARCH" in
aarch64|x86_64) log "Supported architecture: $SYS_ARCH" "info" ;;
*) handle_error 1 "Unsupported architecture: $SYS_ARCH. Only aarch64 and x86_64 are supported." ;;
esac
# Repository content for Node.js
NODEJS_REPO_CONTENT="[nodesource-nodejs]
name=Node.js Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nodejs/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write Node.js repository content
echo "$NODEJS_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nodejs.repo > /dev/null
# Check if Node.js version is an LTS version
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
# Repository content for N|Solid
NSOLID_REPO_CONTENT="[nodesource-nsolid]
name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH
baseurl=https://rpm.nodesource.com/pub_${NODE_VERSION}/nodistro/nsolid/$SYS_ARCH
priority=9
enabled=1
gpgcheck=1
gpgkey=https://rpm.nodesource.com/gpgkey/ns-operations-public.key
module_hotfixes=1"
# Write N|Solid repository content
echo "$NSOLID_REPO_CONTENT" | tee /etc/yum.repos.d/nodesource-nsolid.repo > /dev/null
log "Added N|Solid repository for LTS version: $NODE_VERSION" "info"
fi
# Check for availability of dnf, yum or microdnf
if command_exists dnf; then
log "dnf available, updating..." "info"
dnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
dnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: dnf install nsolid -y" "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'dnf install nodejs -y' to complete the installation." "info"
exit 0
elif command_exists yum; then
log "yum available, updating..." "info"
yum makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
yum makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated." "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "Run 'yum install nsolid -y' to complete the installation." "success"
else
log "Repository is configured and updated." "info"
fi
log "Run 'yum install nodejs -y' to complete the installation." "info"
elif command_exists microdnf; then
log "microdnf available, updating..." "info"
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nodejs"
# Update N|Solid repository if it's LTS
if [[ "$NODE_VERSION" == "18.x" ]] || [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]]; then
microdnf makecache --disablerepo="*" --enablerepo="nodesource-nsolid"
log "Repository is configured and updated. Run 'microdnf install nsolid -y' to complete the installation." "info"
else
log "Repository is configured and updated." "info"
fi
log "Run 'microdnf install nodejs -y' to complete the installation." "info"
else
handle_error 1 "Neither yum, dnf nor microdnf package manager was found. Please update your system using your package manager."
fi