简体   繁体   中英

Amazon ec2 -ebs-mySql-CouchDB-ldap

I already have a system running on amazon ec2 . The system use three database MySql,CouchDB and ldap. But now i want to use amazon ebs. Can anyone please help me. I am new to Linux. And do i need to change code which connect with these databases after i move databases in different ebs volumes?.

EBS is Amazon's distributed storage solution for EC2 instances. Adding a new EBS volume to your instance is roughly the equivalent of adding a new hard disk to a physical server. It makes more storage space available but it's not a different server or anything, so you should not need to change the code that's responsible for connecting to your databases.

I'd suggest you get started by reading this tutorial on installing MySQL on EBS:
http://aws.amazon.com/articles/1663 Instead of using the command-line tools, you can also use the web management console at http://aws-portal.amazon.com/ to create and attach your EBS volume if you're unfamiliar with working from the command line. It'll still take a bit of command-line work to get MySQL up and running on a new EBS volume, though.

The procedure for CouchDB and IDAP should be roughly similar: you shut down the database services, and create a backup of your data files. In the meantime, you create a new EBS volume, attach it to your instance, use mkfs to prepare it for use, and mount it. Then, you copy the data files to the new EBS volume, you change the configuration to let the servers know where the data files are now stored (ie the path to the directory on the EBS volume) and you restart your database services. This should do the trick.

You can either use one single EBS volume and put all of your data files on that volume, or use three separate volumes, one for each database. The latter option may be slightly faster.

Hope this helps a bit. It may take a bit of experimentation but it shouldn't be too hard. Of course, don't test this on a production system :)

Adding to what @Daan stated, you should consider striping multiple EBS volumes into a software RAID configuration.

If you do not, you may well find that the EBS IO performance is too poor for a modestly busy MySQL instance.

For details on how to do that, check out

http://alestic.com/2009/06/ec2-ebs-raid

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM