How to create an instance for Magento in Amazon Cloud EC2
You can also get this ebs Image in Amazon EC2. Choose “426063643107/Magento 1.4.x on Fedora 8″
when you launch an instance in the tab “Community AMIs”
MySQL Admin Username: root Password: 123456
Once the image is initialized
a) Install Magento 1.4.1.1 (For demo store follow 5.1)
In your browser go to: http://YOUREC2NAME.compute-1.amazonaws.com/magento/
b) Install Magento 1.4.1.1 DEMO Version
In your browser go to: http://YOUREC2NAME.compute-1.amazonaws.com/magento-demo/
1) Choose the simplest Instance Fedora Core 8 (AMI Id: ami-df1e35ab)
Minimal Fedora Core 8, 32-bit architecture, Apache 2.0, and Amazon EC2 AMI Tools.
2) Installing Remi Repository with Apache, MySQL and PHP
wget http://rpms.famillecollet.com/remi-release-8.rpm rpm -Uvh remi-release-8.rpm vi /etc/apt/sources.list.d/remi.list # Uncomment: repomd http://rpms.famillecollet.com/ fc$(VERSION).$(ARCH) # Installing MySQL # yum --enablerepo=remi install mysql mysql-server mysql-devel # Installing Http Server with PHP # yum --enablerepo=remi install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml # Config MySQL # /usr/bin/mysqladmin -u root password '123456' # Config Apache # # /etc/httpd/conf/httpd.con on Line 326 change AllowOverride None # to AllowOverride All # inside <Directory "/var/www/html"> ... </Directory> # /etc/php.ini Activate this line to read <? tags short_open_tag = On #Try it out with the usual script in /var/www/html/test.php <?php phpinfo(); ?>
3) Installing Exim Mail Server
yum install exim /etc/init.d/exim start mail -s "testing" your@emailaddress.com Testing purpose! . Cc: # Your Mail Server should be running properly
4) SFtp Server Access
# Just using a SFtp Client Server Vicomsoft Ftp Client # configure a new connection without password and use # the option "Use SSH keyfile (SFTP only)" to add your # .pem file # Or just use sshfs -i MYSECRETKEY.pem root@YOUREC2NAME.compute-1.amazonaws.com:/ /
5) Using ntsysv command choose the next services to start automatically
sendmail
httpd
mysqld
6) Optionally you can give NFS support to share files between images
#Server1 [root@server1]# vi /etc/exports /var/www/html *(rw) [root@server1]# /etc/init.d/rpcbind start [root@server1]# /etc/init.d/nfs start #Server2 [root@server2]# mount -o nolock ec2-79-xxx-xx-xxx.eu-west-1.compute.amazonaws.com:/var/www/html /mnt
7) Download and uncompress Magento versions in /var/www/html
CHANGELOG
File /etc/php.ini change short_open_tag = On
Pyrameda
on Nov 21st, 2010
@ 9:50 pm:
Thanks for this quick run-through on how to install Magento on EC2. We have been using osCommerce for our e-commerce sites, but are thinking about switching to Magento. My question is: how has your experience with Magento on EC2 been so far? Do you use a small instance or a large instance? And do you think running multiple Magento installations on a small instance will impact the server performance?
Thank you! :)
admin
on Nov 25th, 2010
@ 5:54 pm:
In my experience we had to split Magento on files / database Medium (5CPU) instances for a company with 30k customers and 250 order/day.
Does it help?
Nacho
tom
on Dec 9th, 2010
@ 8:19 pm:
nacho, thanks for this write up. Can you talk more about how many instances you needed to run Magento? It sounds like you have 1 instance for the content and 1 for the database. Is that right? Are you using RDS?
admin
on Dec 10th, 2010
@ 4:13 pm:
Hi there, I worked for a company with 2 instances. One for MySQL and one for Apache. I’ve never used RDS, it could be a good thing to try!!! :-)
What I’m working now is implementing Mysql Cluster between instances for Magento with elastic load balancers ELB
mick
on Dec 12th, 2010
@ 6:31 am:
Nacho,
I’ve fired up your Mage AMI to give it a go as I’ve been trying all day to make a web accessible instance. I’ve then asigned an elastic IP and I do see Mage in /var/www/html but I just can’t figure out how to access this through the web.
I though an elastic IP only takes a few mins. to propagate?? Any ideas would be helpful.
Thanks,
Mick
admin
on Dec 14th, 2010
@ 5:37 pm:
Hi Mick,
What do you get when you try http://46.xx.xxx.xx/ ?
Also, have you checked the Amazon Firewall on port 80?