diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f03d784..74e5ef8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,8 +16,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [18, 20, 22, 23, 24] - os: ["ubuntu:24.04", "ubuntu:22.04", "debian:10"] + version: [ 18, 20, 22, 23, 24, 25 ] + os: [ "ubuntu:24.04", "ubuntu:22.04", "debian:10" ] container: image: ${{ matrix.os }} defaults: @@ -27,35 +27,97 @@ jobs: - name: Checkout Repo uses: actions/checkout@v4 - - name: Run Istallation Script + - name: Fix sources.list for Debian 10 + if: contains(matrix.os, 'debian:10') + run: | + echo "deb http://archive.debian.org/debian buster main" > /etc/apt/sources.list + apt-get -o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true update + + - name: Run Installation Script run: ./scripts/deb/setup_${{ matrix.version }}.x - name: Install Nodejs - run: | - apt-get install nodejs -y + run: apt 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 + 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 }})" + nsolid-deb: + name: "NSolid ${{ 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"] + version: [ 18, 20, 22, 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: Fix sources.list for Debian 10 + if: contains(matrix.os, 'debian:10') + run: | + echo "deb http://archive.debian.org/debian buster main" > /etc/apt/sources.list + apt-get -o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true update + + - name: Run Installation Script + run: ./scripts/deb/setup_${{ matrix.version }}.x + + - name: Install NSolid + run: apt install nsolid -y + + - name: Validate NSolid Version + run: | + nsolid -e "console.log(process.version)" + NSOLID_VERSION=$(nsolid -e "console.log(process.version.split('.')[0])") + + if [[ ${NSOLID_VERSION} != "v${{ matrix.version }}" ]]; then + echo "NSolid version is not ${{ matrix.version }}. It is $NSOLID_VERSION" + exit 1 + fi + + rpm: + name: "NodeJS ${{ matrix.version }}(${{ matrix.os }})" + runs-on: ubuntu-latest + strategy: + matrix: + version: [ 18, 20, 22, 23, 24, 25 ] + os: [ "fedora:36", "amazonlinux:2023", "rockylinux:9", "redhat/ubi9:latest" ] + container: + image: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - name: Patch Rocky repos (avoid broken mirror) + if: contains(matrix.os, 'rocky') + run: | + set -euxo pipefail + for f in /etc/yum.repos.d/Rocky-*.repo; do + [ -f "$f" ] || continue + sed -i 's|^baseurl=.*|# baseurl disabled by CI|' "$f" || true + if grep -q '^mirrorlist=' "$f"; then + sed -i 's|^mirrorlist=.*|mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=$repo&release=$releasever|g' "$f" || true + else + echo 'mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=$repo&release=$releasever' >> "$f" || true + fi + if ! grep -qi '^skip_if_unavailable=' "$f"; then + echo 'skip_if_unavailable=True' >> "$f" + fi + done + (dnf clean all || microdnf clean all || true) + (dnf -y makecache || microdnf -y makecache || true) - name: install git run: | dnf update -y @@ -80,19 +142,92 @@ jobs: exit 1 fi - rpm-minimal: - name: "NodeJS ${{ matrix.version }}(${{ matrix.os }})" + nsolid-rpm: + name: "NSolid ${{ matrix.version }}(${{ matrix.os }})" runs-on: ubuntu-latest strategy: matrix: - version: [18, 20, 22, 23, 24] - os: ["rockylinux:9-minimal", "redhat/ubi9-minimal:latest"] + version: [ 18, 20, 22, 24 ] + os: [ "fedora:36", "amazonlinux:2023", "rockylinux:9", "redhat/ubi9:latest" ] container: image: ${{ matrix.os }} defaults: run: shell: bash steps: + - name: Patch Rocky repos (avoid broken mirror) + if: contains(matrix.os, 'rocky') + run: | + set -euxo pipefail + for f in /etc/yum.repos.d/Rocky-*.repo; do + [ -f "$f" ] || continue + sed -i 's|^baseurl=.*|# baseurl disabled by CI|' "$f" || true + if grep -q '^mirrorlist=' "$f"; then + sed -i 's|^mirrorlist=.*|mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=$repo&release=$releasever|g' "$f" || true + else + echo 'mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=$repo&release=$releasever' >> "$f" || true + fi + if ! grep -qi '^skip_if_unavailable=' "$f"; then + echo 'skip_if_unavailable=True' >> "$f" + fi + done + (dnf clean all || microdnf clean all || true) + (dnf -y makecache || microdnf -y makecache || true) + - name: install git + run: | + dnf update -y + dnf install git -y + + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Run Installation Script + run: ./scripts/rpm/setup_${{ matrix.version }}.x + + - name: Install NSolid + run: | + dnf install nsolid -y + + - name: Validate NSolid Version + run: | + nsolid -e "console.log(process.version)" + NSOLID_VERSION=$(nsolid -e "console.log((process.version).split('.')[0])") + if [[ ${NSOLID_VERSION} != "v${{ matrix.version }}" ]]; then + echo "NSolid version is not ${{ matrix.version }}. It is $NSOLID_VERSION" + exit 1 + fi + + rpm-minimal: + name: "NodeJS ${{ matrix.version }}(${{ matrix.os }})" + runs-on: ubuntu-latest + strategy: + matrix: + version: [ 18, 20, 22, 23, 24, 25] + os: [ "rockylinux:9-minimal", "redhat/ubi9-minimal:latest" ] + container: + image: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - name: Patch Rocky repos (avoid broken mirror) + if: contains(matrix.os, 'rocky') + run: | + set -euxo pipefail + for f in /etc/yum.repos.d/Rocky-*.repo; do + [ -f "$f" ] || continue + sed -i 's|^baseurl=.*|# baseurl disabled by CI|' "$f" || true + if grep -q '^mirrorlist=' "$f"; then + sed -i 's|^mirrorlist=.*|mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=$repo&release=$releasever|g' "$f" || true + else + echo 'mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=$repo&release=$releasever' >> "$f" || true + fi + if ! grep -qi '^skip_if_unavailable=' "$f"; then + echo 'skip_if_unavailable=True' >> "$f" + fi + done + (dnf clean all || microdnf clean all || true) + (dnf -y makecache || microdnf -y makecache || true) - name: install git run: | microdnf update -y @@ -116,3 +251,58 @@ jobs: echo "Node version is not ${{ matrix.version }}. It is $NODE_VERSION" exit 1 fi + + nsolid-rpm-minimal: + name: "NSolid ${{ matrix.version }}(${{ matrix.os }})" + runs-on: ubuntu-latest + strategy: + matrix: + version: [ 18, 20, 22, 24 ] + os: [ "rockylinux:9-minimal", "redhat/ubi9-minimal:latest" ] + container: + image: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - name: Patch Rocky repos (avoid broken mirror) + if: contains(matrix.os, 'rocky') + run: | + set -euxo pipefail + for f in /etc/yum.repos.d/Rocky-*.repo; do + [ -f "$f" ] || continue + sed -i 's|^baseurl=.*|# baseurl disabled by CI|' "$f" || true + if grep -q '^mirrorlist=' "$f"; then + sed -i 's|^mirrorlist=.*|mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=$repo&release=$releasever|g' "$f" || true + else + echo 'mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=$repo&release=$releasever' >> "$f" || true + fi + if ! grep -qi '^skip_if_unavailable=' "$f"; then + echo 'skip_if_unavailable=True' >> "$f" + fi + done + (dnf clean all || microdnf clean all || true) + (dnf -y makecache || microdnf -y makecache || true) + - name: install git + run: | + microdnf update -y + microdnf install git -y + + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Run Installation Script + run: ./scripts/rpm/setup_${{ matrix.version }}.x + + - name: Install NSolid + run: | + microdnf install nsolid -y + + - name: Validate NSolid Version + run: | + nsolid -e "console.log(process.version)" + NSOLID_VERSION=$(nsolid -e "console.log((process.version).split('.')[0])") + if [[ ${NSOLID_VERSION} != "v${{ matrix.version }}" ]]; then + echo "NSolid version is not ${{ matrix.version }}. It is $NSOLID_VERSION" + exit 1 + fi diff --git a/.github/workflows/deprecated.yaml b/.github/workflows/deprecated.yaml index 0fb25ab..b86b0a8 100644 --- a/.github/workflows/deprecated.yaml +++ b/.github/workflows/deprecated.yaml @@ -16,8 +16,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [16] - os: ["ubuntu:20.04", "debian:10"] + version: [ 16 ] + os: [ "ubuntu:20.04", "debian:10" ] container: image: ${{ matrix.os }} defaults: @@ -27,29 +27,34 @@ jobs: - name: Checkout Repo uses: actions/checkout@v4 - - name: Run Istallation Script + - name: Fix sources.list for Debian 10 + if: contains(matrix.os, 'debian:10') + run: | + echo "deb http://archive.debian.org/debian buster main" > /etc/apt/sources.list + apt-get -o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true update + + - name: Run Installation Script run: ./scripts/deb/setup_${{ matrix.version }}.x - name: Install Nodejs run: | - apt-get install nodejs -y + apt install nodejs -y - name: Validate Node Version run: | node -e "console.log(process.version)" - NODE_VERSION=$(node -e "console.log((process.version).split('.')[0])") + 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"] + version: [ 16 ] + os: [ "fedora:29", "amazonlinux:2023" ] container: image: ${{ matrix.os }} defaults: diff --git a/DEV_README.md b/DEV_README.md new file mode 100644 index 0000000..021f1af --- /dev/null +++ b/DEV_README.md @@ -0,0 +1,1365 @@ +# [NodeSource](https://nodesource.com) N|Solid & 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) + +[![Github Actions Test](https://github.com/nodesource/distributions/actions/workflows/ci.yaml/badge.svg)](https://github.com/nodesource/distributions/actions/workflows/ci.yaml) + +This repository contains the instructions to install the **[NodeSource N|solid](https://nodesource.com/products/runtime)** and **[Node.js](http://nodejs.org)** Binary Distributions via .rpm and .deb as well as their setup and support scripts. + +If you're looking for more information on NodeSource's low-impact Node.js performance monitoring platform, **[Learn more here](https://nodesource.com/products/nsolid).** + +## **New Update ⚠️** + +We'd like to inform you of important changes to our distribution repository [nodesource/distributions](https://github.com/nodesource/distributions). + +**What's New:** + +- _**Package Changes:** DEB and RPM packages are now available under the `nodistro` codename. We no longer package the installer coupled to specific versions. This means you can install Node.js on almost any distro that meets the minimum requirements._ +- **Installation Scripts:** Back by popular demand, the installation scripts have returned and are better than ever. See the installation instructions below for details on how to use them. +- **RPM Package Signing Key:** The key used to sign RPM packages has changed. We now sign packages using SHA256, providing better support to the community. +- **Questions and concerns:** To resolve questions and discuss concerns about this update we've opened this discussion space [New distribution's packages](https://github.com/nodesource/distributions/discussions/#123456) + +Looking for the previous Documentation [README.md](./OLD_README.md) + +## Table of Contents + +- **[Debian and Ubuntu based distributions](#debian-and-ubuntu-based-distributions)** (deb) + - [Available architectures](#deb-available-architectures) + - [Supported Versions](#deb-supported-versions) + - [Ubuntu versions](#ubuntu-versions) + - [Debian versions](#debian-versions) + - [Installation instructions](#installation-instructions) + - [Uninstall instructions](#uninstall-nodejs-ubuntu--debian-packages) +- **[Enterprise Linux based distributions](#enterprise-linux-based-distributions)** (rpm) + - [Available architectures](#rpm-available-architectures) + - [Supported Versions](#rpm-supported-versions) + - [Fedora versions](#fedora-versions) + - [Redhat versions](#redhat-versions) + - [Amazon Linux versions](#amazon-linux-versions) + - [Uninstall instructions](#uninstall-nodejs-enterprise-linux-packages) +- **[Nodejs Release Calendar](#nodejs-release-calendar)** +- [FAQ](#faq) +- [Authors and Contributors](#authors-and-contributors) +- [License](#license) + +## Debian and Ubuntu based distributions + +### DEB 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_) + +### DEB Supported Versions + +#### **Ubuntu versions** + +| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | Node 23x | Node 24x | +| :------------------- | :------: | :------: | :------: | :------: | :------: | :------: | +| Ubuntu Bionic ^18.04 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| Ubuntu Focal ^20.04 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| Ubuntu Jammy ^22.04 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| Ubuntu Noble ^24.04 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | + +#### **Debian versions** + +| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | Node 23x | Node 24x | +| :----------------- | :------: | :------: | :------: | :------: | :------: | :------: | +| Debian 8 Jessie | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| Debian 9 Stretch | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| Debian 10 Buster | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| Debian 11 Bullseye | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| Debian 12 Bookworm | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | + +> [!NOTE] +> If you are looking to run Node.js in a non-supported Linux version [contact NodeSource](https://nodesource.com/pages/contact-us.html) to get enterprise support for your specific needs. + +### Installation Instructions (DEB) + +**Node.js 23.x**: + +##### Using Ubuntu (Node.js 23) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + sudo -E bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + sudo apt install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + +##### Using Debian, as root (Node.js 23) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + apt install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + + +**Node.js v22.x**: + +##### Using Ubuntu (Node.js 22) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + sudo -E bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + sudo apt install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + sudo apt install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +##### Using Debian, as root (Node.js 22) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + apt install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + apt install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +**Node.js v20.x**: + +##### Using Ubuntu (Node.js 20) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + sudo -E bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + sudo apt install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + sudo apt install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +##### Using Debian, as root (Node.js 20) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + apt install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + apt install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +**Node.js v18.x**: + +##### Using Ubuntu (Node.js 18) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + sudo -E bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + sudo apt install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + sudo apt install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +##### Using Debian, as root (Node.js 18) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + apt install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + apt install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +**Node.js LTS (v22.x)**: + +##### Using Ubuntu (Node.js LTS) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_lts.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + sudo -E bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + sudo apt install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + sudo apt install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +##### Using Debian, as root (N|Solid or Node.js LTS) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_lts.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + apt install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + apt install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +**Node.js Current (24)**: + +##### Using Ubuntu (Node.js Current) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_current.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + sudo -E bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + sudo apt install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + +##### Using Debian, as root (Node.js Current) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +apt install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://deb.nodesource.com/setup_current.x -o nodesource_setup.sh + ``` + +2. **Run the setup script with sudo:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + apt install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + + +### Uninstall `nsolid` or `nodejs` Ubuntu & Debian packages + +To completely remove Node.js or N|solid installed from the deb.nodesource.com package methods above: + +#### use `sudo` on Ubuntu or run this as root on debian +
+ N|Solid + +```sh +apt purge nsolid &&\ +rm -r /etc/apt/sources.list.d/nodesource.list &&\ +rm -r /etc/apt/keyrings/nodesource.gpg +``` + +
+ +
+Node.js + +```sh +apt purge nodejs &&\ +rm -r /etc/apt/sources.list.d/nodesource.list &&\ +rm -r /etc/apt/keyrings/nodesource.gpg +``` + +
+ + +## Enterprise Linux Based Distributions + +### RPM 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_) + +### RPM Supported Versions + +#### **Fedora versions** + +| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | Node 23x | +| :-------------------- | :------: | :------: | :------: | :------: | :------: | +| Fedora >= 20 (20->28) | ❌ | ❌ | ❌ | ❌ | ❌ | +| Fedora >= 29 | ✅ | ✅ | ✅ | ✅ | ✅ | +| Fedora >= 36 | ✅ | ✅ | ✅ | ✅ | ✅ | + +#### **Redhat versions** + +| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | Node 23x | +|:-----------------| :------: | :------: | :------: | :------: | :------: | +| Redhat 7 | ❌ | ❌ | ❌ | ❌ | ❌ | +| Redhat 8 | ✅ | ✅ | ✅ | ✅ | ✅ | +| Redhat 9 | ✅ | ✅ | ✅ | ✅ | ✅ | +| Redhat 9-minimal | ✅ | ✅ | ✅ | ✅ | ✅ | + +#### **Amazon Linux versions** + +| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | +| :---------------- | :------: | :------: | :------: | :------: | +| Amazon Linux 2 | ❌ | ❌ | ❌ | ❌ | +| Amazon Linux 2023 | ✅ | ✅ | ✅ | ✅ | + +> [!NOTE] +> If you are looking to run Node.js in a non-supported Linux version [contact NodeSource](https://nodesource.com/pages/contact-us.html) to get enterprise support for your specific needs. + +### RPM Installation Instructions + +### Installation Instructions (RPM) + +**Node.js v23.x** + +##### Using RPM-based Systems (Node.js 23) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_23.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + sudo bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + sudo yum install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + +##### No root privileges (Node.js 23) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_23.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + yum install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + +**Node.js v22.x** + +##### Using RPM-based Systems (Node.js 22) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_22.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + sudo bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + sudo yum install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + +##### No root privileges (Node.js 22) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_22.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + yum install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + +**Node.js v20.x** + +##### As root (Node.js 20) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_20.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + yum install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + yum install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +##### No root privileges (Node.js 20) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_20.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + sudo yum install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + sudo yum install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +**Node.js v18.x** + +##### As root (Node.js 18) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_18.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + sudo yum install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + sudo yum install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +##### No root privileges (Node.js 18) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_18.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + sudo bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + sudo yum install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + sudo yum install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +**N|Solid or Node.js LTS (22.x)** + +##### As root (N|Solid or Node.js LTS) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_lts.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + yum install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + yum install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +##### No root privileges (N|Solid or Node.js LTS) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_lts.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + sudo bash nodesource_setup.sh + ``` + +3. **Install N|Solid or Node.js:** +
+ N|Solid + + **Install N|Solid:** + + ```sh + sudo yum install -y nsolid + ``` + + **Verify the installation:** + + ```sh + nsolid -v + ``` +
+
+ Node.js + + **Install Node.js:** + + ```sh + sudo yum install -y nodejs + ``` + + **Verify the installation:** + + ```sh + node -v + ``` +
+ +**Node.js Current (24.x)** + +##### As root (Node.js Current) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_current.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + yum install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + +##### No root privileges (Node.js Current) + +Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: + +```sh +sudo yum install -y curl +``` + +1. **Download the setup script:** + + ```sh + curl -fsSL https://rpm.nodesource.com/setup_current.x -o nodesource_setup.sh + ``` + +2. **Run the setup script as root:** + + ```sh + sudo bash nodesource_setup.sh + ``` + +3. **Install Node.js:** + + ```sh + sudo yum install -y nodejs + ``` + +4. **Verify the installation:** + + ```sh + node -v + ``` + +_**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' +``` + +### Uninstall `nsolid` or `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 +
+ N|Solid + +```sh +yum remove nsolid &&\ +rm -r /etc/yum.repos.d/nodesource*.repo &&\ +yum clean all +``` + +
+ +
+Node.js + +```sh +yum remove nodejs &&\ +rm -r /etc/yum.repos.d/nodesource*.repo &&\ +yum clean all +``` +
+ + + +## Nodejs Release Calendar + +[![Node Releases Calendar](https://raw.githubusercontent.com/nodejs/Release/main/schedule.svg?sanitize=true)](https://nodejs.dev/en/about/releases) +_source: _ + +## FAQ + +Q: Are the scripts deprecated? + +A: The scripts are deprecated for the versions of Node.js that are currently outdated. While the packages for these versions still exist, we no longer provide support for them. Our support is exclusively dedicated to the active Node.js versions, which, as of today, are 18, 20, and 21. Users utilizing these versions can confidently use our scripts, but we encourage those using older versions to upgrade for continued support and the best experience. + +--- + +Q: How can I configure the repository manually? + +A: If you prefer to manually configure the repository, we have a detailed guide to assist you through the process. Please visit our [Repository Manual Installation Guide](https://github.com/nodesource/distributions/wiki/Repository-Manual-Installation) for comprehensive instructions. This guide is designed to provide step-by-step directions to ensure a smooth and successful manual setup of the repository for your Node.js environment. + +--- + +Q: How do I pin to specific versions of Node.js? + +A: Please take a look at [wiki](https://github.com/nodesource/distributions/wiki/How-to-select-the-Node.js-version-to-install) + +--- + +--- + +Q: Why is there no folder listing available when I visit the following URLs? + + + + +A: This issue may arise because some users utilize the above URLs to download specific versions of Node.js or create mirrors of our repository. + +For more information and possible solutions, please refer to the following resources: + +- [Github issue](https://github.com/nodesource/distributions/issues/1633) +- [Creating a Repository Mirror](https://github.com/nodesource/distributions/wiki/Creating-a-Repository-Mirror:-A-Step%E2%80%90by%E2%80%90Step-Guide) + +--- + +## Authors and Contributors + +### Current Members + + + + + + + +
Adrian EstradaGitHub/edsadrTwitter/@edsadr
Jesus PazGitHub/JesusPaz
Jefferson RiosGitHub/riosje
+ +### Past Members + + + + + + + + + + + + + + + + + + + + + + + + + +
Chris LeaGitHub/chrisleaTwitter/@chrislea
Rod VaggGitHub/rvaggTwitter/@rvagg
William BlankenshipGitHub/retrohackerTwitter/@retrohack3r
Harry TruongGitHub/harrytruong
Matteo BrunatiGitHub/mattbrun
Brian WhiteGitHub/mscdex
Matt LewandowskyGitHub/lewellyn
Jan-Hendrik PetersGitHub/hennr
Andris ReinmanGitHub/andris9
CarvilsiGitHub/carvilsi
Krasimir TrenchevGitHub/Ava7
Phil HelmGitHub/phelma
0xmohitGitHub/0xmohit
jdarlingGitHub/jdarling
Prayag VermaGitHub/pra85
Misha BrukmanGitHub/mbrukman
Simon LydellGitHub/lydell
Sebastian BleiGitHub/iamsebastian
Jorge Maldonado VenturaNotABug/jorgesumle
Mayank MethaGitHub/mayankmethaTwitter/@mayankmethad
Iván IguaránGitHub/igsu
+ +Contributions are welcomed from anyone wanting to improve this project! + +## 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._ + +_Ubuntu is a registered trademark of Canonical Ltd._ + +_Debian is a registered trademark owned by Software in the Public Interest, Inc._ + +_Red Hat, CentOS and Fedora are trademarks of Red Hat, Inc._ + +_Amazon Linux is a trademark of Amazon Web Services, Inc._ + +_CloudLinux is a trademark of CloudLinux, Inc_ diff --git a/OLDER_DISTROS.md b/OLDER_DISTROS.md index e2c9429..2b85f5c 100644 --- a/OLDER_DISTROS.md +++ b/OLDER_DISTROS.md @@ -19,18 +19,18 @@ The relevant bits of our build scripts to install the needed compilers looks lik if [ "x${DIST}" == "xprecise" ]; then echo "Calling $0" - apt-get update - apt-get install -y clang-3.4 + apt update + apt 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 + apt update + apt -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 + apt update + apt install -y clang-3.4 fi ``` diff --git a/OLD_README.md b/OLD_README.md index 51faed1..28bd39a 100644 --- a/OLD_README.md +++ b/OLD_README.md @@ -163,14 +163,14 @@ NodeSource will maintain support for stable, testing and unstable releases of De ```sh curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&\ -sudo apt-get install -y nodejs +sudo apt install -y nodejs ``` ##### Using Debian, as root ```sh curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&\ -apt-get install -y nodejs +apt install -y nodejs ``` **Node.js v19.x**: @@ -179,14 +179,14 @@ apt-get install -y nodejs ```sh curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\ -sudo apt-get install -y nodejs +sudo apt install -y nodejs ``` ##### Using Debian, as root ```sh curl -fsSL https://deb.nodesource.com/setup_19.x | bash - &&\ -apt-get install -y nodejs +apt install -y nodejs ``` **Node.js v18.x**: @@ -195,14 +195,14 @@ apt-get install -y nodejs ```sh curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\ -sudo apt-get install -y nodejs +sudo apt install -y nodejs ``` ##### Using Debian, as root ```sh curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &&\ -apt-get install -y nodejs +apt install -y nodejs ``` **Node.js v16.x**: @@ -211,14 +211,14 @@ apt-get install -y nodejs ```sh curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - &&\ -sudo apt-get install -y nodejs +sudo apt install -y nodejs ``` ##### Using Debian, as root ```sh curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\ -apt-get install -y nodejs +apt install -y nodejs ``` **Node.js LTS (v18.x)**: @@ -227,14 +227,14 @@ apt-get install -y nodejs ```sh curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - &&\ -sudo apt-get install -y nodejs +sudo apt install -y nodejs ``` ##### Using Debian, as root ```sh curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - &&\ -apt-get install -y nodejs +apt install -y nodejs ``` **Node.js Current (v20.x)**: @@ -243,14 +243,14 @@ apt-get install -y nodejs ```sh curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - &&\ -sudo apt-get install -y nodejs +sudo apt install -y nodejs ``` ##### Using Debian, as root ```sh curl -fsSL https://deb.nodesource.com/setup_current.x | bash - &&\ -apt-get install -y nodejs +apt install -y nodejs ``` ***Optional***: install build tools @@ -260,7 +260,7 @@ To compile and install native addons from npm you may also need to install build ##### use `sudo` on Ubuntu or run this as root on debian ```sh -apt-get install -y build-essential +apt install -y build-essential ``` `` @@ -272,7 +272,7 @@ To completely remove Node.js installed from the deb.nodesource.com package metho ##### use `sudo` on Ubuntu or run this as root on debian ```sh -apt-get purge nodejs &&\ +apt purge nodejs &&\ rm -r /etc/apt/sources.list.d/nodesource.list ``` @@ -290,7 +290,7 @@ 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 apt 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 @@ -329,8 +329,8 @@ echo "deb-src [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO m **4. Update package lists and install Node.js** ```sh -sudo apt-get update -sudo apt-get install nodejs +sudo apt update +sudo apt install nodejs ``` `` diff --git a/README.md b/README.md index 5fc0ed9..f13b78b 100644 --- a/README.md +++ b/README.md @@ -1,1365 +1,3 @@ -# [NodeSource](https://nodesource.com) N|Solid & Node.js Binary Distributions +[![NodeSource Distributions banner](https://github.com/user-attachments/assets/9c9a9712-2d70-4b96-b59f-a5aeca4b97e5)](https://nodesource.com/products/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) - -[![Github Actions Test](https://github.com/nodesource/distributions/actions/workflows/ci.yaml/badge.svg)](https://github.com/nodesource/distributions/actions/workflows/ci.yaml) - -This repository contains the instructions to install the **[NodeSource N|solid](https://nodesource.com/products/runtime)** and **[Node.js](http://nodejs.org)** Binary Distributions via .rpm and .deb as well as their setup and support scripts. - -If you're looking for more information on NodeSource's low-impact Node.js performance monitoring platform, **[Learn more here](https://nodesource.com/products/nsolid).** - -## **New Update ⚠️** - -We'd like to inform you of important changes to our distribution repository [nodesource/distributions](https://github.com/nodesource/distributions). - -**What's New:** - -- _**Package Changes:** DEB and RPM packages are now available under the `nodistro` codename. We no longer package the installer coupled to specific versions. This means you can install Node.js on almost any distro that meets the minimum requirements._ -- **Installation Scripts:** Back by popular demand, the installation scripts have returned and are better than ever. See the installation instructions below for details on how to use them. -- **RPM Package Signing Key:** The key used to sign RPM packages has changed. We now sign packages using SHA256, providing better support to the community. -- **Questions and concerns:** To resolve questions and discuss concerns about this update we've opened this discussion space [New distribution's packages](https://github.com/nodesource/distributions/discussions/#123456) - -Looking for the previous Documentation [README.md](./OLD_README.md) - -## Table of Contents - -- **[Debian and Ubuntu based distributions](#debian-and-ubuntu-based-distributions)** (deb) - - [Available architectures](#deb-available-architectures) - - [Supported Versions](#deb-supported-versions) - - [Ubuntu versions](#ubuntu-versions) - - [Debian versions](#debian-versions) - - [Installation instructions](#installation-instructions) - - [Uninstall instructions](#uninstall-nodejs-ubuntu--debian-packages) -- **[Enterprise Linux based distributions](#enterprise-linux-based-distributions)** (rpm) - - [Available architectures](#rpm-available-architectures) - - [Supported Versions](#rpm-supported-versions) - - [Fedora versions](#fedora-versions) - - [Redhat versions](#redhat-versions) - - [Amazon Linux versions](#amazon-linux-versions) - - [Uninstall instructions](#uninstall-nodejs-enterprise-linux-packages) -- **[Nodejs Release Calendar](#nodejs-release-calendar)** -- [FAQ](#faq) -- [Authors and Contributors](#authors-and-contributors) -- [License](#license) - -## Debian and Ubuntu based distributions - -### DEB 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_) - -### DEB Supported Versions - -#### **Ubuntu versions** - -| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | Node 23x | Node 24x | -| :------------------- | :------: | :------: | :------: | :------: | :------: | :------: | -| Ubuntu Bionic ^18.04 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| Ubuntu Focal ^20.04 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| Ubuntu Jammy ^22.04 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| Ubuntu Noble ^24.04 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - -#### **Debian versions** - -| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | Node 23x | Node 24x | -| :----------------- | :------: | :------: | :------: | :------: | :------: | :------: | -| Debian 8 Jessie | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| Debian 9 Stretch | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| Debian 10 Buster | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| Debian 11 Bullseye | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| Debian 12 Bookworm | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - -> [!NOTE] -> If you are looking to run Node.js in a non-supported Linux version [contact NodeSource](https://nodesource.com/pages/contact-us.html) to get enterprise support for your specific needs. - -### Installation Instructions (DEB) - -**Node.js 23.x**: - -##### Using Ubuntu (Node.js 23) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - sudo -E bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - sudo apt-get install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - -##### Using Debian, as root (Node.js 23) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - apt-get install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - - -**Node.js v22.x**: - -##### Using Ubuntu (Node.js 22) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - sudo -E bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - sudo apt-get install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - sudo apt-get install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -##### Using Debian, as root (Node.js 22) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - apt-get install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - apt-get install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -**Node.js v20.x**: - -##### Using Ubuntu (Node.js 20) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - sudo -E bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - sudo apt-get install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - sudo apt-get install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -##### Using Debian, as root (Node.js 20) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - apt-get install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - apt-get install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -**Node.js v18.x**: - -##### Using Ubuntu (Node.js 18) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - sudo -E bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - sudo apt-get install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - sudo apt-get install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -##### Using Debian, as root (Node.js 18) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - apt-get install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - apt-get install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -**Node.js LTS (v22.x)**: - -##### Using Ubuntu (Node.js LTS) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_lts.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - sudo -E bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - sudo apt-get install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - sudo apt-get install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -##### Using Debian, as root (N|Solid or Node.js LTS) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_lts.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - apt-get install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - apt-get install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -**Node.js Current (24)**: - -##### Using Ubuntu (Node.js Current) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_current.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - sudo -E bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - sudo apt-get install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - -##### Using Debian, as root (Node.js Current) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -apt-get install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://deb.nodesource.com/setup_current.x -o nodesource_setup.sh - ``` - -2. **Run the setup script with sudo:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - apt-get install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - - -### Uninstall `nsolid` or `nodejs` Ubuntu & Debian packages - -To completely remove Node.js or N|solid installed from the deb.nodesource.com package methods above: - -#### use `sudo` on Ubuntu or run this as root on debian -
- N|Solid - -```sh -apt-get purge nsolid &&\ -rm -r /etc/apt/sources.list.d/nodesource.list &&\ -rm -r /etc/apt/keyrings/nodesource.gpg -``` - -
- -
-Node.js - -```sh -apt-get purge nodejs &&\ -rm -r /etc/apt/sources.list.d/nodesource.list &&\ -rm -r /etc/apt/keyrings/nodesource.gpg -``` - -
- - -## Enterprise Linux Based Distributions - -### RPM 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_) - -### RPM Supported Versions - -#### **Fedora versions** - -| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | Node 23x | -| :-------------------- | :------: | :------: | :------: | :------: | :------: | -| Fedora >= 20 (20->28) | ❌ | ❌ | ❌ | ❌ | ❌ | -| Fedora >= 29 | ✅ | ✅ | ✅ | ✅ | ✅ | -| Fedora >= 36 | ✅ | ✅ | ✅ | ✅ | ✅ | - -#### **Redhat versions** - -| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | Node 23x | -|:-----------------| :------: | :------: | :------: | :------: | :------: | -| Redhat 7 | ❌ | ❌ | ❌ | ❌ | ❌ | -| Redhat 8 | ✅ | ✅ | ✅ | ✅ | ✅ | -| Redhat 9 | ✅ | ✅ | ✅ | ✅ | ✅ | -| Redhat 9-minimal | ✅ | ✅ | ✅ | ✅ | ✅ | - -#### **Amazon Linux versions** - -| Distro Name | Node 18x | Node 20x | Node 21x | Node 22x | -| :---------------- | :------: | :------: | :------: | :------: | -| Amazon Linux 2 | ❌ | ❌ | ❌ | ❌ | -| Amazon Linux 2023 | ✅ | ✅ | ✅ | ✅ | - -> [!NOTE] -> If you are looking to run Node.js in a non-supported Linux version [contact NodeSource](https://nodesource.com/pages/contact-us.html) to get enterprise support for your specific needs. - -### RPM Installation Instructions - -### Installation Instructions (RPM) - -**Node.js v23.x** - -##### Using RPM-based Systems (Node.js 23) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_23.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - sudo bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - sudo yum install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - -##### No root privileges (Node.js 23) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_23.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - yum install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - -**Node.js v22.x** - -##### Using RPM-based Systems (Node.js 22) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_22.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - sudo bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - sudo yum install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - -##### No root privileges (Node.js 22) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_22.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - yum install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - -**Node.js v20.x** - -##### As root (Node.js 20) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_20.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - yum install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - yum install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -##### No root privileges (Node.js 20) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_20.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - sudo yum install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - sudo yum install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -**Node.js v18.x** - -##### As root (Node.js 18) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_18.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - sudo yum install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - sudo yum install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -##### No root privileges (Node.js 18) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_18.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - sudo bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - sudo yum install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - sudo yum install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -**N|Solid or Node.js LTS (22.x)** - -##### As root (N|Solid or Node.js LTS) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_lts.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - yum install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - yum install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -##### No root privileges (N|Solid or Node.js LTS) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_lts.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - sudo bash nodesource_setup.sh - ``` - -3. **Install N|Solid or Node.js:** -
- N|Solid - - **Install N|Solid:** - - ```sh - sudo yum install -y nsolid - ``` - - **Verify the installation:** - - ```sh - nsolid -v - ``` -
-
- Node.js - - **Install Node.js:** - - ```sh - sudo yum install -y nodejs - ``` - - **Verify the installation:** - - ```sh - node -v - ``` -
- -**Node.js Current (24.x)** - -##### As root (Node.js Current) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_current.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - yum install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - -##### No root privileges (Node.js Current) - -Before you begin, ensure that `curl` is installed on your system. If `curl` is not installed, you can install it using the following command: - -```sh -sudo yum install -y curl -``` - -1. **Download the setup script:** - - ```sh - curl -fsSL https://rpm.nodesource.com/setup_current.x -o nodesource_setup.sh - ``` - -2. **Run the setup script as root:** - - ```sh - sudo bash nodesource_setup.sh - ``` - -3. **Install Node.js:** - - ```sh - sudo yum install -y nodejs - ``` - -4. **Verify the installation:** - - ```sh - node -v - ``` - -_**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' -``` - -### Uninstall `nsolid` or `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 -
- N|Solid - -```sh -yum remove nsolid &&\ -rm -r /etc/yum.repos.d/nodesource*.repo &&\ -yum clean all -``` - -
- -
-Node.js - -```sh -yum remove nodejs &&\ -rm -r /etc/yum.repos.d/nodesource*.repo &&\ -yum clean all -``` -
- - - -## Nodejs Release Calendar - -[![Node Releases Calendar](https://raw.githubusercontent.com/nodejs/Release/main/schedule.svg?sanitize=true)](https://nodejs.dev/en/about/releases) -_source: _ - -## FAQ - -Q: Are the scripts deprecated? - -A: The scripts are deprecated for the versions of Node.js that are currently outdated. While the packages for these versions still exist, we no longer provide support for them. Our support is exclusively dedicated to the active Node.js versions, which, as of today, are 18, 20, and 21. Users utilizing these versions can confidently use our scripts, but we encourage those using older versions to upgrade for continued support and the best experience. - ---- - -Q: How can I configure the repository manually? - -A: If you prefer to manually configure the repository, we have a detailed guide to assist you through the process. Please visit our [Repository Manual Installation Guide](https://github.com/nodesource/distributions/wiki/Repository-Manual-Installation) for comprehensive instructions. This guide is designed to provide step-by-step directions to ensure a smooth and successful manual setup of the repository for your Node.js environment. - ---- - -Q: How do I pin to specific versions of Node.js? - -A: Please take a look at [wiki](https://github.com/nodesource/distributions/wiki/How-to-select-the-Node.js-version-to-install) - ---- - ---- - -Q: Why is there no folder listing available when I visit the following URLs? - - - - -A: This issue may arise because some users utilize the above URLs to download specific versions of Node.js or create mirrors of our repository. - -For more information and possible solutions, please refer to the following resources: - -- [Github issue](https://github.com/nodesource/distributions/issues/1633) -- [Creating a Repository Mirror](https://github.com/nodesource/distributions/wiki/Creating-a-Repository-Mirror:-A-Step%E2%80%90by%E2%80%90Step-Guide) - ---- - -## Authors and Contributors - -### Current Members - - - - - - - -
Adrian EstradaGitHub/edsadrTwitter/@edsadr
Jesus PazGitHub/JesusPaz
Jefferson RiosGitHub/riosje
- -### Past Members - - - - - - - - - - - - - - - - - - - - - - - - - -
Chris LeaGitHub/chrisleaTwitter/@chrislea
Rod VaggGitHub/rvaggTwitter/@rvagg
William BlankenshipGitHub/retrohackerTwitter/@retrohack3r
Harry TruongGitHub/harrytruong
Matteo BrunatiGitHub/mattbrun
Brian WhiteGitHub/mscdex
Matt LewandowskyGitHub/lewellyn
Jan-Hendrik PetersGitHub/hennr
Andris ReinmanGitHub/andris9
CarvilsiGitHub/carvilsi
Krasimir TrenchevGitHub/Ava7
Phil HelmGitHub/phelma
0xmohitGitHub/0xmohit
jdarlingGitHub/jdarling
Prayag VermaGitHub/pra85
Misha BrukmanGitHub/mbrukman
Simon LydellGitHub/lydell
Sebastian BleiGitHub/iamsebastian
Jorge Maldonado VenturaNotABug/jorgesumle
Mayank MethaGitHub/mayankmethaTwitter/@mayankmethad
Iván IguaránGitHub/igsu
- -Contributions are welcomed from anyone wanting to improve this project! - -## 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._ - -_Ubuntu is a registered trademark of Canonical Ltd._ - -_Debian is a registered trademark owned by Software in the Public Interest, Inc._ - -_Red Hat, CentOS and Fedora are trademarks of Red Hat, Inc._ - -_Amazon Linux is a trademark of Amazon Web Services, Inc._ - -_CloudLinux is a trademark of CloudLinux, Inc_ +See the old documentation in the ➡️ [DEV_README.md](./DEV_README.md) \ No newline at end of file diff --git a/images/ns-linux-distributions.svg b/images/ns-linux-distributions.svg index 225c6b2..d14b408 100644 --- a/images/ns-linux-distributions.svg +++ b/images/ns-linux-distributions.svg @@ -1,7 +1,8 @@ - + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - - - - - + + + + + - - - - - - - + - - - - - - - + - - + - - + - - + - - - - - + + + + - - - - + - - - - - + - - + diff --git a/images/nsolid-logo-dark.svg b/images/nsolid-logo-dark.svg index 90418b8..1911833 100644 --- a/images/nsolid-logo-dark.svg +++ b/images/nsolid-logo-dark.svg @@ -1,16 +1,20 @@ - + N|Solid/Dark/nsolid-logo-dark Created with Sketch. - - + + - + diff --git a/scripts/deb/script_generator/README.md b/scripts/deb/script_generator/README.md index 676566f..73b3d2d 100644 --- a/scripts/deb/script_generator/README.md +++ b/scripts/deb/script_generator/README.md @@ -24,7 +24,7 @@ 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. +3. Logs a message indicating that the repository is configured and updated, and instructs the user to run `apt 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. diff --git a/scripts/deb/script_generator/base_script.sh b/scripts/deb/script_generator/base_script.sh index 3ee071b..85c882f 100644 --- a/scripts/deb/script_generator/base_script.sh +++ b/scripts/deb/script_generator/base_script.sh @@ -42,13 +42,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -75,8 +75,8 @@ 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." + if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ]; then + handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64 are supported. Contact Nodesource for an extended support version https://nodesource.com/pages/contact-us.html." 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 @@ -91,14 +91,14 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else log "Repository configured successfully." - log "To install Node.js, run: apt-get install nodejs -y" "info" + log "To install Node.js, run: apt 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" + log "To install N|solid Runtime, run: apt install nsolid -y \n" "success" fi } diff --git a/scripts/deb/script_generator/generator.sh b/scripts/deb/script_generator/generator.sh index df07aae..53b4a79 100644 --- a/scripts/deb/script_generator/generator.sh +++ b/scripts/deb/script_generator/generator.sh @@ -25,7 +25,7 @@ if [ ! -f "$base_script" ]; then fi # List of versions -versions=("18" "20" "22" "23" "24") +versions=("23" "24" "25") # Iterate over the versions and create scripts for version in "${versions[@]}"; do @@ -33,8 +33,8 @@ for version in "${versions[@]}"; do done # Define LTS and current Node.js versions -lts_version="22" -current_version="24" +lts_version="24" +current_version="25" # Create setup_lts and setup_current scripts create_script "$lts_version" "lts" diff --git a/scripts/deb/setup_16.x b/scripts/deb/setup_16.x index 5f9ff13..50509f9 100755 --- a/scripts/deb/setup_16.x +++ b/scripts/deb/setup_16.x @@ -113,13 +113,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -152,11 +152,11 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else - log "Repository configured successfully. To install Node.js, run: apt-get install nodejs -y" "success" + log "Repository configured successfully. To install Node.js, run: apt install nodejs -y" "success" fi } diff --git a/scripts/deb/setup_18.x b/scripts/deb/setup_18.x index 0a1fd09..4217bb0 100755 --- a/scripts/deb/setup_18.x +++ b/scripts/deb/setup_18.x @@ -1,5 +1,31 @@ #!/bin/bash +# Send deprecation Warning +node_deprecation_warning() { + log " +=============================================================================== + DEPRECATION WARNING +=============================================================================== +Node.js 18.x is no longer actively supported! +You will not receive security or critical stability updates for this version. + +You should migrate to a supported version of Node.js as soon as possible. + +Please see https://nodesource.com/products/distributions for details about which +version may be appropriate for you. + +The NodeSource Node.js distributions site contains +information both about supported versions of Node.js and N|Solid supported Linux +distributions. To learn more about usage, see: +https://nodesource.com/products/distributions + +=============================================================================== + +Continuing in 10 seconds ... +" "error" + sleep 10 +} + # Logger Function log() { local message="$1" @@ -42,13 +68,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -91,14 +117,14 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else log "Repository configured successfully." - log "To install Node.js, run: apt-get install nodejs -y" "info" + log "To install Node.js, run: apt 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" + log "To install N|solid Runtime, run: apt install nsolid -y \n" "success" fi } @@ -109,5 +135,6 @@ NODE_VERSION="18.x" 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" diff --git a/scripts/deb/setup_20.x b/scripts/deb/setup_20.x index 865257b..5a87909 100755 --- a/scripts/deb/setup_20.x +++ b/scripts/deb/setup_20.x @@ -42,13 +42,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -91,14 +91,14 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else log "Repository configured successfully." - log "To install Node.js, run: apt-get install nodejs -y" "info" + log "To install Node.js, run: apt 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" + log "To install N|solid Runtime, run: apt install nsolid -y \n" "success" fi } diff --git a/scripts/deb/setup_21.x b/scripts/deb/setup_21.x index 127ef53..85bc14a 100755 --- a/scripts/deb/setup_21.x +++ b/scripts/deb/setup_21.x @@ -42,13 +42,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -91,14 +91,14 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else log "Repository configured successfully." - log "To install Node.js, run: apt-get install nodejs -y" "info" + log "To install Node.js, run: apt 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" + log "To install N|solid Runtime, run: apt install nsolid -y \n" "success" fi } diff --git a/scripts/deb/setup_22.x b/scripts/deb/setup_22.x index 82155c8..357fd5e 100755 --- a/scripts/deb/setup_22.x +++ b/scripts/deb/setup_22.x @@ -42,13 +42,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -91,14 +91,14 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else log "Repository configured successfully." - log "To install Node.js, run: apt-get install nodejs -y" "info" + log "To install Node.js, run: apt 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" + log "To install N|solid Runtime, run: apt install nsolid -y \n" "success" fi } diff --git a/scripts/deb/setup_23.x b/scripts/deb/setup_23.x index 4b112d0..c4f08a6 100755 --- a/scripts/deb/setup_23.x +++ b/scripts/deb/setup_23.x @@ -42,13 +42,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -75,8 +75,8 @@ 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." + if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ]; then + handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64 are supported. Contact Nodesource for an extended support version https://nodesource.com/pages/contact-us.html." 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 @@ -91,14 +91,14 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else log "Repository configured successfully." - log "To install Node.js, run: apt-get install nodejs -y" "info" + log "To install Node.js, run: apt 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" + log "To install N|solid Runtime, run: apt install nsolid -y \n" "success" fi } diff --git a/scripts/deb/setup_24.x b/scripts/deb/setup_24.x index 8a5af7e..2c90e75 100755 --- a/scripts/deb/setup_24.x +++ b/scripts/deb/setup_24.x @@ -42,13 +42,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -75,8 +75,8 @@ 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." + if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ]; then + handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64 are supported. Contact Nodesource for an extended support version https://nodesource.com/pages/contact-us.html." 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 @@ -91,14 +91,14 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else log "Repository configured successfully." - log "To install Node.js, run: apt-get install nodejs -y" "info" + log "To install Node.js, run: apt 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" + log "To install N|solid Runtime, run: apt install nsolid -y \n" "success" fi } diff --git a/scripts/deb/setup_25.x b/scripts/deb/setup_25.x new file mode 100755 index 0000000..e4e384e --- /dev/null +++ b/scripts/deb/setup_25.x @@ -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 update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" + fi + + # Run 'apt install' + if ! apt 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" ]; then + handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64 are supported. Contact Nodesource for an extended support version https://nodesource.com/pages/contact-us.html." + 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 update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" + else + log "Repository configured successfully." + log "To install Node.js, run: apt 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 install nsolid -y \n" "success" + fi +} + +# Define Node.js version +NODE_VERSION="25.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" diff --git a/scripts/deb/setup_current.x b/scripts/deb/setup_current.x index 8a5af7e..e4e384e 100755 --- a/scripts/deb/setup_current.x +++ b/scripts/deb/setup_current.x @@ -42,13 +42,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -75,8 +75,8 @@ 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." + if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ]; then + handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64 are supported. Contact Nodesource for an extended support version https://nodesource.com/pages/contact-us.html." 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 @@ -91,19 +91,19 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else log "Repository configured successfully." - log "To install Node.js, run: apt-get install nodejs -y" "info" + log "To install Node.js, run: apt 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" + log "To install N|solid Runtime, run: apt install nsolid -y \n" "success" fi } # Define Node.js version -NODE_VERSION="24.x" +NODE_VERSION="25.x" # Check OS check_os diff --git a/scripts/deb/setup_lts.x b/scripts/deb/setup_lts.x index 82155c8..2c90e75 100755 --- a/scripts/deb/setup_lts.x +++ b/scripts/deb/setup_lts.x @@ -42,13 +42,13 @@ check_os() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" fi - # Run 'apt-get install' - if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then + # Run 'apt install' + if ! apt install -y apt-transport-https ca-certificates curl gnupg; then handle_error "$?" "Failed to install packages" fi @@ -75,8 +75,8 @@ 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." + if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ]; then + handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64 are supported. Contact Nodesource for an extended support version https://nodesource.com/pages/contact-us.html." 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 @@ -91,19 +91,19 @@ configure_repo() { 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'" + # Run 'apt update' + if ! apt update -y; then + handle_error "$?" "Failed to run 'apt update'" else log "Repository configured successfully." - log "To install Node.js, run: apt-get install nodejs -y" "info" + log "To install Node.js, run: apt 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" + log "To install N|solid Runtime, run: apt install nsolid -y \n" "success" fi } # Define Node.js version -NODE_VERSION="22.x" +NODE_VERSION="24.x" # Check OS check_os diff --git a/scripts/rpm/script_generator/base_script.sh b/scripts/rpm/script_generator/base_script.sh index 0350050..7971a73 100644 --- a/scripts/rpm/script_generator/base_script.sh +++ b/scripts/rpm/script_generator/base_script.sh @@ -66,7 +66,7 @@ module_hotfixes=1" 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 +if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.x" ]]; then # Repository content for N|Solid NSOLID_REPO_CONTENT="[nodesource-nsolid] name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH @@ -88,7 +88,7 @@ if command_exists dnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -104,7 +104,7 @@ elif command_exists yum; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -119,7 +119,7 @@ elif command_exists microdnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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 diff --git a/scripts/rpm/script_generator/generator.sh b/scripts/rpm/script_generator/generator.sh index df07aae..53b4a79 100644 --- a/scripts/rpm/script_generator/generator.sh +++ b/scripts/rpm/script_generator/generator.sh @@ -25,7 +25,7 @@ if [ ! -f "$base_script" ]; then fi # List of versions -versions=("18" "20" "22" "23" "24") +versions=("23" "24" "25") # Iterate over the versions and create scripts for version in "${versions[@]}"; do @@ -33,8 +33,8 @@ for version in "${versions[@]}"; do done # Define LTS and current Node.js versions -lts_version="22" -current_version="24" +lts_version="24" +current_version="25" # Create setup_lts and setup_current scripts create_script "$lts_version" "lts" diff --git a/scripts/rpm/setup_18.x b/scripts/rpm/setup_18.x index 2413a10..fe8b3ee 100755 --- a/scripts/rpm/setup_18.x +++ b/scripts/rpm/setup_18.x @@ -1,5 +1,31 @@ #!/bin/bash +# Send deprecation Warning +node_deprecation_warning() { + log " +=============================================================================== + DEPRECATION WARNING +=============================================================================== +Node.js 18.x is no longer actively supported! +You will not receive security or critical stability updates for this version. + +You should migrate to a supported version of Node.js as soon as possible. + +Please see https://nodesource.com/products/distributions for details about which +version may be appropriate for you. + +The NodeSource Node.js distributions site contains +information both about supported versions of Node.js and N|Solid supported Linux +distributions. To learn more about usage, see: +https://nodesource.com/products/distributions + +=============================================================================== + +Continuing in 10 seconds ... +" "error" + sleep 10 +} + # Logger Function log() { local message="$1" @@ -36,6 +62,9 @@ if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi +# Send deprecation Warning +node_deprecation_warning + log "Cleaning up old repositories..." "info" rm -f /etc/yum.repos.d/nodesource*.repo log "Old repositories removed" "info" diff --git a/scripts/rpm/setup_23.x b/scripts/rpm/setup_23.x index 9e6a295..f30fa5d 100755 --- a/scripts/rpm/setup_23.x +++ b/scripts/rpm/setup_23.x @@ -66,7 +66,7 @@ module_hotfixes=1" 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 +if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.x" ]]; then # Repository content for N|Solid NSOLID_REPO_CONTENT="[nodesource-nsolid] name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH @@ -88,7 +88,7 @@ if command_exists dnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -104,7 +104,7 @@ elif command_exists yum; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -119,7 +119,7 @@ elif command_exists microdnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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 diff --git a/scripts/rpm/setup_24.x b/scripts/rpm/setup_24.x index f8b2fcb..98112b5 100755 --- a/scripts/rpm/setup_24.x +++ b/scripts/rpm/setup_24.x @@ -66,7 +66,7 @@ module_hotfixes=1" 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 +if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.x" ]]; then # Repository content for N|Solid NSOLID_REPO_CONTENT="[nodesource-nsolid] name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH @@ -88,7 +88,7 @@ if command_exists dnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -104,7 +104,7 @@ elif command_exists yum; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -119,7 +119,7 @@ elif command_exists microdnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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 diff --git a/scripts/rpm/setup_25.x b/scripts/rpm/setup_25.x new file mode 100755 index 0000000..95bc3bd --- /dev/null +++ b/scripts/rpm/setup_25.x @@ -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="25.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" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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 diff --git a/scripts/rpm/setup_current.x b/scripts/rpm/setup_current.x index f8b2fcb..95bc3bd 100755 --- a/scripts/rpm/setup_current.x +++ b/scripts/rpm/setup_current.x @@ -41,7 +41,7 @@ rm -f /etc/yum.repos.d/nodesource*.repo log "Old repositories removed" "info" # Define Node.js version -NODE_VERSION="24.x" +NODE_VERSION="25.x" # Get system architecture SYS_ARCH=$(uname -m) @@ -66,7 +66,7 @@ module_hotfixes=1" 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 +if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.x" ]]; then # Repository content for N|Solid NSOLID_REPO_CONTENT="[nodesource-nsolid] name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH @@ -88,7 +88,7 @@ if command_exists dnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -104,7 +104,7 @@ elif command_exists yum; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -119,7 +119,7 @@ elif command_exists microdnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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 diff --git a/scripts/rpm/setup_lts.x b/scripts/rpm/setup_lts.x index dc3fe43..98112b5 100755 --- a/scripts/rpm/setup_lts.x +++ b/scripts/rpm/setup_lts.x @@ -41,7 +41,7 @@ rm -f /etc/yum.repos.d/nodesource*.repo log "Old repositories removed" "info" # Define Node.js version -NODE_VERSION="22.x" +NODE_VERSION="24.x" # Get system architecture SYS_ARCH=$(uname -m) @@ -66,7 +66,7 @@ module_hotfixes=1" 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 +if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.x" ]]; then # Repository content for N|Solid NSOLID_REPO_CONTENT="[nodesource-nsolid] name=N|Solid Packages for Linux RPM based distros - $SYS_ARCH @@ -88,7 +88,7 @@ if command_exists dnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -104,7 +104,7 @@ elif command_exists yum; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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" @@ -119,7 +119,7 @@ elif command_exists microdnf; then 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 + if [[ "$NODE_VERSION" == "20.x" ]] || [[ "$NODE_VERSION" == "22.x" ]] || [[ "$NODE_VERSION" == "24.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