Last active
December 12, 2015 07:28
-
-
Save 11xor6/4737097 to your computer and use it in GitHub Desktop.
Install cloud-init on RHEL or Centos 6 for use on AWS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We need the latest epel-release for a RHEL/Centos specific cloud-init | |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
rpm -Uvh epel-release-6-8.noarch.rpm | |
# After this finishes you can build an AMI that will process the user data | |
# with cloud-init. You may also be interested in taking a look at the config | |
# file at /etc/cloud/cloud.cfg | |
yum install cloud-init |
I had no success with just thse two steps, I had to edit the cloud.cfg file to set cloud_type
:
sed -i.bak /etc/cloud/cloud.cfg -e 's/name: centos/name: ec2-user/' -e '1 i cloud_type: auto'
(This also changes the default username from centos
to the more "standard" ec2-user
)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the answer, the shorter version would be:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Since the rpm tool can download the file on it's own.