{"id":12386,"date":"2023-04-17T11:50:34","date_gmt":"2023-04-17T11:50:34","guid":{"rendered":"https:\/\/cloudkul.com\/blog\/?p=12386"},"modified":"2024-12-31T08:56:17","modified_gmt":"2024-12-31T08:56:17","slug":"how-to-install-magento-2-in-aws","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/","title":{"rendered":"How to Install Magento 2 in AWS?"},"content":{"rendered":"\n<p>In this tutorial, we will learn how to set up <a href=\"https:\/\/cloudkul.com\/aws-hosting\/magento2-aws-hosting\/\">Magento 2 on AWS<\/a> Elastic Compute Cloud(EC2) server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is <strong>Magento<\/strong>?<\/h2>\n\n\n\n<p><strong><a href=\"https:\/\/webkul.com\/magento-development\/\">Magento 2<\/a><\/strong> is an eCommerce website platform owned by Adobe that specializes in eCommerce websites. <\/p>\n\n\n\n<p><strong>Magento 2<\/strong> users can access hundreds of unique features that help them connect with their customers and sell their products.<\/p>\n\n\n\n<p><strong>Requirements to install Magento 2.4.7 on AWS:<\/strong><\/p>\n\n\n\n<ul>\n<li>Ubuntu 22.04<\/li>\n\n\n\n<li>Web-server: Apache2<\/li>\n\n\n\n<li>System Requirements 4 GB of RAM, 4 CPU Cores, 25 GB of Disk space<\/li>\n\n\n\n<li>MySQL 8.0<\/li>\n\n\n\n<li>PHP 8.3<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<h2 class=\"wp-block-heading\"><strong>Contents<\/strong><\/h2>\n\n\n\n<p id=\"Install-Apache2\" style=\"text-decoration:underline\">Step1. Install Apache2<\/p>\n\n\n\n<p style=\"text-decoration:underline\">Step2. Install MySQL and create a database for Magento 2<\/p>\n\n\n\n<p style=\"text-decoration:underline\">Step3. Install PHP and the required extension<\/p>\n\n\n\n<p style=\"text-decoration:underline\">Step4. Install Elasticsearch<\/p>\n\n\n\n<p style=\"text-decoration:underline\">Step5. Install Composer<\/p>\n\n\n\n<p style=\"text-decoration:underline\">Step6. Download and Install Magento 2<\/p>\n\n\n\n<p style=\"text-decoration:underline\">Step7. Create and configure Vhost for apache2<\/p>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Install-Apache2\"><strong>Step 1: Install Apache2<\/strong><br><\/h2>\n\n\n\n<p>we\u2019ll start by <strong>updating<\/strong> the <strong>local package<\/strong> and installing apache2<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-text-align-left has-black-color has-text-color\">$ sudo apt-get update<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo apt-get install apache2 -y<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_apache.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1293\" height=\"384\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_apache.png\" alt=\"install_apache\" class=\"wp-image-18401\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Install MySQL And Create a Database For Magento 2.4.7<\/h2>\n\n\n\n<p>There are two <strong>cases<\/strong> to use MySQL&#8217;s database host:<\/p>\n\n\n\n<ol>\n<li>Localhost MySQL Database Server<\/li>\n\n\n\n<li><a href=\"https:\/\/cloudkul.com\/blog\/what-is-aws-rds\/\">AWS RDS<\/a>(Relational Database Service)<\/li>\n<\/ol>\n\n\n\n<p><strong>Case-1 &#8211; Localhost MySQL Database Server<\/strong><\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color has-medium-font-size\">$ sudo apt-get install mysql-server -y<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_mysql.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1284\" height=\"418\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_mysql.png\" alt=\"install_mysql\" class=\"wp-image-18402\" style=\"width:535px;height:212px\"\/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Login with the root user<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ mysql -u root -p<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ SELECT user,authentication_string,plugin,host FROM mysql.user;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ CREATE USER &#8216;magento2&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;your_secure_password&#8217;;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ ALTER USER &#8216;magento2&#8217;@&#8217;localhost&#8217; IDENTIFIED WITH mysql_native_password BY &#8216;your_secure_password&#8217;;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ CREATE DATABASE magento2;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ GRANT ALL PRIVILEGES ON magento2.* TO &#8216;magento2&#8217;@&#8217;localhost&#8217; WITH GRANT OPTION;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ exit<\/p>\n\n\n\n<p><\/p>\n<\/blockquote>\n\n\n\n<p><strong>Case-2<\/strong> <strong>&#8211;<\/strong> <strong>AWS RDS(Relational Database Service)<\/strong><\/p>\n\n\n\n<p>Create a new MySQL user for magento2 on your AWS server<\/p>\n\n\n\n<p>Login with the root user<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ mysql -u admin -p -h **yourRDShostendpoint**<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ SELECT user,authentication_string,plugin,host FROM mysql.user;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ CREATE USER &#8216;magento2&#8217;@&#8217;%&#8217; IDENTIFIED BY &#8216;your_secure_password&#8217;;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ ALTER USER &#8216;magento2&#8217;@&#8217;%&#8217; IDENTIFIED WITH mysql_native_password BY &#8216;your_secure_password&#8217;;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ CREATE DATABASE magento2;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ GRANT ALL PRIVILEGES ON magento2.* TO &#8216;magento2&#8217;@&#8217;%&#8217; WITH GRANT OPTION;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ exit<\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Install PHP And the Required Extension<\/h2>\n\n\n\n<p>In this step, we will install <strong>PHP,<\/strong> and Magento 2.4.7&nbsp;requires PHP 8.3.<\/p>\n\n\n\n<p>Run System updates.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo apt-get update&nbsp;<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/update_packages.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1143\" height=\"293\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/update_packages.png\" alt=\"update_packages\" class=\"wp-image-18403\" style=\"width:727px;height:113px\"\/><\/a><\/figure>\n\n\n\n<p>Add Ondrej sury <strong>PPA<\/strong> repository<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo add-apt-repository ppa:ondrej\/php<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_ppa-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1285\" height=\"628\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_ppa-1.png\" alt=\"install_ppa-1\" class=\"wp-image-18404\"\/><\/a><\/figure>\n\n\n\n<p>Install <strong>PHP<\/strong> 8.3 and packages with the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt-get install -y php8.3 php8.3-mysql php8.3-bcmath php8.3-gd php8.3-bz2 php8.3-xml php8.3-cli php8.3-common php8.3-intl php8.3-curl php8.3-zip php8.3-mbstring php8.3-soap libapache2-mod-php8.3<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_php-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"415\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_php-1-1024x415.png\" alt=\"install_php-1\" class=\"wp-image-18405\" style=\"width:710px;height:169px\"\/><\/a><\/figure>\n\n\n\n<p>Enable the Apache rewrite module<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo a2enmod rewrite<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo systemctl restart apache2<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/rewrite.png\"><img loading=\"lazy\" decoding=\"async\" width=\"569\" height=\"208\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/rewrite.png\" alt=\"rewrite\" class=\"wp-image-18406\" style=\"width:573px;height:113px\"\/><\/a><\/figure>\n\n\n\n<p>In the php.ini file, search and change the following values below.<\/p>\n\n\n<p>max_execution_time=18000<\/p>\n<p>max_input_time=1800<\/p>\n<p>memory_limit=4G<\/p>\n\n\n<p>save the file and reload the apache2 server.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo systemctl reload apache2<\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Install Elasticsearch<\/h2>\n\n\n\n<p>First, we will install <strong>Openjdk17<\/strong> (Java) as Elasticsearch runs on Java:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo apt install openjdk-17-jdk<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_elasticsearch.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1286\" height=\"346\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_elasticsearch.png\" alt=\"install_elasticsearch\" class=\"wp-image-18407\" style=\"width:442px;height:329px\"\/><\/a><\/figure>\n\n\n\n<p>The first step is to<strong>&nbsp;import the GPG key<\/strong>&nbsp;for Elasticsearch packages using the following command:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo curl -sSfL https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch | sudo gpg &#8211;no-default-keyring &#8211;keyring=gnupg-ring:\/etc\/apt\/trusted.gpg.d\/magento.gpg &#8211;import<\/p>\n<\/blockquote>\n\n\n\n<p>Then you need to&nbsp;<strong>add the Elasticsearch repository<\/strong>&nbsp;to the system using the following command:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo sh -c &#8216;echo &#8220;deb https:\/\/artifacts.elastic.co\/packages\/7.x\/apt stable main&#8221; &gt; \/etc\/apt\/sources.list.d\/elastic-7.x.list&#8217;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo chmod 666 \/etc\/apt\/trusted.gpg.d\/magento.gpg<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/el1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"185\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/el1-1024x185.png\" alt=\"Elasticsearch repository\" class=\"wp-image-12422\" style=\"width:626px;height:112px\"\/><\/a><\/figure>\n\n\n\n<p>After completing the above steps, you must first&nbsp;<strong>update the cache<\/strong>&nbsp;using the following commands. Then&nbsp;<strong>install Elasticsearch packages<\/strong>&nbsp;on the system:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo apt update<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo apt install elasticsearch -y<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/el2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1017\" height=\"357\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/el2.png\" alt=\"update elasticsearch install fro Magento\" class=\"wp-image-12423\" style=\"width:678px;height:237px\"\/><\/a><\/figure>\n\n\n\n<p>Finally, you can use the following commands&nbsp;to <strong>start<\/strong>&nbsp;and&nbsp;<strong>enable<\/strong>&nbsp;the Elasticsearch service:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo systemctl daemon-reload<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo systemctl enable elasticsearch.service<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo systemctl start elasticsearch.service<\/p>\n<\/blockquote>\n\n\n\n<p>Check the status of the elastic search service<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo systemctl status elasticsearch.service<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/el3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"404\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/el3-1024x404.png\" alt=\" elastic search service\" class=\"wp-image-12424\" style=\"width:657px;height:259px\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Install Composer<\/h2>\n\n\n\n<p>Installing Composer:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<pre class=\"wp-block-code\"><code>$ php -r \"copy('<a href=\"https:\/\/getcomposer.org\/installer\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/getcomposer.org\/installer<\/a>&nbsp;', 'composer-setup.php');\"<br>php -r \"if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\"<br>$ php composer-setup.php --version=2.7.0<br>$ php -r \"unlink('composer-setup.php');\"<br>$ sudo mv composer.phar \/usr\/local\/bin\/composer<br>$ sudo chmod +x \/usr\/local\/bin\/composer<\/code><\/pre>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_composer.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"395\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_composer-1024x395.png\" alt=\"install_composer\" class=\"wp-image-18408\" style=\"width:580px;height:227px\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Download and Install Magento 2.4.7<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ cd \/var\/www\/html<\/p>\n<\/blockquote>\n\n\n\n<p>Go to the webserver directory and run the command<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo composer create-project &#8211;repository-url=https:\/\/repo.magento.com\/ magento\/project-community-edition magento2<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_magento.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"220\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_magento-1024x220.png\" alt=\"install_magento\" class=\"wp-image-18409\"\/><\/a><\/figure>\n\n\n\n<p>After the above command, Magento authenticates you by Access Token where the user is the public access key and the password is the private access key.<\/p>\n\n\n\n<p>Below is an image of the access token for your reference.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/mag.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"535\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/mag-1024x535.png\" alt=\"Magento-2.4.5 On AWS\" class=\"wp-image-12387\" style=\"width:886px\"\/><\/a><\/figure>\n\n\n\n<p><strong>Now, set file permissions.<\/strong><\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ cd \/var\/www\/html\/magento2<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo find var generated vendor pub\/static pub\/media app\/etc -type f -exec chmod g+w {} +<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo find var generated vendor pub\/static pub\/media app\/etc -type d -exec chmod g+ws {} +<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo chown -R user_name:www-data .<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">$ sudo chmod u+x bin\/magento<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/screenshot_from_2024_10_15_19_38_16.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"198\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/screenshot_from_2024_10_15_19_38_16-1024x198.png\" alt=\"screenshot_from_2024_10_15_19_38_16\" class=\"wp-image-18410\"\/><\/a><\/figure>\n\n\n\n<p><strong>Install Magento<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ bin\/magento setup:install --base-url=http:\/\/PublicIP --db-host=**localhost*\/*yourRDShostendpoint** --db-name=magento2 --db-user=magento2 --db-password=**DBuserPassword** --admin-firstname=admin --admin-lastname=admin --admin-email=admin@admin.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America\/Chicago --use-rewrites=1<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\"><\/p>\n<\/blockquote>\n\n\n\n<p>Wait until the installation is successful and you will get the admin URL at last of completion.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/magento_setup.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"223\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/magento_setup-1024x223.png\" alt=\"magento_setup\" class=\"wp-image-18411\"\/><\/a><\/figure>\n\n\n\n<p>Note:<br>&#8211;base-url= use domain or server name\/IP as your need.<\/p>\n\n\n\n<p>Change your &#8211;db-host, &#8211;db-name, &#8211;db-user and &#8211;db-password as you created on your server<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 7: <\/strong>Create and configure Vhost for apache2<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo nano \/etc\/apache2\/sites-available\/magento.com.conf&nbsp;<\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>&lt;VirtualHost *:80&gt;<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>ServerAdmin webmaster@localhost<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>DocumentRoot \/var\/www\/html\/magento2\/pub<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ServerName&nbsp;localhost<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>ErrorLog ${APACHE_LOG_DIR}\/error.log<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>CustomLog ${APACHE_LOG_DIR}\/access.log combined<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>&lt;Directory \"\/var\/www\/html\"&gt;<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>AllowOverride all<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>&lt;\/Directory&gt;<\/code><\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>&lt;\/VirtualHost&gt;<\/code><\/p>\n<\/blockquote>\n\n\n\n<p>In the above code use the server name as you need. Save and exit, then<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-black-color has-text-color\">$ sudo a2ensite magento.com.conf<br>$ sudo systemctl restart apache2<\/p>\n<\/blockquote>\n\n\n\n<p>Browse your URL http:\/\/PublicIP then you get this type of luma page front as in the below image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/luma.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"436\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2022\/12\/luma.jpg\" alt=\"Magento-2.4.5 On AWS\" class=\"wp-image-12388\"\/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">For Magento 2 Elastic search, please follow the &#8211;<\/h3>\n\n\n\n<h6 class=\"wp-block-heading\">Our Cloudkul Blogs<\/h6>\n\n\n\n<p><strong><a href=\"https:\/\/cloudkul.com\/features\/elastic-search-fluentd-kibana\/\">Elasticsearch, Fluentd, and Kibana (EFK)&nbsp;<\/a><\/strong><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/cloudkul.com\/blog\/setting-elasticsearch-logstash-kibana-centralized-logging\/\">Setting up Elasticsearch, Logstash, and Kibana for centralized logging<\/a><\/strong><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/cloudkul.com\/blog\/managing-and-monitoring-magento-2-logs-with-kibana\/\">Managing and Monitoring Magento 2 logs with Kibana<\/a><\/strong><\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Our store modules &#8211; <\/h6>\n\n\n\n<p><strong><a href=\"https:\/\/store.webkul.com\/Magento2-Elasticsearch.html\">Magento 2 Elasticsearch<\/a><\/strong><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/store.webkul.com\/magento2-efk-setup.html\">EFK Setup for Magento 2<\/a><\/strong><\/p>\n\n\n\n<p><strong><em>You may also visit our Magento development services and quality&nbsp;<\/em><\/strong> <strong><a href=\"https:\/\/store.webkul.com\/Magento-2.html\">Magento 2 Extensions<\/a><\/strong>.<\/p>\n\n\n\n<p><strong><em>For further help or queries, please&nbsp;<a href=\"https:\/\/cloudkul.com\/contact\/\">contact<\/a>&nbsp;us or raise a&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\">ticket<\/a>.<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will learn how to set up Magento 2 on AWS Elastic <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[87,86,20],"tags":[568,791,790,28,792],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Magento 2 in AWS? [ Beginners Guide ]<\/title>\n<meta name=\"description\" content=\"An easy way to install Magento 2 in 5 easy steps on your AWS server. This guide will help you in your installations.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Magento 2 in AWS? [ Beginners Guide ]\" \/>\n<meta property=\"og:description\" content=\"An easy way to install Magento 2 in 5 easy steps on your AWS server. This guide will help you in your installations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-17T11:50:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-31T08:56:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_apache.png\" \/>\n<meta name=\"author\" content=\"Sarthak Dixit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/\",\"name\":\"How to Install Magento 2 in AWS? [ Beginners Guide ]\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2023-04-17T11:50:34+00:00\",\"dateModified\":\"2024-12-31T08:56:17+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/d70c0690be3b2dc2cb3b82c87f774396\"},\"description\":\"An easy way to install Magento 2 in 5 easy steps on your AWS server. This guide will help you in your installations.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Magento 2 in AWS?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/d70c0690be3b2dc2cb3b82c87f774396\",\"name\":\"Sarthak Dixit\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1147bc092d035a4357905655616aeb3c?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1147bc092d035a4357905655616aeb3c?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Sarthak Dixit\"},\"url\":\"https:\/\/cloudkul.com\/blog\/author\/sarthakdixit-cloud642\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Magento 2 in AWS? [ Beginners Guide ]","description":"An easy way to install Magento 2 in 5 easy steps on your AWS server. This guide will help you in your installations.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Magento 2 in AWS? [ Beginners Guide ]","og_description":"An easy way to install Magento 2 in 5 easy steps on your AWS server. This guide will help you in your installations.","og_url":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/","og_site_name":"Cloudkul","article_published_time":"2023-04-17T11:50:34+00:00","article_modified_time":"2024-12-31T08:56:17+00:00","og_image":[{"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2024\/10\/install_apache.png"}],"author":"Sarthak Dixit","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/","url":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/","name":"How to Install Magento 2 in AWS? [ Beginners Guide ]","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2023-04-17T11:50:34+00:00","dateModified":"2024-12-31T08:56:17+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/d70c0690be3b2dc2cb3b82c87f774396"},"description":"An easy way to install Magento 2 in 5 easy steps on your AWS server. This guide will help you in your installations.","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-in-aws\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install Magento 2 in AWS?"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/d70c0690be3b2dc2cb3b82c87f774396","name":"Sarthak Dixit","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1147bc092d035a4357905655616aeb3c?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1147bc092d035a4357905655616aeb3c?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Sarthak Dixit"},"url":"https:\/\/cloudkul.com\/blog\/author\/sarthakdixit-cloud642\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/12386"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=12386"}],"version-history":[{"count":197,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/12386\/revisions"}],"predecessor-version":[{"id":19338,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/12386\/revisions\/19338"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=12386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=12386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=12386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}