Magento Installation
Welcome to this Magento 2 installation guide! This guide will help you install Magento 2 on your local machine using our CLI.
We created this guide to help you get up and running quickly. If you already have a Magento 2 instance for development, you can skip this guide.
Prerequisites
Before you start, make sure you have the following tools installed:
- Node.js - Node.js installed.
- Docker - We recommend using Docker Desktop.
- Magento Marketplace account - to get API credentials for your Magento instance.
Installation using CLI
This is a beta version of the CLI. If you encounter any issues, please report them on GitHub. Thanks for helping us make the CLI better!
Installation steps
Supported OS: MacOS, Linux, Windows (using WSL2) If you are using Windows, please proceed with the Manual Installation guide.
Installation using CLI is a quick and easy way to get your project up and running. It will install Alokai and Magento 2 instance locally using Docker. It will also generate sample data for your store (optional).
The CLI will guide you through the installation process and ask you to provide the required information.
The CLI may take up to 10 minutes to complete the installation process. Please be patient.
1
Run CLI to create a new project
npx @vue-storefront/cli m2-only
Under the hood, the CLI uses markshust/docker-magento
to install a Magento 2 instance locally using Docker.
2
Enter project name
When prompted, enter the name of your project. This name will be used as a directory name for your project.
ā Welcome to Vue Storefront 2 CLI! š
|
ā š Please provide a name for the Magento 2 directory
| magentolocal
Avoid using special characters and spaces in the project name.
3
Provide Magento 2 API credentials
When prompted, provide your Magento 2 API credentials. You can create them by following the Get your authentication keys guide.
If you're logged in to your Adobe marketplace account, go to Adobe Merchant Center - Magento 2 Access Keys page, to generate the access keys.
When you see following prompt, enter your public and private key information.
ā š Please provide your Magento access keys
|
ā š Magento access key:
| <YOUR_MAGENTO_PUBLIC_KEY>
ā š Magento secret key
| <YOUR_MAGENTO_PRIVATE_KEY>
4
Provide Magento 2 instance URL
When prompted, provide the URL of your Magento 2 instance:
ā š Magento domain name
| <YOUR_MAGENTO_DOMAIN_NAME>
This URL will be used to connect Alokai to your Magento 2 instance - by default, the URL of the local Magento instance is magento.test
. Meaning that your Alokai application can use the https://magento.test/graphql
endpoint to communicate with Magento 2.
The CLI will start installing Magento 2 instance locally using Docker. It will take a few minutes.
You will be asked to provide system administrator password to allow Docker to run commands on your machine.
5