admin/ June 3, 2018/ Linux, Magento2/ 0 comments


Magento is an open source, enterprise-class eCommerce platform with 100,000+ merchants using it worldwide. More than a 1,000 Magento stores come online every day! These merchants depend heavily on the ecosystem of third-party developers, such as you, to build Magento implementations, customizations, and extensions. The successful developers in Magento’s vibrant ecosystem have a strong knowledge of the Magento platform as well as eCommerce. Check out Magento to learn more about the platform.

To install on Ubuntu 18.04 server.

There are just 5 steps to install Magento on Ubuntu Server 18.04 LTS.

Step 1-: Apt update packages and install apache2

sudo apt update && sudo apt upgrade -y && apt install -y apache2 

Step 2-: Install Php ondrej repository and install php required modules.

sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo  apt-get install -y php7.0 libapache2-mod-php7.0 php7.0 php7.0-common \
             php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl \
              php7.0-mbstring php7.0-zip php7.0-bcmath php7.0-iconv php7.0-soap

Step 3-: Download the magento latest release and extract at /var/www

cd /opt/ && wget && tar -xvf 2.2.4.tar.gz -C /var/www/
sudo rm -rf /var/www/html
sudo mv /var/www/magento2-2.2.4 /var/www/html

Set the permission required.

sudo chmod -R 775 /var/www/html/ && chmod -R 777 /var/www/html/generated /var/www/html/pub /var/www/html/var 
sudo  chown -R www-data:www-data /var/www/html/

Step 4-: Install composer for magento project at /var/www/html/

sudo apt install -y composer
cd /var/www/html && composer install

Step 5-: Get the deb package for MySQL-Server 5.7 and install MySQL server.

cd /opt/ && wget && sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb

sudo apt update && apt install -y mysql-server

It will prompt for password. You can set root password for MySQL-server.

Step 6-: Enable rewrite module on apache and configure for AllowOverride All

sudo a2enmod rewrite

Open the file at /etc/apache2/apache2.conf change the section AllowOverride All

 Options Indexes FollowSymLinks
 AllowOverride All
 Require all granted

sudo systemctl restart apache2

Now visit to the url-: or http://yourdomain/setup/#/landing-install
Follow the instruction and install the Magento2 on Linux Ubuntu 18.04.

Share this Post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.