- Magento 2 Development Quick Start Guide
- Branko Ajzele
- 569字
- 2021-08-13 15:47:32
Installing Magento
The Magento platform comes in two flavors:
- Magento Open Source: The free version, targeting small businesses
- Magento Commerce: The commercial version, targeting small, medium, or enterprise businesses
The difference between the two comes mainly in the form of extra modules that were added to the Commerce version, whereas all the coding concepts and core features remain the same. It goes to say that any knowledge we obtain through following Magento Open Source examples is fully applicable to anyone working on Magento Commerce.
There are several ways that we can obtain source files for Magento Open Source:
- Source file archive (.zip, .tar.gz, .tar.bz2), available at https://magento.com
- Git repository, available at https://github.com/magento/magento2
- Composer repository, available at https://repo.magento.com
Obtaining source files via a CLI from the composer repository is our preferred method. Assuming we are within the empty <PROJECT_DIR> directory, we can kick off this process via the following command:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .
The dot (.) at the end of this command this tells the composer to pull the files into a current directory.
Once the Composer process is finished, we can start installing Magento. There are two ways we can install Magento:
- Via the Web Setup Wizard: The graphical, browser-based process
- Via the command line: The command-line-based process
Knowing how to install Magento via the command line is an essential skill in day-to-day development, as the majority of development requires the developer to tackle various bin/magento commands—not to mention the command line approach is somewhat faster and easily scripted.
Let's install Magento with the built-in php bin/magento setup:install command and a few of the required installation options as follows:
php bin/magento setup:install \
--db-host="/Applications/MAMP/tmp/mysql/mysql.sock" \
--db-name=magelicious \
--db-user=root
--db-password=root \
--admin-firstname=John \
--admin-lastname=Doe \
--admin-email=john@magelicious.loc \
--admin-user=john \
--admin-password=jrdJ%0i9a69n
After the preceding command has been executed, we should begin to see console progress, starting with something like the following:
Starting Magento installation:
File permissions check...
[Progress: 1 / 513]
Required extensions check...
[Progress: 2 / 513]
Enabling Maintenance Mode...
[Progress: 3 / 513]
Installing deployment configuration...
[Progress: 4 / 513]
Installing database schema:
Schema creation/updates:
Module 'Magento_Store':
[Progress: 5 / 513]
While it might take up to a few minutes, a successful installation should end with a message that's similar to the following:
[Progress: 508 / 513]
Installing admin user...
[Progress: 509 / 513]
Caches clearing:
Cache cleared successfully
[Progress: 510 / 513]
Disabling Maintenance Mode:
[Progress: 511 / 513]
Post installation file permissions check...
For security, remove write permissions from these directories: '/Users/branko/Projects/magelicious/app/etc'
[Progress: 512 / 513]
Write installation date...
[Progress: 513 / 513]
[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_mxq00c
Nothing to import.
Right after installation, our first step should be to set Magento to developer mode by using the following command:
php bin/magento deploy:mode:set developer
We will take a closer look at Magento modes soon; for now, this is to be taken as is.
If all went well during the Magento installation, we should be able to open the storefront and admin in our browser.
- 淘寶天貓網(wǎng)店美工:商品拍攝 店鋪裝修 視頻制作(視頻指導(dǎo)版 第2版)
- 運(yùn)營(yíng)之上:互聯(lián)網(wǎng)業(yè)務(wù)的全局運(yùn)營(yíng)方法論與實(shí)踐
- 抖音電商從入門(mén)到精通:直播與短視頻數(shù)據(jù)分析和運(yùn)營(yíng)
- 淘寶開(kāi)店一點(diǎn)通
- 用戶(hù)增長(zhǎng)方法論:找到產(chǎn)品長(zhǎng)盛不衰的增長(zhǎng)曲線(xiàn)
- 私域電商:存量時(shí)代的增長(zhǎng)裂變法則
- 微店這樣玩就賺了!開(kāi)店運(yùn)營(yíng)+營(yíng)銷(xiāo)推廣+成功案例(第2版)
- 電商財(cái)務(wù)管理系統(tǒng):模塊架構(gòu)+數(shù)據(jù)流轉(zhuǎn)+進(jìn)銷(xiāo)存核算+中臺(tái)建設(shè)
- 移動(dòng)社交微電商營(yíng)銷(xiāo)從入門(mén)到精通
- 微信公眾號(hào)后臺(tái)操作與運(yùn)營(yíng)全攻略
- 直播修煉手冊(cè):主播IP打造+營(yíng)銷(xiāo)運(yùn)營(yíng)+商業(yè)盈利
- 二維碼的秘密:智能手機(jī)時(shí)代的新?tīng)I(yíng)銷(xiāo)寶典
- 淘寶天貓網(wǎng)店設(shè)計(jì)從入門(mén)到精通:店鋪裝修、廣告海報(bào)、修圖修片、架構(gòu)布局、配色應(yīng)用、設(shè)計(jì)模版
- C2C電子商務(wù)創(chuàng)業(yè)教程(第二版)
- 抖音+門(mén)店:品牌營(yíng)銷(xiāo)、推廣引流、團(tuán)購(gòu)帶貨、直播賣(mài)貨一本通