Sunday, 30 March 2025

Install nvme-cli for ARM based linux

 


to install the nvme-cli utility on your Graviton-based (ARM architecture) Red Hat Enterprise Linux (RHEL) EC2 instance without direct internet access, you can download the necessary RPM packages on your local Windows machine and then transfer them to your EC2 instance. Here's how you can proceed:

1. Determine Your RHEL Version and Architecture:

  • Connect to your EC2 instance and run the following commands to identify your RHEL version and system architecture:


    cat /etc/os-release uname -m
  • Note the VERSION_ID (e.g., 8.4) and architecture (aarch64 for ARM).

2. Download the nvme-cli RPM Package and Dependencies:

  • On your Windows machine, open a web browser and navigate to a reliable RPM repository such as RPM Find.

  • Search for the nvme-cli package that matches your RHEL version and ARM architecture (aarch64). For example, for RHEL 8 on ARM, you might find a package like nvme-cli-1.12-2.el8.aarch64.rpm.
    https://rpmfind.net/linux/RPM/centos-stream/10/baseos/aarch64/nvme-cli-2.11-5.el10.aarch64.html

  • Download the appropriate nvme-cli RPM package.

  • Identify and Download Dependencies:

    • nvme-cli may have dependencies that need to be installed alongside it. Common dependencies include libnvme and json-c.

    • Search for and download the RPM packages for these dependencies that match your RHEL version and ARM architecture.

3. Transfer the RPM Packages to Your EC2 Instance:

  • Use a secure method to transfer the downloaded RPM packages from your Windows machine to the EC2 instance. One common method is using scp (Secure Copy Protocol):

    • If you have an SSH client like PuTTY installed, you can use pscp (the SCP client from PuTTY) to transfer files. Open the Command Prompt on your Windows machine and run:


      pscp path\to\your\file username@your-ec2-instance-ip:/destination/path
    • Replace path\to\your\file with the path to your downloaded RPM package, username with your EC2 instance username (e.g., ec2-user), your-ec2-instance-ip with the public IP address of your EC2 instance, and /destination/path with the directory on the EC2 instance where you want to place the file.

4. Install the RPM Packages on Your EC2 Instance:

  • Connect to your EC2 instance and navigate to the directory containing the transferred RPM files.

  • Install the packages using the rpm command:


    sudo rpm -Uvh package-name.rpm

    Install each package, starting with the dependencies and finishing with nvme-cli.

  • If you encounter dependency issues, ensure that all required packages are present and installed in the correct order.

5. Verify the Installation:

  • After installation, verify that nvme-cli is correctly installed by running:


    nvme --version
  • This should display the installed version of nvme-cli, confirming a successful installation.

Additional Considerations:

  • Dependency Management: Manually managing dependencies can be complex. Ensure that all required libraries and packages are compatible with your system to prevent issues.

  • Security: Only download packages from official and trusted repositories to maintain the security and integrity of your system.

  • Alternative Methods: If manual installation becomes cumbersome, consider setting up a local repository or using AWS services like Systems Manager to manage packages on instances without direct internet access.




No comments:

Post a Comment