Setting up Group Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates-released 100% |=========================| 1.1 kB 00:00
comps.xml 100% |=========================| 693 kB 00:00
comps.xml 100% |=========================| 693 kB 00:00
Setting up repositories
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 824 kB 00:00
base : ################################################## 2772/2772
Added 2772 new packages, deleted 0 old in 15.32 seconds
primary.xml.gz 100% |=========================| 824 kB 00:00
updates-re: ################################################## 2772/2772
Added 2772 new packages, deleted 0 old in 10.74 seconds
...
Complete!
Congratulations!
You now have a base installation in the image file you've created. The next steps are to configure the
installation to operate inside Amazon EC2, and to customize the installation for your use.
Configure the Installed Operating System
The base operating system has now successfully been installed. You must now configure the networking
and hard drives to work in the Amazon EC2 environment.
Configure the Network Interface
The Amazon EC2 environment provides a networking interface card that needs to be configured to
provide external network access for the running instance. Edit (or create) the following file
/mnt/ec2-fs/etc/sysconfig/network-scripts/ifcfg-eth0, making sure it contains at least
the following information.
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
Note
The Amazon EC2 DHCP server ignores hostname requests. If you set DHCP_HOSTNAME the
local hostname will be set on the instance but not externally. In addition, this local hostname
will be the same for all instances of the AMI, which may prove confusing.
Enable Networking
After configuring the network interface, you need to ensure that networking will come up when the
system is started. To do this, ensure that (at least) the following appears in
/mnt/ec2-fs/etc/sysconfig/network.
NETWORKING=yes
Set up Hard Drives in /etc/fstab
Amazon EC2
Developer Guide
8
Amazon EC2 provides the instance with additional local storage by way of a disk drive on /dev/sda2.
In addition, swap space is provided on /dev/sda3. To ensure both these are mounted at system start up
time, add the following lines to /mnt/ec2-fs/etc/fstab:
/dev/sda2 /mnt ext3 defaults 1 2
/dev/sda3 swap swap defaults 0 0
Configure Additional Services
Finally, make sure that all of your required services will be started at system start up time by allocating
them to the appropriate system run levels. To enable the service my-service on multi-user and
networked run levels, for example, execute:
# chroot /mnt/ec2-fs /bin/sh
# chkconfig --level 345 my-service on
# exit
Unmount the Loopback File
Your new installation has now been successfully installed and configured to operate in the Amazon EC2
environment. You may now unmount the image:
# umount /mnt/ec2-fs/proc
# umount -d /mnt/ec2-fs
Amazon EC2
Developer Guide
9
Previous Page Next Page