Giter VIP home page Giter VIP logo

magento's Introduction

Chạy docker:

docker-compose up -d

Tạo thư mục ecommerce bên trong src

exec vào container phpfpm

cd var/www/html/ecommerce

Tải magento:

composer config -g repo.packagist composer https://packagist.org
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .

Chạy lệnh install cho magento:

bin/magento setup:install \
--backend-frontname=admin --db-host=mysql --db-name=ecommerce --db-user=root --db-password=root \
--search-engine=elasticsearch7 --elasticsearch-host=elastic \
--elasticsearch-port=9200

Tạo tài khoản Admin:

bin/magento admin:user:create --admin-user='admin' --admin-password='test123' --admin-email='[email protected]' --admin-firstname='Admin' --admin-lastname='Admin'

Nếu bị lỗi do thiếu module Elastisearch:

php bin/magento module:disable {Magento_Elasticsearch,Magento_InventoryElasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}

Nếu bị lỗi do Two Factor Auth:

bin/magento module:disable Magento_TwoFactorAuth

Install plugin elasticsearch

exec elastic

cd /usr/share/elasticsearch
bin/elasticsearch-plugin install analysis-phonetic
bin/elasticsearch-plugin install analysis-icu

Fix outdate module

exec mysql

update setup_module set data_version = schema_version where data_version is NULL;

Fix theme

cd /src/ecommerce/tools
yarn styles && yarn babel && yarn svg

Change logo

cp logo.svg src/ecommerce/vendor/snowdog/theme-frontend-alpaca/web/images/icons

Fix proxy error

chmod -R 0777 var/ pub/ generated/
rm -rf var/cache/* var/view_preprocessed/* generated/* pub/static/*
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
php bin/magento indexer:reindex
chmod -R 0777 var/ pub/ generated/

Change ssl

/var/www/html/ecommerce# bin/magento setup:store-config:set --base-url="https://hdhgearshop.tk/" --base-url-secure="https://hdhgearshop.tk/" --use-secure=1 --use-secure-admin=1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.