Ubuntu18.04通过Composer下载Magento2并安装程序

1.前提条件:

  • 安装了composer
  • lamp|lnmp 的 web环境已经搭建好
  • php 的扩展已经安装完成,如果不安装php的扩展,在下面使用composer, 程序会变得非常慢且报错,提及用户安装各种插件。为了避免这种情况,在安装完php之后,就把php的各种扩展安装起。

下面是如何安装php的扩展。(本地php以7.1为例)

sudo apt-get -y update
sudo add-apt-repository ppa:ondrej/php
sudo apt-get -y update
sudo apt-get install -y php7.1 libapache2-mod-php7.1 php7.1-common php7.1-gd php7.1-mysql php7.1-mcrypt php7.1-curl php7.1-intl php7.1-xsl php7.1-mbstring php7.1-zip php7.1-bcmath php7.1-iconv php7.1-soap

参考文档:
https://devdocs.magento.com/guides/v2.2/install-gde/prereq/php-ubuntu.html

sun@karat:/var/www/html/sun/magento2Store2$ composer  create-project --repository=https://repo.magento.com/ magento/project-commu                          nity-edition:2.2.7 mgt227
Installing magento/project-community-edition (2.2.7)
  - Installing magento/project-community-edition (2.2.7): Loading from cache
Created project in mgt227
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 298 installs, 0 updates, 0 removals
  - Installing magento/magento-composer-installer (0.1.13): Loading from cache
  - Installing vertex/sdk (1.1.0): Loading from cache
  - Installing magento/zendframework1 (1.13.1): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing container-interop/container-interop (1.2.0): Loading from cache
  - Installing zendframework/zend-stdlib (2.7.7): Loading from cache
  - Installing zendframework/zend-hydrator (1.1.0): Loading from cache
  - Installing zendframework/zend-validator (2.11.1): Loading from cache
  - Installing zendframework/zend-escaper (2.6.0): Loading from cache
  - Installing zendframework/zend-uri (2.7.0): Loading from cache
  - Installing zendframework/zend-loader (2.6.0): Loading from cache
  - Installing zendframework/zend-http (2.8.4): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing zendframework/zend-diactoros (1.8.6): Loading from cache
  - Installing zendframework/zend-psr7bridge (0.2.2): Loading from cache
  - Installing zendframework/zend-servicemanager (2.7.11): Loading from cache
  - Installing zendframework/zend-filter (2.9.1): Loading from cache
  - Installing zendframework/zend-inputfilter (2.10.0): Loading from cache
  - Installing zendframework/zend-form (2.13.0): Loading from cache
  - Installing zendframework/zend-eventmanager (2.6.4): Loading from cache
  - Installing zendframework/zend-console (2.7.0): Loading from cache
  - Installing zendframework/zend-mvc (2.7.15): Loading from cache
  - Installing zendframework/zend-math (2.7.1): Loading from cache
  - Installing zendframework/zend-crypt (2.6.0): Loading from cache
  - Installing zendframework/zend-code (3.1.0): Loading from cache
  - Installing tedivm/jshrink (v1.3.3): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.11.0): Loading from cache
  - Installing psr/log (1.1.0): Loading from cache
  - Installing symfony/debug (v3.0.9): Loading from cache
  - Installing symfony/console (v2.8.50): Loading from cache
  - Installing oyejorge/less.php (v1.7.0.14): Loading from cache
  - Installing monolog/monolog (1.24.0): Loading from cache
  - Installing symfony/process (v2.8.50): Loading from cache
  - Installing symfony/finder (v3.4.29): Loading from cache
  - Installing symfony/polyfill-ctype (v1.11.0): Loading from cache
  - Installing symfony/filesystem (v3.4.29): Loading from cache
  - Installing symfony/service-contracts (v1.1.5): Loading from cache
  - Installing seld/phar-utils (1.0.1): Loading from cache
  - Installing seld/jsonlint (1.7.1): Loading from cache
  - Installing justinrainbow/json-schema (5.2.8): Loading from cache
  - Installing composer/xdebug-handler (1.3.3): Loading from cache
  - Installing composer/spdx-licenses (1.5.1): Loading from cache
  - Installing composer/semver (1.5.0): Loading from cache
  - Installing composer/ca-bundle (1.1.4): Loading from cache
  - Installing seld/cli-prompt (1.0.3): Loading from cache
  - Installing composer/composer (1.4.1): Loading from cache
  - Installing colinmollenhour/credis (1.8.2): Loading from cache
  - Installing colinmollenhour/php-redis-session-abstract (v1.3.4): Loading from cache
  - Installing magento/framework (101.0.7): Loading from cache
  - Installing magento/module-quote (101.0.6): Loading from cache
  - Installing magento/module-catalog-inventory (100.2.6): Loading from cache
  - Installing magento/module-sales (101.0.6): Loading from cache
  - Installing magento/module-config (101.0.7): Loading from cache
  - Installing magento/module-deploy (100.2.6): Loading from cache
  - Installing magento/module-media-storage (100.2.3): Loading from cache
  - Installing magento/module-require-js (100.2.4): Loading from cache
  - Installing magento/module-translation (100.2.6): Loading from cache
  - Installing magento/module-store (100.2.6): Loading from cache
  - Installing magento/module-variable (100.2.6): Loading from cache
  - Installing magento/module-ui (101.0.7): Loading from cache
  - Installing magento/module-user (101.0.5): Loading from cache
  - Installing magento/module-email (100.2.5): Loading from cache
  - Installing magento/module-backend (100.2.7): Loading from cache
  - Installing magento/module-developer (100.2.5): Loading from cache
  - Installing magento/module-authorization (100.2.3): Loading from cache
  - Installing magento/module-page-cache (100.2.4): Loading from cache
  - Installing magento/module-cms-url-rewrite (100.2.3): Loading from cache
  - Installing magento/module-url-rewrite (101.0.6): Loading from cache
  - Installing magento/module-catalog (102.0.7): Loading from cache
  - Installing magento/module-catalog-url-rewrite (100.2.6): Loading from cache
  - Installing magento/module-cms (102.0.7): Loading from cache
  - Installing magento/module-eav (101.0.6): Loading from cache
  - Installing magento/module-import-export (100.2.7): Loading from cache
  - Installing magento/module-customer (101.0.7): Loading from cache
  - Installing magento/module-security (100.2.4): Loading from cache
  - Installing magento/module-integration (100.2.5): Loading from cache
  - Installing magento/module-widget (101.0.5): Loading from cache
  - Installing magento/module-theme (100.2.7): Loading from cache
  - Installing magento/module-rule (100.2.4): Loading from cache
  - Installing magento/module-catalog-rule (101.0.6): Loading from cache
  - Installing magento/module-reports (100.2.7): Loading from cache
  - Installing magento/module-sales-rule (101.0.5): Loading from cache
  - Installing magento/module-tax (100.2.7): Loading from cache
  - Installing magento/module-shipping (100.2.7): Loading from cache
  - Installing magento/module-directory (100.2.6): Loading from cache
  - Installing magento/module-msrp (100.2.3): Loading from cache
  - Installing magento/module-grouped-product (100.2.5): Loading from cache
  - Installing magento/module-checkout (100.2.7): Loading from cache
  - Installing magento/module-payment (100.2.5): Loading from cache
  - Installing magento/module-contact (100.2.4): Loading from cache
  - Installing magento/module-gift-message (100.2.3): Loading from cache
  - Installing magento/module-downloadable (100.2.6): Loading from cache
  - Installing magento/module-configurable-product (100.2.7): Loading from cache
  - Installing zendframework/zend-session (2.8.5): Loading from cache
  - Installing paragonie/random_compat (v2.0.18): Loading from cache
  - Installing zendframework/zend-captcha (2.8.0): Loading from cache
  - Installing zendframework/zend-db (2.10.0): Loading from cache
  - Installing magento/module-captcha (100.2.4): Loading from cache
  - Installing magento/module-rss (100.2.3): Loading from cache
  - Installing magento/module-wishlist (101.0.5): Loading from cache
  - Installing magento/module-sales-sequence (100.2.3): Loading from cache
  - Installing magento/module-newsletter (100.2.6): Loading from cache
  - Installing magento/module-review (100.2.7): Loading from cache
  - Installing magento/module-bundle (100.2.6): Loading from cache
  - Installing magento/module-product-alert (100.2.4): Loading from cache
  - Installing magento/module-indexer (100.2.5): Loading from cache
  - Installing magento/module-catalog-import-export (100.2.6): Loading from cache
  - Installing magento/module-cron (100.2.5): Loading from cache
  - Installing magento/module-backup (100.2.6): Loading from cache
  - Installing zendframework/zend-di (2.6.1): Loading from cache
  - Installing vertex/module-tax (2.2.1): Loading from cache
  - Installing magento/module-multishipping (100.2.4): Loading from cache
  - Installing temando/module-shipping-m2 (1.3.7): Loading from cache
  - Installing ramsey/uuid (3.7.3): Loading from cache
  - Installing guzzlehttp/promises (v1.3.1): Loading from cache
  - Installing ralouphie/getallheaders (3.0.3): Loading from cache
  - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
  - Installing guzzlehttp/guzzle (6.3.3): Loading from cache
  - Installing klarna/module-core (4.5.2): Loading from cache
  - Installing magento/module-vault (101.0.5): Loading from cache
  - Installing magento/module-instant-purchase (100.2.3): Loading from cache
  - Installing magento/module-paypal (100.2.5): Loading from cache
  - Installing klarna/module-ordermanagement (4.4.1): Loading from cache
  - Installing klarna/module-kp (5.5.1): Loading from cache
  - Installing magento/module-send-friend (100.2.3): Loading from cache
  - Installing dotmailer/dotmailer-magento2-extension (2.6.1): Loading from cache
  - Installing amzn/amazon-pay-sdk-php (3.4.1): Loading from cache
  - Installing amzn/amazon-pay-and-login-with-amazon-core-module (2.1.2): Loading from cache
  - Installing magento/module-checkout-agreements (100.2.3): Loading from cache
  - Installing amzn/login-with-amazon-module (2.1.2): Loading from cache
  - Installing amzn/amazon-pay-module (2.1.2): Loading from cache
  - Installing magento/language-zh_hans_cn (100.2.0): Loading from cache
  - Installing magento/language-pt_br (100.2.0): Loading from cache
  - Installing magento/language-nl_nl (100.2.0): Loading from cache
  - Installing magento/language-fr_fr (100.2.0): Loading from cache
  - Installing magento/language-es_es (100.2.0): Loading from cache
  - Installing magento/language-en_us (100.2.0): Loading from cache
  - Installing magento/language-de_de (100.2.0): Loading from cache
  - Installing magento/theme-frontend-blank (100.2.5): Loading from cache
  - Installing magento/theme-frontend-luma (100.2.6): Loading from cache
  - Installing magento/theme-adminhtml-backend (100.2.5): Loading from cache
  - Installing magento/module-wishlist-analytics (100.2.3): Loading from cache
  - Installing magento/module-weee (100.2.4): Loading from cache
  - Installing magento/module-webapi (100.2.5): Loading from cache
  - Installing magento/module-webapi-security (100.2.4): Loading from cache
  - Installing magento/module-version (100.2.3): Loading from cache
  - Installing magento/module-usps (100.2.5): Loading from cache
  - Installing magento/module-ups (100.2.5): Loading from cache
  - Installing magento/module-tax-import-export (100.2.3): Loading from cache
  - Installing magento/module-swatches-layered-navigation (100.2.3): Loading from cache
  - Installing magento/module-swatches (100.2.5): Loading from cache
  - Installing magento/module-swagger (100.2.5): Loading from cache
  - Installing magento/module-swagger-webapi (100.2.1): Loading from cache
  - Installing magento/module-robots (100.2.4): Loading from cache
  - Installing magento/module-sitemap (100.2.6): Loading from cache
  - Installing magento/module-signifyd (100.2.4): Loading from cache
  - Installing magento/module-search (100.2.6): Loading from cache
  - Installing magento/module-catalog-search (100.2.6): Loading from cache
  - Installing magento/module-sample-data (100.2.5): Loading from cache
  - Installing magento/module-sales-inventory (100.2.3): Loading from cache
  - Installing magento/module-sales-analytics (100.2.3): Loading from cache
  - Installing magento/module-review-analytics (100.2.3): Loading from cache
  - Installing magento/module-release-notification (100.2.4): Loading from cache
  - Installing magento/module-quote-analytics (100.2.3): Loading from cache
  - Installing magento/module-product-video (100.2.5): Loading from cache
  - Installing magento/module-persistent (100.2.3): Loading from cache
  - Installing magento/module-offline-shipping (100.2.5): Loading from cache
  - Installing magento/module-offline-payments (100.2.3): Loading from cache
  - Installing magento/module-new-relic-reporting (100.2.5): Loading from cache
  - Installing magento/module-layered-navigation (100.2.4): Loading from cache
  - Installing magento/module-grouped-import-export (100.2.3): Loading from cache
  - Installing magento/module-cookie (100.2.3): Loading from cache
  - Installing magento/module-google-analytics (100.2.5): Loading from cache
  - Installing magento/module-google-optimizer (100.2.4): Loading from cache
  - Installing magento/module-google-adwords (100.2.3): Loading from cache
  - Installing magento/module-fedex (100.2.4): Loading from cache
  - Installing magento/module-encryption-key (100.2.3): Loading from cache
  - Installing magento/module-downloadable-import-export (100.2.3): Loading from cache
  - Installing magento/module-dhl (100.2.4): Loading from cache
  - Installing magento/module-customer-import-export (100.2.5): Loading from cache
  - Installing magento/module-customer-analytics (100.2.3): Loading from cache
  - Installing magento/module-currency-symbol (100.2.3): Loading from cache
  - Installing magento/module-configurable-product-sales (100.2.4): Loading from cache
  - Installing magento/module-configurable-import-export (100.2.4): Loading from cache
  - Installing magento/module-catalog-widget (100.2.4): Loading from cache
  - Installing magento/module-catalog-rule-configurable (100.2.3): Loading from cache
  - Installing magento/module-catalog-analytics (100.2.3): Loading from cache
  - Installing magento/module-cache-invalidate (100.2.3): Loading from cache
  - Installing magento/module-bundle-import-export (100.2.4): Loading from cache
  - Installing braintree/braintree_php (3.28.0): Loading from cache
  - Installing magento/module-braintree (100.2.7): Loading from cache
  - Installing magento/module-authorizenet (100.2.3): Loading from cache
  - Installing magento/module-analytics (100.2.4): Loading from cache
  - Installing magento/module-advanced-pricing-import-export (100.2.5): Loading from cache
  - Installing magento/module-admin-notification (100.2.5): Loading from cache
  - Installing magento/module-marketplace (100.2.4): Loading from cache
  - Installing magento/composer (1.2.0): Loading from cache
  - Installing phpseclib/phpseclib (2.0.20): Loading from cache
  - Installing symfony/event-dispatcher (v2.8.50): Loading from cache
  - Installing tubalmartin/cssmin (v4.1.1): Loading from cache
  - Installing symfony/css-selector (v4.3.2): Loading from cache
  - Installing pelago/emogrifier (v2.1.1): Loading from cache
  - Installing colinmollenhour/cache-backend-file (1.4): Loading from cache
  - Installing colinmollenhour/cache-backend-redis (1.10.4): Loading from cache
  - Installing zendframework/zend-log (2.10.0): Loading from cache
  - Installing zendframework/zend-json (2.6.1): Loading from cache
  - Installing zendframework/zend-serializer (2.9.0): Loading from cache
  - Installing zendframework/zend-config (2.6.0): Loading from cache
  - Installing zendframework/zend-view (2.11.2): Loading from cache
  - Installing zendframework/zend-i18n (2.9.0): Loading from cache
  - Installing zendframework/zend-text (2.7.0): Loading from cache
  - Installing zendframework/zend-modulemanager (2.8.2): Loading from cache
  - Installing zendframework/zend-server (2.8.0): Loading from cache
  - Installing zendframework/zend-soap (2.8.0): Loading from cache
  - Installing magento/magento2-base (2.2.7): Loading from cache
  - Installing magento/product-community-edition (2.2.7)
  - Installing squizlabs/php_codesniffer (3.2.2): Downloading (100%)
  - Installing vlucas/phpdotenv (v2.6.1): Downloading (100%)
  - Installing mustache/mustache (v2.12.0): Downloading (100%)
  - Installing fzaninotto/faker (v1.8.0): Downloading (100%)
  - Installing flow/jsonpath (0.4.0): Downloading (100%)
  - Installing phpoption/phpoption (1.5.0): Downloading (100%)
  - Installing symfony/yaml (v3.3.18): Downloading (100%)
  - Installing doctrine/lexer (1.0.2): Downloading (100%)
  - Installing doctrine/annotations (v1.6.1): Downloading (100%)
  - Installing doctrine/collections (v1.6.2): Downloading (100%)
  - Installing doctrine/instantiator (1.2.0): Downloading (100%)
  - Installing phpcollection/phpcollection (0.5.0): Downloading (100%)
  - Installing jms/parser-lib (1.0.0): Downloading (100%)
  - Installing jms/metadata (1.7.0): Downloading (100%)
  - Installing jms/serializer (1.14.0): Downloading (100%)
  - Installing epfremme/swagger-php (v2.0.0): Downloading (100%)
  - Installing dflydev/dot-access-data (v1.1.0): Downloading (100%)
  - Installing grasmash/yaml-expander (1.4.0): Downloading (100%)
  - Installing consolidation/self-update (1.1.5): Downloading (100%)
  - Installing consolidation/output-formatters (3.5.0): Downloading (100%)
  - Installing consolidation/annotated-command (2.12.0): Downloading (100%)
  - Installing grasmash/expander (1.0.0): Downloading (100%)
  - Installing consolidation/config (1.2.1): Downloading (100%)
  - Installing consolidation/log (1.1.1): Downloading (100%)
  - Installing symfony/dependency-injection (v3.3.18): Downloading (100%)
  - Installing league/container (2.4.1): Downloading (100%)
  - Installing consolidation/robo (1.4.9): Downloading (100%)
  - Installing webmozart/assert (1.4.0): Downloading (100%)
  - Installing phpdocumentor/reflection-common (1.0.1): Downloading (100%)
  - Installing phpdocumentor/type-resolver (0.4.0): Downloading (100%)
  - Installing phpdocumentor/reflection-docblock (4.3.1): Downloading (100%)
  - Installing sebastian/recursion-context (3.0.0): Downloading (100%)
  - Installing sebastian/exporter (3.1.0): Downloading (100%)
  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)
  - Installing phpunit/phpunit-mock-objects (4.0.4): Downloading (100%)
  - Installing codeception/stub (1.0.4): Downloading (100%)
  - Installing sebastian/diff (1.4.3): Downloading (100%)
  - Installing sebastian/comparator (2.0.0): Downloading (100%)
  - Installing behat/gherkin (v4.4.5): Downloading (100%)
  - Installing symfony/dom-crawler (v4.3.2): Downloading (100%)
  - Installing symfony/browser-kit (v4.3.2): Downloading (100%)
  - Installing facebook/webdriver (1.7.1): Downloading (100%)
  - Installing theseer/tokenizer (1.1.3): Downloading (100%)
  - Installing sebastian/version (2.0.1): Downloading (100%)
  - Installing sebastian/environment (3.1.0): Downloading (100%)
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)
  - Installing phpunit/php-token-stream (2.0.2): Downloading (100%)
  - Installing phpunit/php-file-iterator (1.4.5): Downloading (100%)
  - Installing phpunit/php-code-coverage (5.3.2): Downloading (100%)
  - Installing sebastian/resource-operations (1.0.0): Downloading (100%)
  - Installing sebastian/object-reflector (1.1.1): Downloading (100%)
  - Installing sebastian/object-enumerator (3.0.3): Downloading (100%)
  - Installing sebastian/global-state (2.0.0): Downloading (100%)
  - Installing phpunit/php-timer (1.0.9): Downloading (100%)
  - Installing phpspec/prophecy (1.8.1): Downloading (100%)
  - Installing phar-io/version (1.0.1): Downloading (100%)
  - Installing phar-io/manifest (1.0.1): Downloading (100%)
  - Installing myclabs/deep-copy (1.9.1): Downloading (100%)
  - Installing phpunit/phpunit (6.2.4): Downloading (100%)
  - Installing codeception/codeception (2.3.9): Downloading (100%)
  - Installing ircmaxell/password-compat (v1.0.4): Downloading (100%)
  - Installing symfony/polyfill-php55 (v1.11.0): Downloading (100%)
  - Installing symfony/polyfill-php54 (v1.11.0): Downloading (100%)
  - Installing symfony/polyfill-php72 (v1.11.0): Downloading (100%)
  - Installing symfony/polyfill-intl-idn (v1.11.0): Downloading (100%)
  - Installing symfony/mime (v4.3.2): Downloading (100%)
  - Installing symfony/http-foundation (v4.3.2): Downloading (100%)
  - Installing symfony/polyfill-php70 (v1.11.0): Downloading (100%)
  - Installing moontoast/math (1.1.2): Downloading (100%)
  - Installing allure-framework/allure-php-api (1.1.4): Downloading (100%)
  - Installing allure-framework/allure-codeception (1.2.7): Downloading (100%)
  - Installing magento/magento2-functional-testing-framework (2.3.8): Downloading (100%)
  - Installing theseer/fdomdocument (1.6.6): Downloading (100%)
  - Installing sebastian/finder-facade (1.2.2): Downloading (100%)
  - Installing sebastian/phpcpd (2.0.4): Downloading (100%)
  - Installing symfony/config (v4.3.2): Downloading (100%)
  - Installing pdepend/pdepend (2.5.2): Downloading (100%)
  - Installing phpmd/phpmd (2.6.0): Downloading (100%)
  - Installing symfony/stopwatch (v4.3.2): Downloading (100%)
  - Installing symfony/options-resolver (v4.3.2): Downloading (100%)
  - Installing friendsofphp/php-cs-fixer (v2.2.20): Downloading (100%)
  - Installing lusitanian/oauth (v0.8.11): Downloading (100%)
