Showing results for 
Search instead for 
Did you mean: 

How to install Magento 2.4.2 community from it's Zip file in Ubunto 20.04LTS

How to install Magento 2.4.2 community from it's Zip file in Ubunto 20.04LTS

Once I created my Magento Account I was able to download the zip file for 2.4.2 for Ubuntu 20.04LTS and I cannot figure out how to install it.

I have read that there are two methods of installing Magento 2.4.2 one using Composer and the other via Terminal.

I am new to Ubuntu 2.4.2 and have not figured out how to install a zip file.

Any help will be appreciated.

Thank you


Re: How to install Magento 2.4.2 community from it's Zip file in Ubunto 20.04LTS

Hi, there's tutorial on how to install magento 2.4 on Magento website using composer, you may check it here:

  • Note 1: Magento 2.4.2 require elasticsearch, so remember to install it to ubuntu before installing Magento 2.4.2
  • Note2: there maybe some errors during installation, please post it in this forum, I will help you resolve it.


Good luck!

Re: How to install Magento 2.4.2 community from it's Zip file in Ubunto 20.04LTS

Thank you for your response.

I have elasticsearch installed and when I run composer, despite not providing the 2.4.2 version I am looking for and it shows it is trying to install 2.3, it then asks for a user Id and password and none of them work.


It is unclear as to what the user Id and password to use is.I tried the non root admin user, the root user, the MySQL and other component passwords etc (meaning all Id and passwords I created during the LAMP). No joy. Plus the ID and password for the root admin and non root admin.


The only DB I have not installed is Maria and I don’t know if I should dump everything I have installed and start over with all the same IDs and passwords (since you can never see the password you are installing in terminal). This is a Test localhost server for us to learn about Magento and how to manage it once we pick a web host.


Apache 2, Php 8.0, MySQL all working. The Php directories for magento are created. ElasticSearch is installed as is the addins for PHP. Composer 2 is installed and I ran it from the none root admin user. Just no idea as to what ID and Password to use when prompted by Composer.


Any help is appreciated



Re: How to install Magento 2.4.2 community from it's Zip file in Ubunto 20.04LTS

I am trying to use the ID Magento Assigns me and the long set of letters and numbers I am assigned and it does not work.


Should it be my screen name and the long key provided?


I was unable to get Composer to install Magento so I had some help to install from a tar file.

This is the command that a helper created for me;

php bin/magento setup:install --base-url=http://localhost/magento2.4/ --db-host=localhost --db-name=magento2 --db-user=magento --db-password=Ts#oBfy1s --admin-firstname=admin --admin-lastname=admin --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1


Should I have placed the Magento ID after admin-firstname and the long key after admin-password the long key?


What happened was the files to run the Magento program installed but in the Browser all I could see for lochalhost/magento2.4 was the directory of the install.


The person that was helping kind of messed up my UFW and the conf files that need to be modified. I have verified that apache, mysql and php are working however elasticsearch is not.

When I enter localhost/magento2.4 the directory for Magento comes up on the screen but I don't know how to activate Magento from the directory that comes up in my web browser;

Index of /magento2.4
[ICO] Name Last modified Size Description
[PARENTDIR] Parent Directory -
[TXT] 2021-01-19 16:04 749K
[TXT] COPYING.txt 2021-01-19 16:04 650
[ ] Gruntfile.js.sample 2021-01-19 16:04 2.9K
[TXT] LICENSE.txt 2021-01-19 16:04 10K
[TXT] LICENSE_AFL.txt 2021-01-19 16:04 10K
[TXT] 2021-01-19 16:04 700
[DIR] app/ 2021-02-26 21:30 -
[ ] auth.json.sample 2021-01-19 16:04 150
[DIR] bin/ 2021-02-26 21:30 -
[ ] composer.json 2021-01-07 16:59 2.6K
[ ] composer.lock 2021-01-19 16:04 935K
[DIR] dev/ 2021-02-26 21:30 -
[DIR] generated/ 2021-02-26 23:26 -
[ ] grunt-config.json.sample 2021-01-19 16:08 55
[DIR] lib/ 2021-02-26 21:30 -
[ ] magento-ce-2.4.2-2021-01-24-04-33-52.tar.gz 2021-02-26 21:25 126M
[ ] nginx.conf.sample 2021-01-19 16:08 6.7K
[ ] package.json.sample 2021-01-19 16:08 1.2K
[DIR] phpserver/ 2021-02-26 21:30 -
[DIR] pub/ 2021-01-19 16:08 -
[DIR] setup/ 2021-01-19 16:08 -
[DIR] var/ 2021-02-27 01:44 -
[DIR] vendor/ 2021-02-26 21:30 -
Apache/2.4.41 (Ubuntu) Server at localhost Port 80

The place I am stuck in is;

1.UFW Status

Status: active

To Action From
-- ------ ----
Apache ALLOW Anywhere
22/tcp ALLOW Anywhere
Anywhere ALLOW
Anywhere ALLOW
Anywhere ALLOW
Anywhere ALLOW
Anywhere ALLOW
Anywhere ALLOW
Anywhere ALLOW
Anywhere ALLOW
Apache (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)

Should I enable only Apache Allow? but Apache Full is no longer listed. How can I recover that?

2. ElasticSearch is not working. How do I fix?

3. How do I fix the conf files that need to be adjusted for Magento?

In line with that I am asked or need to put in servername and website but I don't have a website since this build is for a sandbox install on a linux pc for testing and learning Magento

4. Still confused as to the two keys to use (see above).


So at this point I am stuck with a broken elsticsearch, conf files that are not setup right, I am unsure of the Id and Password to use and my UFW is missing Apache Full but I have made progress Magento 2.4.2 is in its directory but I can't do anything nor enter the Public (Magento ID - which one screen name or ID assigned and the Private Key the long letter and number sequence I was provided.

Sorry this has mushroomed.

Thank you