官术网_书友最值得收藏!

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:

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.

Magento automatically assigns an admin URL during console installation, unless explicitly specified through the install command via the --backend-frontname option.
Out of all the installation options listed, only the following are actually required: --admin-firstname, --admin-lastname, --admin-email, --admin-user, and --admin-password. It is worth taking some time to read through the official Magento documentation ( https://devdocs.magento.com) and looking at what the rest of the installation options have to offer.

If all went well during the Magento installation, we should be able to open the storefront and admin in our browser.

推薦閱讀
  1. 淘寶天貓網(wǎng)店美工:商品拍攝 店鋪裝修 視頻制作(視頻指導(dǎo)版 第2版)
  2. 運(yùn)營(yíng)之上:互聯(lián)網(wǎng)業(yè)務(wù)的全局運(yùn)營(yíng)方法論與實(shí)踐
  3. 抖音電商從入門(mén)到精通:直播與短視頻數(shù)據(jù)分析和運(yùn)營(yíng)
  4. 淘寶開(kāi)店一點(diǎn)通
  5. 用戶(hù)增長(zhǎng)方法論:找到產(chǎn)品長(zhǎng)盛不衰的增長(zhǎng)曲線(xiàn)
  6. 私域電商:存量時(shí)代的增長(zhǎng)裂變法則
  7. 微店這樣玩就賺了!開(kāi)店運(yùn)營(yíng)+營(yíng)銷(xiāo)推廣+成功案例(第2版)
  8. 電商財(cái)務(wù)管理系統(tǒng):模塊架構(gòu)+數(shù)據(jù)流轉(zhuǎn)+進(jìn)銷(xiāo)存核算+中臺(tái)建設(shè)
  9. 移動(dòng)社交微電商營(yíng)銷(xiāo)從入門(mén)到精通
  10. 微信公眾號(hào)后臺(tái)操作與運(yùn)營(yíng)全攻略
  11. 直播修煉手冊(cè):主播IP打造+營(yíng)銷(xiāo)運(yùn)營(yíng)+商業(yè)盈利
  12. 二維碼的秘密:智能手機(jī)時(shí)代的新?tīng)I(yíng)銷(xiāo)寶典
  13. 淘寶天貓網(wǎng)店設(shè)計(jì)從入門(mén)到精通:店鋪裝修、廣告海報(bào)、修圖修片、架構(gòu)布局、配色應(yīng)用、設(shè)計(jì)模版
  14. C2C電子商務(wù)創(chuàng)業(yè)教程(第二版)
  15. 抖音+門(mén)店:品牌營(yíng)銷(xiāo)、推廣引流、團(tuán)購(gòu)帶貨、直播賣(mài)貨一本通
主站蜘蛛池模板: 东平县| 扎赉特旗| 株洲市| 嵊泗县| 出国| 县级市| 大关县| 丽江市| 循化| 钟山县| 宁明县| 泗阳县| 广德县| 恩平市| 开平市| 南宁市| 宜春市| 五河县| 林口县| 汝城县| 依兰县| 延庆县| 潜山县| 夏津县| 廉江市| 肥西县| 彭泽县| 禹城市| 宁远县| 太仆寺旗| 永胜县| 千阳县| 格尔木市| 达孜县| 张家界市| 鄂托克前旗| 福安市| 武平县| 前郭尔| 汝阳县| 霍林郭勒市|