Magento is an open source eCommerce platform which is highly customizable and secured. You can setup your own online store with any feature that suits you. Magento provide shopping cart, inventory management and much more. Today we will focus on how to install Magento on Amazon Aws Ec2.
For this tutorial I assume that you have already know how of how to launch an Ubuntu instance on amazon ec2 and connect ec2 instance using putty. Make sure you open port 80 in the EC2 instance security group when launching Ubuntu.
Log in as root user
after login the EC2 instance with ubuntu user run the below command to get root login
Now update the server
apt-get works with Ubuntu’s APT (Advanced Packaging Tool) library to perform any installation, updates and removal of software packages. Here we are using to update server.
apt-get –y lampstack
Magento needs apache, php and MYSQL database as an initial requirement. We can configure all three using this single command
During installation it will prompt you to enter the root password for mysql, kindly enter your password and note it which will require for further use.
You can even do this by Taskel
Use following commands:
apt-get install taskel taskel install lamp-server
Check if Mysql and apache services are running
Service apache2 status Service mysql status
This command will return the status of apache2 and MYSQL
Setup MySQl Client
You can install Phpmyadmin in(Secure way to access database. We suggest to use MySQL Client like MySQL Workbench and SQLyog
On terminal create ssh user
(you can use any name you like)
It will ask to enter password twice, kindly enter the password of your choice.
Following these steps to connect MySQL Server with MySQL Workbench
Please follow the below step to Setup A New Connection
1- Type the Connection Name : My Msql Connection
2- Select Standard TCP/IP over SSH — from Connection Method
3- SSH Hostname : 184.108.40.206:22
4- SSH Username : your_ssh_user
5- SSH password : enter Your_SSH_Password
6- Mysql Hostname : 127.0.0.1
7- Mysql username : Your_MySQL_User
8- Mysql Server Port : 3306
9- Mysql Password : Your_Mysql_Password
10 Click on ok
Click the database symbol with the plus sign
(shown in the below picture). Enter name Magento and click Apply.
Typ below commands to download magento
mkdir /var/www/magento/ cd /var/www/magento/ wget http://www.magentocommerce.com/download/assets/220.127.116.11/magento-18.104.22.168.tar.gz
untar the downloaded file
tar –xvzf mag*
Give write permissions to Magento
Now you will need to give write permissions to Magento in the following folders
Chmod –R o+w magento/app/etc Chmod –R o+w magento/var Chmod –R o+w magento/media
Add encrypt extension to php.ini
Now add encrypt extension to php.ini at the following location /etc/php5/apache2/php.ini
Vi /etc/php5/apache2/php.ini extension=mcrypt.so
Install php Curl
We need to install php curl for Magneto. Here we are installing php5
apt-get install php5-curl apt-get install php5-curl
Hola! Now you are just few steps away to experience Magento. Type your ip followed by /magento. Magento installation wizard will appear.
- Accept the terms and condition and click continue
- Select your currency , Time zone and local and hit continue
- Enter MySQL credentials and the database name you just created. For this tutorial we created database MagentoDB. Enter the details
- Now create admin account. Enter your personal information, login information and encryption key to successfully create admin account and continue.
- Hurray you are done! Access Magneto front end or back end from the buttons. You can also integrate payment gateway (optional).
If you have any questions then do leave a comment below and we will instantly provide you with the solutions ☺