NodeSource Binary Distributions

repository·master·Indexed 11 days ago

https://github.com/nodesource/distributions

Production-ready Node.js and N|Solid binary distributions for Linux. Provides installation scripts and repository configuration for Debian-based systems (Ubuntu, Debian) and RPM-based systems (Fedora, Red Hat, Amazon Linux 2023) across multiple architectures including amd64, arm64, and armhf.

Tokens
7.2K
Snippets
29
Records
44
Agent score
95%

What's inside NodeSource

  1. Overview of NodeSource N|Solid & Node.js Binary Distributions

    master
    NodeSource provides binary distributions for N|Solid and Node.js via .deb (Debian/Ubuntu) and .rpm (Enterprise Linux) packages. This repository contains the installation instructions, setup scripts, and support scripts required to deploy these runtimes on various Linux distributions.
  2. Supported Architectures and Distributions

    master

    NodeSource provides binary distributions for Debian and Ubuntu-based systems.

    Available Architectures

    • amd64 (64-bit)
    • armhf (ARM 32-bit hard-float, ARMv7 and up)
    • arm64 (ARM 64-bit, ARMv8 and up)

    Supported Distributions

    NodeSource supports various distributions including Ubuntu, Debian, Linux Mint, Devuan, elementary OS, Trisquel, BOSS, BunsenLabs, MX Linux, Sparky Linux, PureOS, Astra Linux CE, Ubilinux, Parrot OS, and Deepin Linux.

    Note: Some older versions may have broken build systems for Node.js 18+.

  3. How the Node.js setup scripts work

    master

    The setup scripts follow a standard lifecycle to prepare an RPM-based system for Node.js installation:

    1. Distribution Check: Verifies the system is an RPM-based Linux distribution.
    2. Repository Configuration: Configures the NodeSource Node.js RPM repository for the version specified by NODE_VERSION.
    3. Package Manager Detection: Identifies whether dnf, yum, or microdnf is available on the system.
    4. System Update: Uses the detected package manager to update the system.
    5. Post-setup Instruction: Logs a message instructing the user to manually run the installation command (e.g., dnf install nodejs -y) to complete the process.
  4. Understand the setup script workflow

    master

    The setup scripts follow a three-step process to prepare a Debian-based system for Node.js installation:

    1. System Check: Verifies that the host is a Debian-based Linux distribution.
    2. Repository Configuration: Configures the NodeSource Node.js DEB repository for the version specified in the script.
    3. Installation Prompt: Logs a confirmation that the repository is updated and instructs the user to manually run apt install nodejs -y to finish the installation.

    Special scripts include:

    • setup_current: Installs the current version (e.g., 20.x).
    • setup_latest: Installs the latest version (e.g., 21.x).
  5. Important changes to NodeSource distributions

    master

    NodeSource has updated its distribution model with the following changes:

    • Package Changes: DEB and RPM packages are now available under the nodistro codename. Instead of version-coupled installers, you can now install Node.js on almost any distribution that meets minimum requirements.
    • Installation Scripts: Updated installation scripts are available to facilitate setup.
    • RPM Package Signing: RPM packages are now signed using SHA256 for improved security and community support.
  6. Supported Node.js versions and script deprecation

    master

    NodeSource provides support exclusively for active Node.js versions. As of the current documentation, supported versions are:

    • 18
    • 20
    • 21

    Note on Deprecation: Installation scripts for outdated Node.js versions are deprecated. While packages for older versions may still exist in the repository, they are no longer actively supported. It is highly recommended to upgrade to an active version for continued support and security updates.

  7. Install Node.js 20.x or N|Solid on RPM-based Systems

    master

    To install Node.js v20.x or N|Solid, download the setup script and then choose your desired package.

    Using sudo/root privileges

    sudo yum install -y curl
    curl -fsSL https://rpm.nodesource.com/setup_20.x -o nodesource_setup.sh
    bash nodesource_setup.sh
    
    # To install N|Solid:
    sudo yum install -y nsolid
    nsolid -v
    
    # To install Node.js:
    sudo yum install -y nodejs
    node -v

    Without root privileges

    yum install -y curl
    curl -fsSL https://rpm.nodesource.com/setup_20.x -o nodesource_setup.sh
    bash nodesource_setup.sh
    
    # To install N|Solid:
    sudo yum install -y nsolid
    nsolid -v
    
    # To install Node.js:
    yum install -y nodejs
    node -v
  8. Install Node.js on Debian-style distributions (Ubuntu Precise and Debian Wheezy)

    master

    On older Debian-style distributions like Ubuntu Precise and Debian Wheezy, the default C++ compilers are insufficient for modern Node.js versions.

    Compatibility Notes:

    • Node.js v6.x and below: Supported on these distributions using clang-3.4.
    • Node.js v7.x and above: Not supported on Wheezy or Precise because they require C++ standards newer than what clang-3.4 or the default gcc can provide.
    • Architecture: arm builds are not available for these two distributions.

    To use Node.js on these systems, you must install clang-3.4 via the following steps:

    # For Ubuntu Precise
    apt update
    apt install -y clang-3.4
    
    # For Debian Wheezy
    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 update
    apt install -y clang-3.4
  9. Uninstall Node.js from Enterprise Linux

    master

    To completely remove Node.js installed via the NodeSource RPM package methods, run the following commands as root or using sudo to remove the package, delete the repository configuration files, and clean the package manager cache.

    sudo yum remove nodejs && \
    rm -r /etc/yum.repos.d/nodesource*.repo && \
    yum clean all
  10. Install Node.js 23.x on Ubuntu or Debian

    master

    To install Node.js 23.x, first ensure curl is installed. Then download and run the NodeSource setup script, followed by the package installation.

    Ubuntu

    sudo apt install -y curl
    curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
    sudo -E bash nodesource_setup.sh
    sudo apt install -y nodejs
    node -v

    Debian (as root)

    apt install -y curl
    curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
    bash nodesource_setup.sh
    apt install -y nodejs
    node -v