Magento2安装

安装LNMP或LAMP环境

yum -y install wget screen
wget http://mirror.linuxeye.com/oneinstack-full.tar.gz
tar zxf oneinstack-full.tar.gz
cd oneinstack
screen -R oneinstack
./install.sh

修改PHP.ini

max_execution_time = 18000
memory_limit  = 1024 M

安装Composer

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

安装Magento2

# 开发版
composer create-project magento/community-edition {directory_name} -s dev --prefer-dist
# 稳定版
composer create-project magento/community-edition {directory_name} --prefer-dist
# 或指定下载地址,获取企业版
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition {directory_name};

创建MySQL数据库
开始网页安装,xxx.com/setup

部署Magento2

修改文件权限

cd magento2
find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && find ./var -type d -exec chmod 777 {} \; && chmod 777 var/ -R && find ./pub/media -type d -exec chmod 777 {} \; && find ./pub/static -type d -exec chmod 777 {} \; && chmod 777 ./app/etc && chmod 644 ./app/etc/*.xml && chmod u+x bin/magento

更新Magento2

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy en_US -f
php bin/magento indexer:reindex
php bin/magento cache:clean && php bin/magento cache:flush

安装中文包

composer require mageplaza/magento-2-chinese-language-pack:dev-master
php bin/magento setup:static-content:deploy en_US zh_Hans_CN -f
php bin/magento cache:clean
php bin/magento cache:flush
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
What this book covers Chapter 1, Installing Magento 2 on Apache and NGINX, is a totally different ballgame compared to Magento 1. Where Magento 1 could be installed through FTP or SSH, Magento 2 is installable only via the command-line interface for an experienced webmaster. Chapter 2, Magento 2 System Tools, explains how to install Magento 2 via the command shell. Magento released a new powerful tool to manage and install sample data, reindex your database, back up your site, or flush your caches, which are just a few of the options. Chapter 3, Enabling Performance in Magento 2, explains how to configure different types of caching options. In Magento 2, the Full Page Cache (FPC) can be handled by Varnish to give your store a performance boost. There are also external services that you can use as a cache. Chapter 4, Creating Catalogs and Categories, shows you one of the major elements of a Magento store before creating products. Creating the correct product type including attributes is an important step in setting up a Magento store. Chapter 5, Managing Your Store, covers setting up the correct tax rules, configuring an inventory, and creating customer groups. Chapter 6, Creating a Magento 2 Theme, discusses the Magento 2 blank theme and how to use the fallback to create seasonal variations. It also explains how the new theme is set up and where files are stored. Chapter 7, Creating Magento 2 Extensions – the Basics, contains the basic functions required to use extensions in a Magento 2 installation. It contains a brief introduction to new methods introduced in the Magento 2 framework and examples on how to create basic functions. Chapter 8, Creating Magento 2 Extensions – Advanced, explains how to use advanced features in extensions for Magento 2. It also includes how to add unit/functional tests as this is a new requirement for extensions listed on the new Magento

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值