Menu Close
    Hire us Request quote Reading list Switch to dark mode

    Installation of Magento2 on Ubuntu

    Pre Installation Requirements-:

    1. LAMP should be installed on the system with mysql-server-5.6 (Updated version).

    2. MOD_REWRITE should be enabled on the system.

    3. All Files of magento2 should have 600 and directories have 700 permissions.

    4. Apache user and the owner of Magento2 directory should be the same. (Magento2 should run with the apache user).

    5. If you have apache root directory setup on some different location other than “/var/www” then you have to replace the /var/www with your apache root directory.

    Installation Steps -:

    1. LAMP installation.

    2. Enable mod_rewrite by executing command in terminal

    3. Now open the apache2.conf file

    and search for something like given below-:

    now replace the above as follows (do not use {})-:

    4. Restart the apache service by

    5. Now install composer by executing given below commands in your terminal.

    . . .
    Subscribe Articles

    Just enter your email below to subscribe and receive weekly updates about the most interesting similar articles.

    You need to accept conditions to receive letters.
    You've Subscribed!

    Share article via

    . . .

    6. Download the magento2 from git by executing given below commands-:

    Now if your apache user and owner of magento2 file is same then you can skip point 7 and 8

    7. Change the ownership of magento2 by executing given below command for example-:

    you have username “magtest” then your command should be

    8. Now change the user of apache server for example you have the username “magtest”.

    open the envvars file by executing-:

    now find “export APACHE_RUN_USER=www-data” and replace the www-data with “magtest” user

    then it should look like

    export APACHE_RUN_USER=magtest

    save the file by ctrl+x

    9. Restart the apache server by executing

    10. Now install the magento2 by accessing the URL-: http://localhost/magento2


    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again