How to install magento

How to install magento

Quick start install

We use Composer to manage Magento components and their dependencies. Using Composer to get the Magento software metapackage provides the following advantages:

You can also download an archive file for a specific version of Magento in either ZIP or TAR format. Installing Magento from an archive lacks the advantages of using Composer. Contributing developers should use the git-based installation method.

Prerequisites

Before you continue, you must do the following:

Log in as file system owner

Learn about ownership, permissions, and the file system owner in our Overview of ownership and permissions topic.

To switch to the file system owner:

Log in to the Magento server as, or switch to, a user with permissions to write to the Magento file system. See switch to the file system owner.

If you use the bash shell, you can use the following syntax to switch to the file system owner and enter the command at the same time:

If the file system owner does not allow logins, you can do the following:

Because shells have differing syntax, consult a reference like unix.stackexchange.com.

Sample bash shell for CentOS:

Optionally, you can run the commands in the following ways:

In addition to the command arguments discussed here, see Common arguments.

Get the metapackage

To get the Magento metapackage:

Create a new Composer project using the Magento Open Source or Adobe Commerce metapackage.

Magento Open Source

Adobe Commerce

When prompted, enter your Magento authentication keys. Public and private keys are created and configured in your Commerce Marketplace.

See Troubleshooting for help with more errors.

Adobe Commerce customers can access 2.4.x and 2.3.x patches two weeks before the General Availability (GA) date. Pre-release packages are available through Composer only. You cannot access pre-releases on the Magento Portal or GitHub until GA. If you cannot find these packages in Composer, contact Adobe Commerce Support.

Minor releases contain new features, quality fixes, and security fixes. Use Composer to specify a minor release. For example, to specify the Adobe Commerce 2.4.3 metapackage:

Quality patches primarily contain functional and security fixes. However, they can also sometimes contain new, backward-compatible features. Use Composer to download a quality patch. For example, to specify the Adobe Commerce 2.4.3 metapackage:

Security patches contain security fixes only. They are designed to make the upgrade process faster and easier.

Set file permissions

You must set read-write permissions for the web server group before you install the Magento software. This is necessary so that the command line can write files to the Magento file system.

Install Magento

You must use the command line to install Magento.

For a full description of the CLI install options, refer to Install the Magento software from the command line.

Command summary

To display a complete list of commands, enter:

To get help for a particular command, enter:

The following table summarizes the available commands. Commands are shown in summary form only. For more information about a command, click the link in the Command column.

CommandDescriptionPrerequisites
magento setup:installInstalls the Magento softwareNone
magento setup:uninstallRemoves the Magento software.Magento software installed
magento setup:upgradeUpdates the Magento software.Deployment configuration
magento maintenance: Enables or disables maintenance mode (in maintenance mode, only exempt IP addresses can access the Admin or storefront).Magento software installed
magento setup:config:setCreates or updates the deployment configuration.None
magento module: Enable or disable modules.None
magento setup:store-config:setSets storefront-related options, such as base URL, language, timezone, and so on.Deployment configuration
Database (simplest way is to use magento setup:upgrade)ВВ
magento setup:db-schema:upgradeUpdates the Magento database schema.Deployment configuration
magento setup:db-data:upgradeUpdates the Magento database data.Deployment configuration
magento setup:db:statusChecks if the database is up-to-date with the code.Deployment configuration
magento admin:user:createCreates a Magento administrator.All of the following:

Enable at minimum the Magento_User and Magento_Authorization modules

Database (simplest way is to use magento setup:upgrade)

magento listLists all available commands.None
magento helpProvides help for the specified command.None

Common arguments

The following arguments are common to all commands. These commands can be run either before or after the Magento software is installed:

Hooray! You’ve completed the quick install. Need more advanced help? Check out our Advanced install guide.

Get the software

You are among the 240,000 merchants worldwide who put their trust in our eCommerce software. We have gathered some information to help you get started with Magento and with your Magento installation.

We have some resources here to help get you started using the eCommerce platform of the future—Magento 2.

How to get the Magento software

Check the availability of exciting new features and releases, and learn how you can obtain them, on our Magento product availability page.

Consult the following table for getting started with installing Magento Open Source or Adobe Commerce.

Wants full control over all components installed, has access to the Magento server, highly technical, might repackage Magento Open Source with other components.

Contributes to the Magento codebase, files bugs, and customizes the Magento software. Highly technical, has their own Magento development server, understands Composer and GitHub.

You cannot use Magento in a production environment.

Useful information

Use the links on the left side of the page to navigate topics in each part of the installation.

Required server permissions

UNIX systems require root privileges to install and configure software like a web server, PHP, and so on. If you need to install this software, make sure you have root access.

You should not install the Magento software in the web server docroot as the root user because the web server might not be able to interact with those files.

You’ll also need root privileges to create the file system owner and add that owner to the web server’s group. You’ll use the file system owner to run any commands from the command line and to set up the Magento cron job, which schedules tasks for you.

How to Install Magento?

By How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magentoPriya Pedamkar

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Introduction to Install Magento

The following article provides an outline for How to Install Magento? Magento is open-source; e-commerce setup built using the PHP programming language. The software and the related setup were initially developed by Varien Inc. (a US-based company). The initial release was on 31 st March 2008, with a stable release of 2.3.0 (as of Nov 2018). Apart from PHP, Magento employs MySQL, MariaDB (an RDBMS system), and also the ZEND framework.

Magento provides two distinct platforms for operations, namely:

Web development, programming languages, Software testing & others

The community edition is free of cost, built with multiple features. Since this is open-source, any user can extend its functionality with the new plug-in.

Enterprise edition, unlike the community, is not free but has some more and advanced features built. Designed for large business infrastructure requirements, the Magento enterprise edition comes with installation support, technical support, usage policy, and troubleshooting.

How to Install Magento?

Before we start on how to install Magento discussion, let see what XAMPP; why do we need this to install Magento?

XAMPP is a kind of software using which a user can develop a local web development setup. This software converts our PC into a server. To make this definition more relatable, let’s see one scenario.

“Mr. A has done with some web development coding after a couple of stressful months. Now what?

So, he needs a server to host and see how the development looks like and what can be the changes or correction needed before the final go. In this case, Mr. A needs localhost, which means a place where he can see his work.”

XAMPP provides this platform, and with this, a user can transfer the coding and data to reflect in the localhost server.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

System requirement for Magento setup, Navigate to this link; we have also presented the screen related to system requirement.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Just select the version that you want to install and a detailed list of technical requirements like:

Now go to Google.com and type “Magento 2 download” you will get a number of download links, prefer the Magento official website.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Now comes the download page.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

If you scroll down to the above-mentioned page, you will see some download setup details.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

After you select the zip file, click on the ‘Download’ button, this will make a screen pop out on your screen.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

If you have already made an account in Magento, use those login credentials; if not, click the ‘Create an Account” button once the download is complete the open the location directory.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Once the Magento zip file is available, copy the file to your XAMPP folder.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

In the above image, we can see there is a XAMPP folder, and in the folder, there is the ‘htdocs’ folder. We have to copy the download file of Magento in this htdocs folder.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

After extraction normal folder is available, you just have to rename it (to easily differentiate from the rest).

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Now, move to the localhost server (MyPhp server) page to create the database. Here also you have to rename the newly created database as ‘magento2’.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Now your database is created. Navigate to localhost2.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

For the serac result of localhost/magento2 (created and named by the user), you will get your server details screen.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Only the setup screen is left from here onwards. Note for users if this you arrive at this screen means you have the only setup left before the actual Magento usage begins.

Now, a user has to click on the “Agree and Setup Magento” button, and the setup page will appear.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

A user has to follow the above steps sequentially – the first one is “Readiness Check.”

You have to click on the “Start Readiness Check” button; here, the system does a thorough check of the requirements, environments of PHP, related extensions and permissions.

If you have all the updated requirements, you will get the below screen to move to the next step.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

With this click on the “Next” button, you will get a database screen.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

A user has to fill in the database details:

Now a user has to click on the ‘Next button to move in the configuration steps. Next comes is the ‘Web Configuration’ page. Here a user has to mention his store address (means the address that drives customers to your business). You also have to mention one ‘Admin’ password. Since every page has an admin for final changes to reflect in the front store location. Provide a suitable password in the password field and click “Next”.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Now a user will get a ‘Customize store’ screen.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Customize your store by providing details like:

We do not have to make any changes to this screen; let the default value be stored in it and click the ‘Next button.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

You will land on the ‘Create Admin Account’ page.

Provide admin details:

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Once you click the INSTALL button, installation begins.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Once the installation is complete, you have to log in to your admin account to make the e-commerce business launch.

How to install magento. Смотреть фото How to install magento. Смотреть картинку How to install magento. Картинка про How to install magento. Фото How to install magento

Recommended Articles

This has been a guide to How to Install Magento? Here we have discussed the different steps to install Magento. You may also look at the following articles to learn more –

All in One Software Development Bundle (600+ Courses, 50+ projects)

How to install Magento 2?

There are several ways to install Magento 2:

In this step-by-step Magento installation guide, we will walk you through the entire installation process, covering all the methods.

Important note: Check Magento system requirements before installing.

Method 1. Using Composer to Install Magento (Metapackage)

Installing Magento via composer has several advantages:

So what are the steps of Magento 2 installation via Composer?

Step 1. Pre-launch

Check the following: whether you set up the server and created the Magento file system owner to run any commands from the command line and to set up a Magento cron job.

Then complete prerequisites and install the composer.

Finally, get authentication keys in your Magento account.

Step 2. Log in as file system owner

Log in to the Magento server as the file system owner, or switch to a user with permissions to write to the Magento file system.

If you use the bash shell, use the following directive to switch to the Magento file system owner and enter the command at the same time:

If you want to run Magento commands from any directory, add /bin to your system PATH. Here is the CentOS bash shell sample:

Step 3. Get the package

To get the Magento metapackage, do the following:

Magento Open Source:

Magento Commerce:

Enter your Magento authentication keys when prompted.

Now, the setup wizard will help you to end the installation process.

Pro tip: If you want to install sample data, do the following:

Step 1. Go to the Magento 2 root directory.

Step 2. Run the following command:

After that, the composer.json file will be updated, and the sample data will be installed.

In case you need to re-run the Magento compile command, use the following command:

Be prepared for the fact that you may have to wait a bit.

Method 2. Contributor Magento install

Warning: This method is for people who contribute to the Magento Open Source codebase. To use this method, you should understand Composer and Git commands and can update system software and Magento extensions using them.

Let’s see how to install Magento 2 via Github.

Installing Magento 2 via Github without sample data

Step 1. Clone the Magento 2 repository from Github reps, or download the required release on the Github releases page.

Step 2. Create a new empty directory using this command:

Step 3. After the deployment is complete, enter the command:

Step 4. Install Magento 2. Here you can see an example of the Magento 2 installing command.

Example is relevant if Magento install directory is magento2ee, the db-host is on the same machine (localhost), and that the db-name, db-user, and db-password are all magento:

Open the browser and visit your local link. Done!

But what if you want to install M2 with sample data?

Installing Magento 2 via Github with sample data

Step 1. Go to the webroot (not Magento 2).

Step 3. Then, navigate to the cloned Magento 2 directory and run the command:

Now, symlinks to your Magento 2 installation are created.

Step 4. Next, you need to set ownership and permissions for Linux machine:

Step 5. Clear cache by going to the Magento 2 var/ folder and running the following command:

Step 6. Use the following commands to install sample data:

Method 3. How to install Magento 2 via ZIP archive?

This is a relatively easy installation method, but it lacks many of the benefits of using Composer.

Step 1. Navigate to the Magento download page and download the latest Magento 2 source code package in the needed archive type (choose whether sample data is needed).

Step 2. Upload the archive to your server, then extract it to the Magento root directory.

You can use the unzip/extract function to extract the Magento package for shared hosting. Or use the following commands if you are running on your server:

Then,add write permission for var, app/etc, pub folders:

Step 3. Start the Magento installation wizard and walk through the installation process.

Below you will find some more useful info on Magento 2 installation on Ubuntu and the localhost with XAMPP.

How to set up Magento 2 on Ubuntu?

Step 1. Firstly, check Magento 2 requirements.
Step 2. After that, get the Magento software by using Composer or by getting the archive.
Step 3. Now you have to change permissions to read-write to install Magento files with the use of the command line.
Step 4. Next, install M2 on Ubuntu. Enter the following command in the command line:

Step 5. Check that everything works. Open your website backend and try to log in to the admin panel with the admin’s username and password.

You can find more information on this Magento 2 setup method with all samples of the code on the how to install Magento 2 on Ubuntu page.

Installing Magento on the localhost with XAMPP

Step 1. Download and install XAMPP.

Step 2. Navigate to the Magento website and get the package.

Step 3. Go to the xampp/htdocs and make the folder called Magento.

Step 4. Unzip the downloaded archive in the Magento folder, open the XAMPP Control Panel, and click the Config in the Apache section.

Step 5. Choose the PHP (php.ini) from the shown menu.

Step 6. Find these lines: extension=php_intl.dll \ extension=php_xsl.dll. Remove the ; sign at the beginning in an open document.

Step 7. Return to the XAMPP Control Panel > run the Apache and MySQL.

Step 8. Write localhost/magento2 in the browser and choose the Agree and Setup Magento option.

Step 9. After that, you have to complete 6 steps of the Magento 2 installation process.

Step 10. Open your browser, write localhost/magento, and localhost/magento/admin. Check if everything works fine.

For more information on this method, go to the how to install Magento 2 on the localhost with XAMPP page, which describes each step in detail.

The Magento installation process is very complex, as is the installation of extensions. To quickly master the process of installing modules, check out the How to install Magento 2 Amasty extensions article. Or you can use Magento 2 Installation Service to avoid all possible technical issues and Magento installation problems with the help of our experts at the very beginning.

Install the Magento software

Before you start your installation

Before you begin, complete the following steps:

Verify that your system meets the requirements discussed in Magento system requirements.

Complete all prerequisite tasks.

Complete the first installation steps. See Your install or upgrade path.

After you log in to the Magento server, switch to the file system owner.

You must install Magento from its bin subdirectory.

You can run the installer multiple times with different options to complete installation tasks like the following:

Install in phases—For example, after you configure your web server for Secure Sockets Layer (SSL), you can run the installer again to set SSL options.

Correct mistakes in previous installations.

Install Magento in a different database instance.

By default, the installer does not overwrite the Magento database if you install the Magento software in the same database instance. You can use the optional cleanup-database parameter to change this behavior.

Completely secure installation

To use Secure Sockets Layer (SSL), also referred to as HTTPS, for both the Commerce Admin and the storefront, you must set all of the following parameters:

More details about these parameters can be found later in this topic.

Installer help commands

You can run the following commands to find values for some required arguments:

User needsDescriptionHigh-level installation and upgrade stepsGet started link
Installer argumentCommand
Languagemagento info:language:list
Currencymagento info:currency:list
Time zonephp magento info:timezone:list

If an error displays when you run these commands, verify that you updated installation dependencies as discussed in Update installation dependencies.

Install the Magento software from the command line

The install command uses the following format:

The following tables describe the installation option names and values. For example installation commands. see Sample localhost installations.

Any options that contain spaces or special characters must be enclosed in either single or double quotes.

Admin credentials:

The following options specify the user information and credentials for the Admin user.

In Adobe Commerce version 2.2.8 and later, you can create the Admin user during or after installation. If you create the user during installation, all admin credential variables are required. See Sample localhost installations.

Site, database, and RabbitMQ configuration options:

NameValueRequired?
—base-urlBase URL to use to access your Admin and storefront in any of the following formats:

