CentOS7 AMI does not have ec2-net-utils package to configure secondary interface

1

We have a CentOS7 (CentOS Linux release 7.9.2009 (Core)) AMI from the marketplace and we see that it does not have ec2-net-utils package installed.

When we attach the secondary interface, IP gets assigned at the EC2 instance level, but on the OS level no IP is assigned to eth1 interface. Also, no files (ifcfg-eth1, route-eth1, rule-eth1)are created under /etc/sysconfig/network-scripts/ directory

Could not find any documentation to install ec2-net-utils.

Cloud-init is already installed with the availabe latest version of 19.4. $ rpm -q cloud-init cloud-init-19.4-7.el7.centos.5.x86_64 $

Regards, Gaurav

demandé il y a 2 ans1272 vues
1 réponse
0
Réponse acceptée

Got the solution for this issue. Below are the steps to compile and install the net-utils in the CenOS7

# yum -y install git make systemd systemd-units rpm-build

# git clone --branch=1.x --single-branch --depth 1 https://github.com/aws/amazon-ec2-net-utils.git

# cd amazon-ec2-net-utils/

# curl -LO 'https://github.com/aws/amazon-ec2-net-utils/archive/1.5.tar.gz'

# rpmbuild --define "_sourcedir $PWD" -bb amazon-ec2-net-utils.spec

# ls ~/rpmbuild/RPMS/noarch/

# yum localinstall ls ~/rpmbuild/RPMS/noarch/amazon-ec2-net-utils-1.5-1.el7.noarch.rpm

répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions