Guarino | Magento 2 Beginners Guide | E-Book | www.sack.de
E-Book

E-Book, Englisch, 442 Seiten

Guarino Magento 2 Beginners Guide

Discover what you need to know to build your own profitable online stores using the power of Magento 2!
1. Auflage 2025
ISBN: 978-1-78588-155-8
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection

Discover what you need to know to build your own profitable online stores using the power of Magento 2!

E-Book, Englisch, 442 Seiten

ISBN: 978-1-78588-155-8
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection



Do you have a good product to sell but need your start-up to sell it to your potential customers the right way? Were you unhappy with what Magento 1 had to offer and are looking forward to trying out what Magento 2 provides? If either of these questions ring a bell, then this book is for you! You'll start by getting a general understanding of what Magento is, why and how you should use it, and whether it is possible and feasible to migrate from an old web store to Magento 2.

We'll introduce you to the main e-commerce concepts and basic features and let you play with them, so you can get a taste of how catalog and content management works. Following on from that, we'll show you how to tune your store up. You will learn how to get web store offers up and running, how to offer various discounts in the catalog, how to let the customers reduce the total price in the shopping cart by combining different products, and how to generate coupon codes that customers can use. Finally, we'll get serious and turn your plaything into a real web store, teaching you how to run it for real.

Guarino Magento 2 Beginners Guide jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


Installing Magento in Amazon EC2


In this section, we will set up a server in Amazon from scratch. The server will be ready for Magento with all the requirements and dependencies installed, so you can manage your first Magento development server.

Setting up the Amazon AWS account


The first step is setting up your Amazon AWS account to create the server instance in Amazon EC2.

In order to do this, you should follow these steps:

  1. Go to the Amazon AWS homepage at https://aws.amazon.com/. It will look something like this:
  2. Click on Create an AWS Account.
  3. Add your e-mail or phone number and select I am a new user.:
  4. Click on Sign in using our secure server.
  5. Complete the form with your personal information and click on Create account:

Creating the Amazon EC2 instance


After verifying the Amazon AWS account, you can create your first Amazon EC2 instance. Instances are virtual servers that can run web applications. Let's go through the steps to create the Amazon EC2 instance:

  1. Go to the Amazon EC2 landing page, that is, https://aws.amazon.com/ec2/, which will look something like this:
  2. Click on My Account in the top-right of the screen, then click on AWS Management Console and, finally, sign in using your Amazon account.
  3. On the AWS Management Console, search for in the AWS services search box:
  4. You will be redirected to the EC2 dashboard. This will be the place to control and monitor your Amazon instances. Next, you click on Launch Instance in the middle of the page:

    Choose an Instance Type: On this page, you can see the different instance types that you can choose depending on the size of the Magento store. For now, we will choose the t2.micro  Free tier eligible instance type:

  5. Instance Setup Wizard:
    1. Choose an Amazon Machine Image (AMI): In this step, you can choose the software configuration for the Amazon instance. For this guide, we will choose Ubuntu Server:
    2. Choose an Instance Type: On this page, you can see the different instance types that you can choose depending on the size of the Magento store. For now, we will choose the t2.micro Free tier eligible instance type:
    3. Configure Instance: You can set advanced options for your instance in this step. We will keep the configuration by default in this step to proceed to step 4 of the Setup Wizard.
    4. Add Storage: In this step, you can specify the storage for your instance. Since the size of the Magento 2 code base with sample data is 530 MB, we will keep the default size for the volume (8 GB).
    5. Add Tags: This step is helpful when you have multiple Amazon instances since you can add tags to categorize the resources in your Amazon account.
    6. Configure Security Group: The security group is a set of rules that controls the traffic of the Amazon instance. The default rule port is SSH, which allows the user to access the instance from the terminal. In order to allow Internet traffic for the Magento store, you should enable the HTTP and HTTPS ports. You can add these ports by clicking on Add Rule and then selecting HTTP and HTTPS from the Custom TCP Rule dropdown.
    7. Review: In this step, you can review the configuration for your Amazon instance. Click on Launch at the bottom-right of the screen:

This is a really important part of the process. You can access the Amazon instance by using a private key file.

The only way to access the new instance is using the key pair, which is a combination of the public key that AWS stores and your private key file.

Choose Create a new key pair and then set the key pair name and click on Download Key Pair. Never lose the private key file since that is the master key to access your Amazon instance.

Finally, click on Launch Instance to finish the Setup Wizard.

Preparing the Amazon instance for Magento 2


Now that you created the Amazon instance, we are ready to install all the packages and dependencies to prepare the instance for Magento 2.

The first step is to log in to the server using the private key file that you downloaded from the Setup Wizard.

To log in, you need to know the public DNS or the public IP for the instance. You can get those values from the AWS EC2 Management Console:

  1. Go to the  AWS EC2 Management Console.
  2. You will see the instance that we just created in the list. Scroll to the right in the table to find the Public DNS and the Public IP for the instance:
  3. Before logging in to the server, we should give the right permissions to the private key file. Locate the file in the Terminal and run the following command: chmod 400 ~/Key Pairs/sample.pem

Now we are ready to log in to the AWS instance using the following command:

ssh -i ~/sample.pem ubuntu@107.20.106.201

We can alternatively use this command:

ssh -i ~/sample.pem ubuntu@ec2-107-20-106-201.compute-1.amazonaws.com

Once you log in to the development server, you should get privileges to proceed with the installation of all the dependencies without problems:

sudo su

Now, it is time to set up all the dependencies for Magento 2:

  1. Update all the existing packages in the server: apt-get update
  2. We will install Apache, PHP, and the required PHP modules and composer using the following commands: apt-get install sudo apt-get install apache2 sudo apt-get install php7.0 sudo apt-get install libapache2-mod-php sudo apt-get install php7.0-simplexml sudo apt-get install php7.0-curl sudo apt-get install php7.0-intl sudo apt-get install php7.0-xsl sudo apt-get install php7.0-zip sudo apt-get install php7.0-xml sudo apt-get install php7.0-curl sudo apt-get install php7.0-gd sudo apt-get install php7.0-mcrypt sudo apt-get install php7.0-dom sudo apt-get install php7.0-mbstring sudo apt-get install composer

    Tip


    You can run the installation for all the dependencies in one command, like this:

  3. Next, we will install MySQL. Note that the installer will ask you to set the password for the root user:  sudo apt-get install mysql-server sudo apt-get install php-mysql
  4. Secure the MySQL installation. To do this, run the following command:  mysql_secure_installation

    It will ask for the MySQL password you configured previously:

    • Remove anonymous users: Yes
    • Disallow login remotely: Yes
    • Remove test database and access to it: Yes
    • Reload privilege tables now?: Yes
  5. Open the  file and set  to grant the right permissions to the document root.
  6. Find the following block of code:

    Replace it with the following code:

  7. Restart the Apache server to apply the changes: sudo service apache2 restart
  8. Create a sample file in the document root: cd /var/www/html ...


Guarino Gabriel :

Gabriel Guarino has been working with Magento since 2009. As a Magento specialist he has achieved all the Magento certifications. He is an active member of the community and has been recognized as a Magento Master for 2017. He is the Chief Operating Officer of Wagento, a full-service Magento Solution Partner with offices in USA, Mexico, Bolivia, India, and Argentina. He is also a moderator in Magento forums, and he is a frequent speaker at Magento events.



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.