Friday, September 5, 2014

Using perlbrew to compile ec2-consisent-snapshot on CentOS

I was tasked with taking a snapshot of a CentOS 5.7 mysql db in EC2 before we upgraded the instance type.  The data files reside on a RAID0 consisting of two EBS volumes.  The unanimous recommendation was to use ec2-consisent-snapshot.  Well, the CentOS AMI I'm having to use is custom, and the version of Perl is OLD.  Perlbrew to the rescue!  Earlier in the day, I'd screwed up my system version of Perl (thank god this box does NOTHING other than run mysql) so I had to export the perllibs so perlbrew would install.  Instructions follow:

curl -L http://install.perlbrew.pl | bash
perlbrew install perl-5.20.0
perlbrew switch perl-5.20.0
perlbrew install-cpanm
yum install expat-devel.x86_64
yum install openssl-devel.x86_64
yum install mysql-devel.x86_64
yum install util-linux
cpanm Net::Amazon::EC2
cpanm File::Slurp
cpanm DBI
cpanm DBD::mysql
cpanm DateTime::Locale
cpanm DateTime
git clone git://github.com/alestic/ec2-consistent-snapshot
vi ec2-consistent-snapshot (update #! line to point to correct version)

No comments:

Post a Comment