Installing NI Products Offline (Red Hat Enterprise Linux)

Install NI drivers and software on Red Hat Enterprise offline.

Complete the steps in Installing NI Drivers and Software on Linux Desktop and ensure the following:
  • You have root permissions for the system.
  • The system has internet access.
  • The system is running the same distribution as the offline system on which you want to install.
  1. On your online system, open the Command Prompt and run one of the following commands to install prerequisite software based on your distribution.
    OptionDescription
    RHEL/CentOS 8 sudo dnf install python36 createrepo
    RHEL/CentOS 7 sudo yum install python36 createrepo yum-utils
  2. Run the following command to apply the latest system updates to avoid installation issues.
    sudo yum update
    Note This command may update your kernel to the latest version.
  3. Restart your system.
  4. Open the Command Prompt and run the following command to install the repository registration package.
    sudo yum install filename.rpm

    Where

    • filename.rpm is the repository registration package you chose in Installing NI Drivers and Software on Linux Desktop.
  5. Download the offline_rpm_repo.py script.
  6. Complete the steps based on your goals.
    OptionDescription
    Clone the entire repo
    1. Run the following command to list all known and enabled repositories on the system.
      Distribution Command
      RHEL/CentOS 8

      sudo dnf repolist

      RHEL/CentOS 7

      sudo yum repolist

    2. To clone the repository, run the following command from the directory that contains the script.

      ./offline_rpm_repo.py repo --norepopath repo-name

      Where

      • repo-name is the name of the repository.
    Create a repo for specific products Open the Command Prompt and run the following command.

    ./offline_rpm_repo.py packages package-names

    Where

    • package-names is a space-separated list of the package names you want to include.
    By default, the script clones the new repository in the offline_repo subdirectory within the directory where the script runs. Pass the --output argument to specify a different location.
  7. Copy the repository to the target system.
    Note Choose a location that will not be modified accidentally.
  8. To disable GPG checking, create a file at the following location as root.
    /etc/yum.repos.d/repo-name.repo

    Where

    • repo-name is the name you give your repository.
  9. As root, enter the following content in the file.

    [repo-name]

    name=readable-name

    enabled=1

    gpgcheck=0

    baseurl=file:///srv/offline_repo

    Where

    • repo-name is the name you give your repository.
    • readable-name is the human-readable name you give your repository.
Complete the installation by following the online install instructions in Installing NI Products (Red Hat Enterprise Linux).