zendframework/zend-validator suggests installing zendframework/zend-i18n-resources (Translations of validator messages)
zendframework/zend-http suggests installing paragonie/certainty (For automated management of cacert.pem)
zendframework/zend-servicemanager suggests installing ocramius/proxy-manager (ProxyManager 0.5.* to handle lazy initialization of services)
zendframework/zend-filter suggests installing psr/http-factory-implementation (psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters)
zendframework/zend-form suggests installing zendframework/zendservice-recaptcha (in order to use the ReCaptcha form element)
zendframework/zend-mvc suggests installing zendframework/zend-authentication (Zend\Authentication component for Identity plugin)
zendframework/zend-mvc suggests installing zendframework/zend-servicemanager-di (^1.0.1, if using zend-servicemanager v3 and requiring the zend-di integration)
zendframework/zend-math suggests installing ext-gmp (If using the gmp functionality)
zendframework/zend-math suggests installing ircmaxell/random-lib (Fallback random byte generator for Zend\Math\Rand if Mcrypt extensions is unavailable)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
symfony/service-contracts suggests installing symfony/service-implementation
magento/framework suggests installing ext-imagick (Use Image Magick >=3.0.0 as an optional alternative image processing library)
magento/module-sales suggests installing magento/module-sales-sample-data (Sample Data version:100.2.*)
magento/module-catalog suggests installing magento/module-catalog-sample-data (Sample Data version:100.2.*)
magento/module-cms suggests installing magento/module-cms-sample-data (Sample Data version:100.2.*)
magento/module-customer suggests installing magento/module-customer-sample-data (Sample Data version:100.2.*)
magento/module-widget suggests installing magento/module-widget-sample-data (Sample Data version:100.2.*)
magento/module-theme suggests installing magento/module-theme-sample-data (Sample Data version:100.2.*)
magento/module-catalog-rule suggests installing magento/module-catalog-rule-sample-data (Sample Data version:100.2.*)
magento/module-sales-rule suggests installing magento/module-sales-rule-sample-data (Sample Data version:100.2.*)
magento/module-tax suggests installing magento/module-tax-sample-data (Sample Data version:100.2.*)
magento/module-msrp suggests installing magento/module-msrp-sample-data (Sample Data version:100.2.*)
magento/module-grouped-product suggests installing magento/module-grouped-product-sample-data (Sample Data version:100.2.*)
magento/module-downloadable suggests installing magento/module-downloadable-sample-data (Sample Data version:100.2.*)
magento/module-configurable-product suggests installing magento/module-configurable-sample-data (Sample Data version:100.2.*)
magento/module-configurable-product suggests installing magento/module-product-links-sample-data (Sample Data version:100.2.*)
zendframework/zend-session suggests installing mongodb/mongodb (If you want to use the MongoDB session save handler)
zendframework/zend-session suggests installing zendframework/zend-cache (Zend\Cache component)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
zendframework/zend-captcha suggests installing zendframework/zend-i18n-resources (Translations of captcha messages)
zendframework/zend-captcha suggests installing zendframework/zendservice-recaptcha (ZendService\ReCaptcha component)
magento/module-wishlist suggests installing magento/module-wishlist-sample-data (Sample Data version:100.2.*)
magento/module-review suggests installing magento/module-review-sample-data (Sample Data version:100.2.*)
magento/module-bundle suggests installing magento/module-bundle-sample-data (Sample Data version:100.2.*)
vertex/module-tax suggests installing magento/module-gift-wrapping (Vertex Tax Links for Magento 2 also supports Magento's Gift Wrapping module)
vertex/module-tax suggests installing magento/module-gift-card-account (Vertex Tax Links for Magento 2 also supports Magento's Gift Card Account module)
vertex/module-tax suggests installing magento/module-reward (Vertex Tax Links for Magento 2 also supports Magento's Reward module)
ramsey/uuid suggests installing ircmaxell/random-lib (Provides RandomLib for use with the RandomLibAdapter)
ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
amzn/amazon-pay-module suggests installing magento/module-scalable-checkout (*)
amzn/amazon-pay-module suggests installing magento/module-scalable-oms (*)
magento/module-swatches suggests installing magento/module-swatches-sample-data (Sample Data version:100.2.*)
magento/module-sample-data suggests installing magento/sample-data-media (Sample Data version:100.2.*)
magento/module-offline-shipping suggests installing magento/module-offline-shipping-sample-data (Sample Data version:100.2.*)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
symfony/event-dispatcher suggests installing symfony/http-kernel
zendframework/zend-log suggests installing ext-mongo (mongo extension to use Mongo writer)
zendframework/zend-log suggests installing ext-mongodb (mongodb extension to use MongoDB writer)
zendframework/zend-log suggests installing zendframework/zend-mail (Zend\Mail component to use the email log writer)
zendframework/zend-json suggests installing zendframework/zendxml (To support Zend\Json\Json::fromXml() usage)
zendframework/zend-view suggests installing zendframework/zend-authentication (Zend\Authentication component)
zendframework/zend-view suggests installing zendframework/zend-feed (Zend\Feed component)
zendframework/zend-view suggests installing zendframework/zend-mvc-plugin-flashmessenger (zend-mvc-plugin-flashmessenger component, if you want to use the FlashMessenger view helper with zend-mvc versions 3 and up)
zendframework/zend-view suggests installing zendframework/zend-navigation (Zend\Navigation component)
zendframework/zend-view suggests installing zendframework/zend-paginator (Zend\Paginator component)
zendframework/zend-view suggests installing zendframework/zend-permissions-acl (Zend\Permissions\Acl component)
zendframework/zend-i18n suggests installing zendframework/zend-cache (Zend\Cache component)
zendframework/zend-i18n suggests installing zendframework/zend-i18n-resources (Translation resources)
jms/serializer suggests installing doctrine/cache (Required if you like to use cache functionality.)
consolidation/output-formatters suggests installing symfony/var-dumper (For using the var_dump formatter)
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
consolidation/robo suggests installing pear/archive_tar (Allows tar archives to be created and extracted in taskPack and taskExtract, respectively.)
consolidation/robo suggests installing henrikbjorn/lurker (For monitoring filesystem changes in taskWatch)
consolidation/robo suggests installing patchwork/jsqueeze (For minifying JS files in taskMinify)
consolidation/robo suggests installing natxet/CssMin (For minifying CSS files in taskMinify)
facebook/webdriver suggests installing ext-SimpleXML (For Firefox profile creation)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.5)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (^1.1)
phpunit/phpunit suggests installing ext-xdebug (*)
codeception/codeception suggests installing aws/aws-sdk-php (For using AWS Auth in REST module and Queue module)
codeception/codeception suggests installing codeception/specify (BDD-style code blocks)
codeception/codeception suggests installing codeception/verify (BDD-style assertions)
codeception/codeception suggests installing codeception/phpbuiltinserver (Start and stop PHP built-in web server for your tests)
codeception/codeception suggests installing league/factory-muffin (For DataFactory module)
codeception/codeception suggests installing league/factory-muffin-faker (For Faker support in DataFactory module)
codeception/codeception suggests installing symfony/phpunit-bridge (For phpunit-bridge support)
codeception/codeception suggests installing stecman/symfony-console-completion (For BASH autocompletion)
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-isidenticalstring (For IsIdenticalString constraint.)
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-xmlmatchesxsd (For XmlMatchesXsd constraint.)
lusitanian/oauth suggests installing predis/predis (Allows using the Redis storage backend.)
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files

通过命名安装:

sun@karat:/var/www/html/sun/magento2Store2/mgt227$ bin/magento setup:install --base-url=http://120.78.178.239 --db-host=localhost --db-name=mgt227 --db-user=sun --db-password=sun.chengdu9! --backend-frontname=admin --admin-firstname=admin --admin-lastname=admin --admin-email=admin@admin.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1
Magent2的安装

安装完成之后,在浏览器中打开ip地址访问:

出现500 错误。

这个时候,你需要为站点设置权限,操作如下:

设置所有权:

sun@karat:/var/www/html/sun/magento2Store2$ sudo chown -R :www-data .

设置权限 :

find . -type d -exec chmod 770 {} + && find . -type f -exec chmod 660 {} + && chmod u+x bin/magento

如果必须输入命令sudo,请使用:

sudo find . -type d -exec chmod 770 {} + && sudo find . -type f -exec chmod 660 {} + && sudo chmod u+x bin/magento

发表评论

电子邮件地址不会被公开。