Note: The scheme (http:// or https://) and a trailing slash are both required.

is the docroot-relative path in which to install the Magento software. Depending on how you set up your web server and virtual hosts, the path might be magento2 or it might be blank.

We recommend a random URI for security purposes. A random URI is harder for hackers or malicious software to exploit.

The URI displays at the end of the installation. You can display it later at any time using the magento info:adminuri command.

If you choose to enter a value, we recommend you not use a common word like admin, backend, and so on. The Admin URI can contain alphanumeric values and the underscore character ( _ ) only.

No
—db-hostUse any of the following:

— The database server’s fully qualified hostname or IP address.

— localhost (default) or 127.0.0.1 if your database server is on the same host as your web server.localhost means the MySQL client library uses UNIX sockets to connect to the database. 127.0.0.1 causes the client library to use the TCP protocol. For more information about sockets, see the PHP PDO_MYSQL documentation.

Note: You can optionally specify the database server port in its hostname like www.example.com:9000

Yes
—db-nameName of the Magento database instance in which you want to install the Magento database tables.

In that case, use a prefix to identify the Magento tables for this installation. Some customers have more than one Magento instance running on a server with all tables in the same database.

The prefix can be a maximum of five characters in length. It must begin with a letter and can include only letters, numbers, and underscore characters.

This option enables those customers to share the database server with more than one Magento installation.

No
—db-ssl-keyPath to the client key.No
—db-ssl-certPath to the client certificate.No
—db-ssl-caPath to the server certificate.No
—languageLanguage code to use in the Admin and storefront. (If you have not done so already, you can view the list of language codes by entering magento info:language:list from the bin directory.)No
—currencyDefault currency to use in the storefront. (If you have not done so already, you can view the list of currencies by entering magento info:currency:list from the bin directory.)No
—timezoneDefault time zone to use in the Admin and storefront. (If you have not done so already, you can view the list of time zones by entering magento info:timezone:list from the bin directory.)No
—use-rewrites1 means you use web server rewrites for generated links in the storefront and Admin.

0 disables the use of web server rewrites. This is the default.

No
—use-secure1 enables the use of Secure Sockets Layer (SSL) in storefront URLs. Make sure your web server supports SSL before you select this option.

0 disables the use of SSL with Magento. In this case, all other secure URL options are assumed to also be 0. This is the default.

No
—base-url-secureSecure base URL to use to access your Admin and storefront in the following format: http[s]:// / /No
—use-secure-admin1 means you use SSL to access the Admin. Make sure your web server supports SSL before you select this option.

0 means you do not use SSL with the Admin. This is the default.

No
—admin-use-security-key1 causes the Magento software to use a randomly generated key value to access pages in the Admin and in forms. These key values help prevent cross-site script forgery attacks. This is the default.

0 disables the use of the key.

No
—session-saveUse any of the following:

— db to store session data in the database. Choose database storage if you have a clustered database; otherwise, there might not be much benefit over file-based storage.

— files to store session data in the file system. File-based session storage is appropriate unless the Magento file system access is slow, you have a clustered database, or you want to store session data in Redis.

— redis to store session data in Redis. If you will be using Redis for default or page caching, Redis must be already installed. See Use Redis for session storage for additional information about configuring support for Redis.

No
—keyIf you have one, specify a key to encrypt sensitive data in the Magento database. If you don’t have one, Magento generates one for you.Yes
—cleanup-databaseTo drop database tables before installing the Magento software, specify this parameter without a value. Otherwise, the Magento database is left intact.No
—db-init-statementsAdvanced MySQL configuration parameter. Uses database initialization statements to run when connecting to the MySQL database. Consult a reference similar to this one before you set any values.

Lock configuration options:

NameValueRequired?
—lock-providerLock provider name.

The default lock provider: db

No
—lock-db-prefixThe specific db prefix to avoid lock conflicts when using db lock provider.

The default value: NULL

No
—lock-zookeeper-hostHost and port to connect to Zookeeper cluster when you use zookeeper lock provider.

Consumers configuration options:

To enable or disable modules after installing Magento, see Enable and disable modules.

What is sensitive data?

Magento uses your encryption key to encrypt the following:

Magento does not encrypt:

Sample localhost installations

The following examples show the commands to complete install Adobe Commerce locally with various options.

Example 1—Basic installation with admin user account

The following example installs Magento with the following options:

The Magento software is installed in the magento2 directory relative to the web server docroot on localhost and the path to the Admin is admin ; therefore:

Your storefront URL is http://127.0.0.1

The database server is on the same host as the web server.

Uses server rewrites

The Magento administrator has the following properties:

Messages similar to the following display to indicate a successful installation:

Example 2— Basic install without admin user account

In Adobe Commerce version 2.2.8 and later, you have the option to install Magento without creating the Magento administrator user as shown in the following example.

Messages like the following display if the installation is successful:

After installation you can create an admin user using the admin:user:create command: Create or edit an administrator

Example 3—Install with additional options

The following example installs Magento with the following options:

The Magento software is installed in the magento2 directory relative to the web server docroot on localhost and the path to the Admin is admin ; therefore:

Your storefront URL is http://127.0.0.1

The database server is on the same host as the web server.

The Magento administrator has the following properties:

You must enter the command either on a single line or, as in the preceding example, with a \ character at the end of each line.

Messages like the following display if the installation is successful:

If you have one user account to access the Magento server, see Optionally set a umask.

This type of setup is typical for shared hosting.

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *