- Upgrade to the latest version of CPAN
perl -MCPAN -e "install(q{Bundle::CPAN})"
- Install the Net::Amazon::EC2 bundle using CPAN
cpan> install Net::Amazon::EC2
- Install the File::Slurp bundle using CPAN
cpan> install File::Slurp
- Install the DBI bundle using CPAN
cpan> install DBI
- If you are running the MySQL-shared-community RPM, remove it and run the shared-compat RPM instead (because perl-DBD-MySQL requires it)
rpm -e MySQL-shared-community-5.1.55-1.rhel5.x86_64
rpm -ivh MySQL-shared-compat-5.1.55-1.rhel5.x86_64.rpm - Install perl-DBD-MySQL using yum
yum -y install perl-DBD-MySQL
- Install Net::SSLeay using yum
yum -y install 'perl(Net::SSLeay)'
- Install IO::Socket::SSL using yum
yum -y install 'perl(IO::Socket::SSL)'
- Install Mozilla::CA using cpan
cpan> install Mozilla::CA
- Install ec2-consistent-snapshot
Obtain the latest ec2-consistent-snapshot "download file" URL from the trunk page.pushd /home/ec2/bin
wget http://bazaar.launchpad.net/~alestic/ec2-consistent-snapshot/trunk/download/head:/ec2consistentsnapsho-20090928015038-9m9x0fc4yoy54g4j-1/ec2-consistent-snapshot
chmod 755 ec2-consistent-snapshot
popd
Friday, March 25, 2011
ec2-consistent-snapshot for CentOS
I have really appreciated Eric Hammond's articles and tutorials on EC2. Running MySQL on Amazon EC2 with EBS (Elastic Block Store) enabled us to get started using the cloud to deploy our new website. In the past, we have used a replicated server to take MySQL backups, but Eric's article on Creating Consistent EBS snapshots with MySQL and XFS on EC2 encouraged us to try a new approach in the cloud. The only problem is that all of Eric's tools are created for Ubuntu and we are a CentOS shop. The good news is that we were able to get ec2-consistent-snapshot working on CentOS using the following steps:
Subscribe to:
Post Comments (Atom)
1 comment:
Hi David, thanks so much for sharing your work. I've managed to install the script in my AMI Linux. As I explained at the Eric Hammond's alestic site, my only problem was Time::HiRes.
When I was trying to run the script, I was getting the error:
Can't locate Time/HiRes.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./ec2-consistent-snapshot line 11.
BEGIN failed--compilation aborted at ./ec2-consistent-snapshot line 11.
I solved this issue by installing the following:
wget http://cpan.perl.org/authors/id/J/JH/JHI/Time-HiRes-1.9721.tar.gz
tar -zxvf Time-HiRes-1.9721.tar.gz
cd Time-HiRes-1.9721.tar.gz
perl Makefile.PL
make
make test
make install
Hope this can help other people working under the AMI Linux platform.
Best Regards :)
Post a Comment