From e32017efe6e5aeb1228d87e4c2b3c99cc8f1a445 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Thu, 9 May 2019 19:34:51 +0300 Subject: [PATCH 1/2] magento/devdocs#: Replace `` with `` https://devdocs.magento.com/guides/v2.0/install-gde/install/sample-data-after-composer.html https://devdocs.magento.com/guides/v2.1/install-gde/install/sample-data-after-composer.html https://devdocs.magento.com/guides/v2.2/install-gde/install/sample-data-after-composer.html https://devdocs.magento.com/guides/v2.3/install-gde/install/sample-data-after-composer.html https://devdocs.magento.com/guides/v2.0/config-guide/config/config-files.html https://devdocs.magento.com/guides/v2.1/config-guide/config/config-files.html https://devdocs.magento.com/guides/v2.2/config-guide/config/config-files.html https://devdocs.magento.com/guides/v2.3/config-guide/config/config-files.html https://devdocs.magento.com/guides/v2.0/comp-mgr/trouble/cman/cron.html https://devdocs.magento.com/guides/v2.1/comp-mgr/trouble/cman/cron.html https://devdocs.magento.com/guides/v2.2/comp-mgr/trouble/cman/cron.html https://devdocs.magento.com/guides/v2.3/comp-mgr/trouble/cman/cron.html https://devdocs.magento.com/guides/v2.0/install-gde/trouble/readiness/tshoot_rc_cron.html https://devdocs.magento.com/guides/v2.1/install-gde/trouble/readiness/tshoot_rc_cron.html https://devdocs.magento.com/guides/v2.2/install-gde/trouble/readiness/tshoot_rc_cron.html https://devdocs.magento.com/guides/v2.3/install-gde/trouble/readiness/tshoot_rc_cron.html https://devdocs.magento.com/guides/v2.0/comp-mgr/trouble/cman/component-depend.html https://devdocs.magento.com/guides/v2.1/comp-mgr/trouble/cman/component-depend.html https://devdocs.magento.com/guides/v2.2/comp-mgr/trouble/cman/component-depend.html https://devdocs.magento.com/guides/v2.3/comp-mgr/trouble/cman/component-depend.html --- _includes/comp-man/dependency.md | 8 ++- _includes/config/locate-session.md | 6 +- .../install/file-system-perms-oneuser.md | 24 +++++-- .../install/file-system-perms-oneuser_22.md | 24 +++++-- .../install/file-system-perms-twouser.md | 24 +++++-- .../install/file-system-perms-twouser_22.md | 26 +++++-- _includes/install/first-steps-cli.md | 21 ++++-- _includes/install/new-cli-intro.md | 4 +- .../sampledata/file-sys-perms-digest.md | 13 +++- .../install/sampledata/sample-data-after.md | 6 +- .../install/sampledata/sample-data-clone.md | 71 ++++++++++++++----- .../sampledata/sample-data-composer.md | 14 +++- _includes/install/trouble/rc_cron.md | 18 +++-- _includes/migration/find-version.md | 16 +++-- _includes/vendor/types-def.md | 2 +- 15 files changed, 207 insertions(+), 70 deletions(-) diff --git a/_includes/comp-man/dependency.md b/_includes/comp-man/dependency.md index a761a3f03a2..49b5adbdbb6 100644 --- a/_includes/comp-man/dependency.md +++ b/_includes/comp-man/dependency.md @@ -33,13 +33,15 @@ Edit `composer.json` to make any of these changes and try the readiness check ag If the Magento file system owner doesn't have permissions to write to directories on the Magento file system, a message similar to the following displays: - file_put_contents(/var/www/html/magento2ce/var/composer_home/cache/repo/https--- - packagist.org/provider-doctrine$instantiator.json): failed to open stream: Permission denied +```terminal +file_put_contents(/var/www/html/magento2ce/var/composer_home/cache/repo/https--- +packagist.org/provider-doctrine$instantiator.json): failed to open stream: Permission denied +``` Make sure you set file system permissions as discussed in [Overview of ownership and permissions]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). ### The Component Dependency Check status never changes {#trouble-depend-state} -In some cases, the status of the Component Dependency Check doesn't change, even after you try to correct issues. In that case, you can either delete or rename files named `/var/.update_cronjob_status` and `/var/.setup_cronjob_status` and try running the Component Manager again. +In some cases, the status of the Component Dependency Check doesn't change, even after you try to correct issues. In that case, you can either delete or rename files named `/var/.update_cronjob_status` and `/var/.setup_cronjob_status` and try running the Component Manager again. Renaming or removing these files forces the Component Manager to run the checks again. diff --git a/_includes/config/locate-session.md b/_includes/config/locate-session.md index 64d25fa8f0e..e8bc8ccc9a1 100644 --- a/_includes/config/locate-session.md +++ b/_includes/config/locate-session.md @@ -8,16 +8,18 @@ This topic discusses how to locate where your session files are stored. The Mage 1. Directory defined in [`env.php`](#session-where-env) 2. Directory defined in [`php.ini`](#session-where-phpini) - 3. `/var/session` directory + 3. `/var/session` directory ### `env.php` example {#session-where-env} -A sample snippet from `/app/etc/env.php` follows: +A sample snippet from `/app/etc/env.php` follows: +```php 'session' => array ( 'save' => 'files', 'save_path' => '/var/www/session', ), +``` The preceding example stores session files in `/var/www/session` diff --git a/_includes/install/file-system-perms-oneuser.md b/_includes/install/file-system-perms-oneuser.md index 374be9c2365..5f30e83305d 100644 --- a/_includes/install/file-system-perms-oneuser.md +++ b/_includes/install/file-system-perms-oneuser.md @@ -11,14 +11,28 @@ To set permissions before you install the Magento software: 2. If you have command-line access, enter the following commands in the order shown: - cd - find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + - find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + - chmod u+x bin/magento + ```bash + cd + ``` + + ```bash + find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + + ``` + + ```bash + find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + + ``` + + ```bash + chmod u+x bin/magento + ``` To optionally enter all commands on one line, enter the following assuming Magento is installed in `/var/www/html/magento2`: - cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento + ```bash + cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento + ``` + 3. If you haven't done so already, get the Magento software in one of the following ways: * [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) diff --git a/_includes/install/file-system-perms-oneuser_22.md b/_includes/install/file-system-perms-oneuser_22.md index 8d6189bf2ad..24e6b399066 100644 --- a/_includes/install/file-system-perms-oneuser_22.md +++ b/_includes/install/file-system-perms-oneuser_22.md @@ -12,14 +12,28 @@ To set permissions before you install the Magento software: 2. If you have command-line access, enter the following commands in the order shown: - cd - find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + - find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + - chmod u+x bin/magento + ```bash + cd + ``` + + ```bash + find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + + ``` + + ```bash + find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + + ``` + + ```bash + chmod u+x bin/magento + ``` To optionally enter all commands on one line, enter the following assuming Magento is installed in `/var/www/html/magento2`: - cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento + ```bash + cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento + ``` + 3. If you haven't done so already, get the Magento software in one of the following ways: * [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) diff --git a/_includes/install/file-system-perms-twouser.md b/_includes/install/file-system-perms-twouser.md index 6d8ce96feb4..a05d82ef42d 100644 --- a/_includes/install/file-system-perms-twouser.md +++ b/_includes/install/file-system-perms-twouser.md @@ -105,11 +105,25 @@ To set ownership and permissions before you install the Magento software: 1. Log in to your Magento server as, or switch to, the Magento file system owner. 2. Enter the following commands in the order shown: - cd - find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + - find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + - sudo chown -R : . - chmod u+x bin/magento + ```bash + cd + ``` + + ```bash + find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + + ``` + + ```bash + find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + + ``` + + ```bash + sudo chown -R : . + ``` + + ```bash + chmod u+x bin/magento + ``` {% include install/file-system-perms-twouser_cmds-only.md %} diff --git a/_includes/install/file-system-perms-twouser_22.md b/_includes/install/file-system-perms-twouser_22.md index e30e68a6d32..5f60be2b7ae 100644 --- a/_includes/install/file-system-perms-twouser_22.md +++ b/_includes/install/file-system-perms-twouser_22.md @@ -105,12 +105,26 @@ To set ownership and permissions before you install the Magento software: 1. Log in to your Magento server as, or switch to, the Magento file system owner. 2. Enter the following commands in the order shown: - - cd - find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + - find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + - sudo chown -R : . - chmod u+x bin/magento + + ```bash + cd + ``` + + ```bash + find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + + ``` + + ```bash + find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + + ``` + + ```bash + sudo chown -R : . + ``` + + ```bash + chmod u+x bin/magento + ``` {% include install/file-system-perms-twouser_cmds-only_22.md %} diff --git a/_includes/install/first-steps-cli.md b/_includes/install/first-steps-cli.md index 38299e8efc5..362c8f031d7 100644 --- a/_includes/install/first-steps-cli.md +++ b/_includes/install/first-steps-cli.md @@ -2,21 +2,28 @@ If you use the bash shell, you can also use the following syntax to switch to the Magento file system owner and enter the command at the same time: - su -s /bin/bash -c + ```bash + su -s /bin/bash -c + ``` If the Magento file system owner does not allow logins you can do the following: - sudo -u -2. To run Magento commands from any directory, add `/bin` to your system `PATH`. + ```bash + sudo -u + ``` + +2. To run Magento commands from any directory, add `/bin` to your system `PATH`. Because shells have differing syntax, consult a reference like [unix.stackexchange.com](http://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables). bash shell example for CentOS: - export PATH=$PATH:/var/www/html/magento2/bin + ```bash + export PATH=$PATH:/var/www/html/magento2/bin + ``` {:.bs-callout .bs-callout-info} You can also run the commands in the following ways: -- `cd /bin` and run them as `./magento ` -- `php /bin/magento ` -- `` is a subdirectory of your web server's docroot. [Need help locating the docroot?]({{ page.baseurl }}/install-gde/basics/basics_docroot.html) +- `cd /bin` and run them as `./magento ` +- `/bin/magento ` +- `` is a subdirectory of your web server's docroot. [Need help locating the docroot?]({{ page.baseurl }}/install-gde/basics/basics_docroot.html) diff --git a/_includes/install/new-cli-intro.md b/_includes/install/new-cli-intro.md index 683107a11f9..2ec0d8d42c4 100644 --- a/_includes/install/new-cli-intro.md +++ b/_includes/install/new-cli-intro.md @@ -1,4 +1,4 @@ -Magento has one command-line interface that performs both installation and configuration tasks: `/bin/magento`. The new interface performs multiple tasks, including: +Magento has one command-line interface that performs both installation and configuration tasks: `/bin/magento`. The new interface performs multiple tasks, including: - Installing Magento (and related tasks such as creating or updating the database schema, creating the deployment configuration, and so on). - Clearing the cache. @@ -10,7 +10,7 @@ Magento has one command-line interface that performs both installation and confi Other benefits: -- A single command (`php /bin/magento list`) lists all available installation and configuration commands. +- A single command (`/bin/magento list`) lists all available installation and configuration commands. - Consistent user interface based on Symfony. - The CLI is extensible so third party developers can "plug in" to it. This has the additional benefit of eliminating users' learning curve. - Commands for disabled modules do not display. diff --git a/_includes/install/sampledata/file-sys-perms-digest.md b/_includes/install/sampledata/file-sys-perms-digest.md index 9af1a277311..744dcc8e414 100644 --- a/_includes/install/sampledata/file-sys-perms-digest.md +++ b/_includes/install/sampledata/file-sys-perms-digest.md @@ -10,16 +10,19 @@ For more information about file system ownership and permissions, see [Overview If you run the Magento application as one user (which is typical of shared hosting environments), change file system permissions and ownership as follows: ```bash -cd +cd ``` + ```bash chmod -R g+w var vendor pub/static pub/media app/etc ``` + ```bash chmod u+x bin/magento ``` To optionally enter all commands on one line, enter the following assuming Magento is installed in `/var/www/html/magento2`: + ```bash cd /var/www/html/magento2 && chmod -R g+w var vendor pub/static pub/media app/etc && chmod u+x bin/magento ``` @@ -27,6 +30,7 @@ cd /var/www/html/magento2 && chmod -R g+w var vendor pub/static pub/media app/et After you set file system permissions, manually clear the `var/cache`, `var/page_cache`, and `var/generation` directories. A sample command follows: + ```bash rm -rf var/cache/* var/page_cache/* var/generation/* ``` @@ -36,22 +40,27 @@ rm -rf var/cache/* var/page_cache/* var/generation/* If you run the Magento application with two users, enter the following commands as a user with `root` privileges: ```bash -cd +cd ``` + ```bash find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + ``` + ```bash find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + ``` + ```bash chown -R : . ``` + ```bash chmod u+x bin/magento ``` To optionally enter all commands on one line, enter the following assuming Magento is installed in `/var/www/html/magento2` and the web server group name is `apache`: + ```bash cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :apache . && chmod u+x bin/magento ``` diff --git a/_includes/install/sampledata/sample-data-after.md b/_includes/install/sampledata/sample-data-after.md index 2bdc6497670..e56253b4cd4 100644 --- a/_includes/install/sampledata/sample-data-after.md +++ b/_includes/install/sampledata/sample-data-after.md @@ -1,5 +1,7 @@ ## Complete the sample data installation {#sample-next-steps} -After you download the sample data packages, log in to your Magento server as, or switch to, the Magento file system owner and enter the following command: +After you download the sample data packages, log in to your Magento server as, or switch to, the Magento file system owner and enter the following command in folder: - php /bin/magento setup:upgrade +```bash +bin/magento setup:upgrade +``` diff --git a/_includes/install/sampledata/sample-data-clone.md b/_includes/install/sampledata/sample-data-clone.md index 00f796bf3ad..c01e9bdf089 100644 --- a/_includes/install/sampledata/sample-data-clone.md +++ b/_includes/install/sampledata/sample-data-clone.md @@ -46,16 +46,21 @@ To clone the Magento sample data GitHub repository using the SSH protocol: An example follows: - git clone git@github.com:magento/magento2-sample-data.git + ```bash + git clone git@github.com:magento/magento2-sample-data.git + ``` + 6. Wait for the repository to clone on your server. {:.bs-callout .bs-callout-info} If the following error displays, make sure you [shared your SSH key](https://help.github.com/articles/generating-ssh-keys/) with GitHub:
- ``` + + ```terminal Cloning into 'magento2'... Permission denied (publickey). fatal: The remote end hung up unexpectedly - ```` + ``` + 7. Ensure you checkout the branch of the sample data repository that corresponds with the branch you used from the main `magento2` repository. For example: @@ -66,11 +71,17 @@ To clone the Magento sample data GitHub repository using the SSH protocol: To checkout the correct branch, run the following command from the sample data repository's root directory (assuming you need the `2.2.5` branch): - git checkout 2.2.5 -8. Change to ``. + ```bash + git checkout 2.2.5 + ``` + +8. Change to ``. 9. Enter the following command to create symbolic links between the files you just cloned so sample data works properly: - php -f /dev/tools/build-sample-data.php -- --ce-source="" + ```bash + php -f /dev/tools/build-sample-data.php -- --ce-source="" + ``` + 10. Wait for the command to complete. 11. See [Set file system permissions and ownership](#samp-data-perms). @@ -92,8 +103,11 @@ To clone the Magento sample data GitHub repository using the HTTPS protocol: 5. Enter `git clone` and paste the value you obtained from step 1. An example follows: - - git clone https://github.com/magento/magento2-sample-data.git + + ```bash + git clone https://github.com/magento/magento2-sample-data.git + ``` + 6. Wait for the repository to clone on your server. 7. Ensure you checkout the branch of the sample data repository that corresponds with the branch you used from the main `magento2` repository. @@ -105,21 +119,32 @@ To clone the Magento sample data GitHub repository using the HTTPS protocol: To checkout the correct branch, run the following command from the sample data repository's root directory (assuming you need the `2.2.5` branch): - git checkout 2.2.5 -8. Change to ``. + ```bash + git checkout 2.2.5 + ``` + +8. Change to ``. 9. Enter the following command to create symbolic links between the files you just cloned so sample data works properly: - php -f /dev/tools/build-sample-data.php -- --ce-source="" + ```bash + php -f /dev/tools/build-sample-data.php -- --ce-source="" + ``` For example, - - php -f /dev/tools/build-sample-data.php -- --ce-source="/var/www/magento2" + + ```bash + php -f /dev/tools/build-sample-data.php -- --ce-source="/var/www/magento2" + ``` 10. Wait for the command to complete. 11. See the next section. {:.bs-callout .bs-callout-warning} -If you're installing sample data _after_ installing Magento, you must also run the following command to update the database and schema: `php /bin/magento setup:upgrade`. +If you're installing sample data _after_ installing Magento, you must also run the following command to update the database and schema: + +```bash +/bin/magento setup:upgrade +``` ## Set file system ownership and permissions {#samp-data-perms} @@ -130,7 +155,9 @@ To set file system permissions and ownership on the sample data repository: 1. Change to your sample data clone directory. 2. Set ownership: - chown -R : . + ```bash + chown -R : . + ``` Typical examples: @@ -140,11 +167,19 @@ To set file system permissions and ownership on the sample data repository: 3. Set permissions: - find . -type d -exec chmod g+ws {} + + ```bash + find . -type d -exec chmod g+ws {} + + ``` + 4. Clear static files: - cd /var - rm -rf cache/* page_cache/* generation/* + ```bash + cd /var + ``` + + ```bash + rm -rf cache/* page_cache/* generation/* + ``` diff --git a/_includes/install/sampledata/sample-data-composer.md b/_includes/install/sampledata/sample-data-composer.md index 303c63bd328..a04d483fa44 100644 --- a/_includes/install/sampledata/sample-data-composer.md +++ b/_includes/install/sampledata/sample-data-composer.md @@ -19,12 +19,18 @@ If you're a contributing developer, refer to [Install by cloning repositories]({ {:.bs-callout .bs-callout-warning} Do not install sample data if your Magento application is set for [production mode]({{ page.baseurl }}/config-guide/bootstrap/magento-modes.html#production-mode). Switch to [developer mode]({{ page.baseurl }}/config-guide/bootstrap/magento-modes.html#developer-mode) first. Installing sample data in production mode [fails]({{ page.baseurl }}/install-gde/trouble/tshoot_sample-data.html#trouble-samp-prod). -To install sample data using the command line, enter the following command as the Magento file system owner: +To install sample data using the command line, enter the following command as the Magento file system owner in the `` folder: - php /bin/magento sampledata:deploy +```bash +bin/magento sampledata:deploy +``` {:.bs-callout .bs-callout-warning} -If you're installing sample data _after_ installing Magento, you must also run the following command to update the database and schema: `php /bin/magento setup:upgrade` +If you're installing sample data _after_ installing Magento, you must also run the following command to update the database and schema in the `` folder: + +```bash +bin/magento setup:upgrade +``` You are required to [authenticate]({{ page.baseurl }}/install-gde/prereq/connect-auth.html) to complete the action. @@ -32,8 +38,10 @@ You are required to [authenticate]({{ page.baseurl }}/install-gde/prereq/connect The following authentication error might display: +```terminal [Composer\Downloader\TransportException] The 'https://repo.magento.com/packages.json' URL required authentication. You must be using the interactive console to authenticate +``` If the error displays, change to your Magento installation directory and run `composer update`, which will prompt you for your [authentication keys]({{ page.baseurl }}/install-gde/prereq/connect-auth.html). diff --git a/_includes/install/trouble/rc_cron.md b/_includes/install/trouble/rc_cron.md index d02e70c121e..3b163802bdb 100644 --- a/_includes/install/trouble/rc_cron.md +++ b/_includes/install/trouble/rc_cron.md @@ -8,23 +8,31 @@ To verify whether or not your crontab is set up: 1. Log in to your Magento server as, or switch to, the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 2. See if the following file exists: - - ls -al /var/.setup_cronjob_status + + ```bash + ls -al /var/.setup_cronjob_status + ``` If the file exists, cron has run successfully in the past. If the file _does not_ exist, either you haven't yet installed Magento or cron isn't running. In either case, continue with the next step. 3. Get more detail about cron. As a user with `root` privileges, enter the following command: - crontab -u -l + ```bash + crontab -u -l + ``` For example, on CentOS - crontab -u magento_user -l + ```bash + crontab -u magento_user -l + ``` If no crontab has been set up for the user, the following message displays: - no crontab for magento_user + ```terminal + no crontab for magento_user + ``` Your crontab tells you the following: diff --git a/_includes/migration/find-version.md b/_includes/migration/find-version.md index 547fbc36931..5ecc122bdc3 100644 --- a/_includes/migration/find-version.md +++ b/_includes/migration/find-version.md @@ -2,13 +2,21 @@ To find the version of the Magento software: -* If you downloaded the Magento software using a Composer metapackage, enter the following command: +* If you downloaded the Magento software using a Composer metapackage, enter the following command in the `` folder: - php /bin/magento --version + ```bash + bin/magento --version + ``` + * If you cloned the Magento 2 GitHub repository, enter the following commands: - cd - git branch + ```bash + cd + ``` + + ```bash + git branch + ``` * If you're currently in the `develop` branch, you must change to a [released branch]({{ page.baseurl }}/install-gde/install/cli/dev_downgrade.html) before you continue. diff --git a/_includes/vendor/types-def.md b/_includes/vendor/types-def.md index 9a65f6767bb..f0de98771b9 100644 --- a/_includes/vendor/types-def.md +++ b/_includes/vendor/types-def.md @@ -9,4 +9,4 @@ where * `language-`: Language package. {:.bs-callout .bs-callout-info} - Currently, themes are located under `/app/design/frontend` or `/app/design/adminhtml`. + Currently, themes are located under `/app/design/frontend` or `/app/design/adminhtml`. From c59ecddd480d024ade32bb6954efb4f400cd88de Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Thu, 9 May 2019 15:20:56 -0500 Subject: [PATCH 2/2] Removed a ton of tabs and formating fixes. --- _includes/comp-man/dependency.md | 17 +-- _includes/config/locate-session.md | 24 ++-- .../install/file-system-perms-oneuser.md | 70 +++++----- .../install/file-system-perms-oneuser_22.md | 72 +++++----- .../install/file-system-perms-twouser.md | 128 ++++++++++-------- .../install/file-system-perms-twouser_22.md | 127 +++++++++-------- _includes/install/first-steps-cli.md | 38 +++--- _includes/install/new-cli-intro.md | 22 +-- .../install/sampledata/sample-data-after.md | 2 +- .../install/sampledata/sample-data-clone.md | 87 ++++++------ .../sampledata/sample-data-composer.md | 13 +- _includes/install/trouble/rc_perms.md | 11 +- _includes/install/trouble/rc_php-version.md | 39 +++--- _includes/migration/find-version.md | 30 ++-- _includes/vendor/types-def.md | 16 +-- 15 files changed, 366 insertions(+), 330 deletions(-) diff --git a/_includes/comp-man/dependency.md b/_includes/comp-man/dependency.md index 49b5adbdbb6..6409c36cc6e 100644 --- a/_includes/comp-man/dependency.md +++ b/_includes/comp-man/dependency.md @@ -4,9 +4,9 @@ We suggest you try the following solutions in the order shown: -* [Conflicting dependencies](#trouble-depend-conflict) -* [File system permissions issues](#trouble-depend-permission) -* [The Component Dependency Check status never changes](#trouble-depend-state) +* [Conflicting dependencies](#trouble-depend-conflict) +* [File system permissions issues](#trouble-depend-permission) +* [The Component Dependency Check status never changes](#trouble-depend-state) ### Conflicting dependencies {#trouble-depend-conflict} @@ -14,11 +14,12 @@ The message `We found conflicting component dependencies` displays if Composer c Following is a sample failure message: - We found conflicting component dependencies. - - You are trying to update package(s) magento/module-sample-data to 1.0.0-beta - We've detected conflicts with the following packages: - - magento/sample-data version 0.74.0-beta15. Please try to update it to one of the following package versions: 0.74.0-beta16, 0.74.0-beta14, 0.74.0-beta13, 0.74.0-beta12, 0.74.0-beta11, 0.74.0-beta10, 0.74.0-beta9, 0.74.0-beta8, 0.74.0-beta7 +```terminal + We found conflicting component dependencies. + You are trying to update package(s) magento/module-sample-data to 1.0.0-beta + We've detected conflicts with the following packages: + - magento/sample-data version 0.74.0-beta15. Please try to update it to one of the following package versions: 0.74.0-beta16, 0.74.0-beta14, 0.74.0-beta13, 0.74.0-beta12, 0.74.0-beta11, 0.74.0-beta10, 0.74.0-beta9, 0.74.0-beta8, 0.74.0-beta7 +``` {:.bs-callout .bs-callout-info} The message you see will likely be different. diff --git a/_includes/config/locate-session.md b/_includes/config/locate-session.md index e8bc8ccc9a1..c4db440aa33 100644 --- a/_includes/config/locate-session.md +++ b/_includes/config/locate-session.md @@ -2,26 +2,28 @@ This topic discusses how to locate where your session files are stored. The Magento application uses the following logic to store session files: -* If you configured memcached, sessions are stored in RAM; for more information, see [Use memcached for session storage]({{ page.baseurl }}/config-guide/memcache/memcache.html). -* If you configured Redis, sessions are stored on the Redis server; for more information, see [Use Redis for page caching or session storage]({{ page.baseurl }}/config-guide/redis/config-redis.html). -* If you're using the default file-based session storage, we store sessions in the following locations in the order shown: +* If you configured memcached, sessions are stored in RAM; for more information, see [Use memcached for session storage]({{ page.baseurl }}/config-guide/memcache/memcache.html). +* If you configured Redis, sessions are stored on the Redis server; for more information, see [Use Redis for page caching or session storage]({{ page.baseurl }}/config-guide/redis/config-redis.html). +* If you're using the default file-based session storage, we store sessions in the following locations in the order shown: - 1. Directory defined in [`env.php`](#session-where-env) - 2. Directory defined in [`php.ini`](#session-where-phpini) - 3. `/var/session` directory + 1. Directory defined in [`env.php`](#session-where-env) + 1. Directory defined in [`php.ini`](#session-where-phpini) + 1. `/var/session` directory ### `env.php` example {#session-where-env} + A sample snippet from `/app/etc/env.php` follows: ```php - 'session' => - array ( - 'save' => 'files', - 'save_path' => '/var/www/session', - ), + 'session' => + array ( + 'save' => 'files', + 'save_path' => '/var/www/session', + ), ``` The preceding example stores session files in `/var/www/session` ### `php.ini` example {#session-where-phpini} + As a user with `root` privileges, open your `php.ini` file and search for the value of `session.save_path`. This identifies where sessions are stored. diff --git a/_includes/install/file-system-perms-oneuser.md b/_includes/install/file-system-perms-oneuser.md index 5f30e83305d..797cddcce33 100644 --- a/_includes/install/file-system-perms-oneuser.md +++ b/_includes/install/file-system-perms-oneuser.md @@ -1,50 +1,50 @@ To set permissions before you install the Magento software: -1. Log in to your Magento server. -2. Use a file manager application provided by your shared hosting provider to verify write permissions are set on the following directories: +1. Log in to your Magento server. +1. Use a file manager application provided by your shared hosting provider to verify write permissions are set on the following directories: - * `vendor` (Composer or compressed archive installation) - * `app/etc` - * `pub/static` - * `var` - * Any other static resources + * `vendor` (Composer or compressed archive installation) + * `app/etc` + * `pub/static` + * `var` + * Any other static resources -2. If you have command-line access, enter the following commands in the order shown: +1. If you have command-line access, enter the following commands in the order shown: ```bash - cd - ``` - - ```bash - find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + - ``` - - ```bash - find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + - ``` - - ```bash - chmod u+x bin/magento - ``` - - To optionally enter all commands on one line, enter the following assuming Magento is installed in `/var/www/html/magento2`: + cd + ``` ```bash - cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento - ``` - -3. If you haven't done so already, get the Magento software in one of the following ways: + find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + + ``` - * [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) - * [Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) - * [Clone the repository (contributing developers only)]({{ page.baseurl }}/install-gde/prereq/dev_install.html) -4. After you have set file system ownership and permissions, continue with any of the following: + ```bash + find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + + ``` + + ```bash + chmod u+x bin/magento + ``` + +1. To optionally enter all commands on one line, enter the following, assuming Magento is installed in `/var/www/html/magento2`: + + ```bash + cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento + ``` + +If you haven't done so already, get the Magento software in one of the following ways: + +* [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) +* [Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) +* [Clone the repository (contributing developers only)]({{ page.baseurl }}/install-gde/prereq/dev_install.html) - * [Command-line installation]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) - * [Setup Wizard installation]({{ page.baseurl }}/install-gde/install/web/install-web.html) +1. After you have set file system ownership and permissions, continue with any of the following: + +* [Command-line installation]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) +* [Setup Wizard installation]({{ page.baseurl }}/install-gde/install/web/install-web.html) {:.bs-callout .bs-callout-info} To further restrict permissions after installing the Magento software, you [configure a Magento umask]({{ page.baseurl }}/install-gde/install/post-install-umask.html). - *[contributing developer]: A developer who contributes code to the Magento 2 CE codebase diff --git a/_includes/install/file-system-perms-oneuser_22.md b/_includes/install/file-system-perms-oneuser_22.md index 24e6b399066..8389b1ff9bc 100644 --- a/_includes/install/file-system-perms-oneuser_22.md +++ b/_includes/install/file-system-perms-oneuser_22.md @@ -1,51 +1,51 @@ To set permissions before you install the Magento software: -1. Log in to your Magento server. -2. Use a file manager application provided by your shared hosting provider to verify write permissions are set on the following directories: +1. Log in to your Magento server. +1. Use a file manager application provided by your shared hosting provider to verify write permissions are set on the following directories: - * `vendor` (Composer or compressed archive installation) - * `app/etc` - * `pub/static` - * `var` - * `generated` - * Any other static resources + * `vendor` (Composer or compressed archive installation) + * `app/etc` + * `pub/static` + * `var` + * `generated` + * Any other static resources -2. If you have command-line access, enter the following commands in the order shown: +1. If you have command-line access, enter the following commands in the order shown: ```bash - cd - ``` - - ```bash - find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + - ``` - - ```bash - find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + - ``` - - ```bash - chmod u+x bin/magento - ``` - - To optionally enter all commands on one line, enter the following assuming Magento is installed in `/var/www/html/magento2`: + cd + ``` ```bash - cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento - ``` - -3. If you haven't done so already, get the Magento software in one of the following ways: + find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + + ``` - * [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) - * [Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) - * [Clone the repository (contributing developers only)]({{ page.baseurl }}/install-gde/prereq/dev_install.html) -4. After you have set file system ownership and permissions, continue with any of the following: + ```bash + find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + + ``` + + ```bash + chmod u+x bin/magento + ``` + +To optionally enter all commands on one line, enter the following assuming Magento is installed in `/var/www/html/magento2`: + + ```bash + cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento + ``` + +1. If you haven't done so already, get the Magento software in one of the following ways: + + * [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) + * [Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) + * [Clone the repository (contributing developers only)]({{ page.baseurl }}/install-gde/prereq/dev_install.html) - * [Command-line installation]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) - * [Setup Wizard installation]({{ page.baseurl }}/install-gde/install/web/install-web.html) +1. After you have set file system ownership and permissions, continue with any of the following: + + * [Command-line installation]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) + * [Setup Wizard installation]({{ page.baseurl }}/install-gde/install/web/install-web.html) {:.bs-callout .bs-callout-info} To further restrict permissions after installing the Magento software, you [configure a Magento umask]({{ page.baseurl }}/install-gde/install/post-install-umask.html). - *[contributing developer]: A developer who contributes code to the Magento 2 CE codebase diff --git a/_includes/install/file-system-perms-twouser.md b/_includes/install/file-system-perms-twouser.md index a05d82ef42d..c5e85d81dd0 100644 --- a/_includes/install/file-system-perms-twouser.md +++ b/_includes/install/file-system-perms-twouser.md @@ -1,11 +1,11 @@ Complete the following tasks in the order shown: -* [About the shared group](#mage-owner-about-group) -* [Step 1: Create the Magento file system owner and give the user a strong password](#mage-owner-create-user) -* [Step 2: Find the web server group](#install-update-depend-user-findgroup) -* [Step 3: Put the Magento file system owner in the web server's group](#install-update-depend-user-add2group) -* [Step 4: Get the Magento software](#perms-get-software) -* [Step 5: Set ownership and permissions for the shared group](#perms-set-two-users) +* [About the shared group](#mage-owner-about-group) +* [Step 1: Create the Magento file system owner and give the user a strong password](#mage-owner-create-user) +* [Step 2: Find the web server group](#install-update-depend-user-findgroup) +* [Step 3: Put the Magento file system owner in the web server's group](#install-update-depend-user-add2group) +* [Step 4: Get the Magento software](#perms-get-software) +* [Step 5: Set ownership and permissions for the shared group](#perms-set-two-users) ### About the shared group {#mage-owner-about-group} @@ -22,11 +22,15 @@ This section discusses how to create the Magento file system owner. (Magento fil To create a user on CentOS or Ubuntu, enter the following command as a user with `root` privileges: - adduser +```bash +adduser +``` To give the user a password, enter the following command as a user with `root` privileges: - passwd +```bash +passwd +``` Follow the prompts on your screen to create a password for the user. @@ -35,8 +39,13 @@ If you don't have `root` privileges on your Magento server, you can use another For example, to create a user named `magento_user` and give the user a password, enter: - sudo adduser magento_user - sudo passwd magento_user +```bash +sudo adduser magento_user +``` + +```bash +sudo passwd magento_user +``` {:.bs-callout .bs-callout-warning} Because the point of creating this user is to provide added security, make sure you create a [strong password](https://en.wikipedia.org/wiki/Password_strength). @@ -45,85 +54,94 @@ Because the point of creating this user is to provide added security, make sure To find the web server user's group: -* CentOS: +* CentOS: + +```bash +grep -E -i '^user|^group' /etc/httpd/conf/httpd.conf +``` - ```bash - grep -E -i '^user|^group' /etc/httpd/conf/httpd.conf - ``` or - ```bash - grep -Ei '^user|^group' /etc/httpd/conf/httpd.conf - ``` - -Typically, the user and group name are both `apache` -* Ubuntu: `ps aux | grep apache` to find the apache user, then `groups ` to find the group - Typically, the username and the group name are both `www-data` +```bash +grep -Ei '^user|^group' /etc/httpd/conf/httpd.conf +``` + +Typically, the user and group name are both `apache`. + +* Ubuntu: `ps aux | grep apache` to find the apache user, then `groups ` to find the group. + +Typically, the username and the group name are both `www-data`. ### Step 3: Put the Magento file system owner in the web server's group {#install-update-depend-user-add2group} To put the Magento file system owner in the web server's group (assuming the typical Apache group name for CentOS and Ubuntu), enter the following command as a user with `root` privileges: -* CentOS: `usermod -a -G apache ` -* Ubuntu: `usermod -a -G www-data ` +* CentOS: `usermod -a -G apache ` +* Ubuntu: `usermod -a -G www-data ` {:.bs-callout .bs-callout-info} The `-a -G` options are important because they add `apache` or `www-data` as a _secondary_ group to the user account, which preserves the user's _primary_ group. Adding a secondary group to a user account helps [restrict file ownership and permissions](#perms-set-two-users) to ensure members of a shared group only have access to certain files. For example, to add `apache` as a secondary group to user `magento_user` on CentOS: - sudo usermod -a -G apache magento_user +```bash +sudo usermod -a -G apache magento_user +``` To confirm your Magento user is a member of the web server group, enter the following command: - groups magento_user +```bash +groups magento_user +``` The following sample result shows the user's primary (`magento`) and secondary (`apache`) groups. - magento_user : magento_user apache +```bash +magento_user : magento_user apache +``` {:.bs-callout .bs-callout-info} Typically, the username and primary group name are the same. To complete the task, restart the web server: -* Ubuntu: `service apache2 restart` -* CentOS: `service httpd restart` +* Ubuntu: `service apache2 restart` +* CentOS: `service httpd restart` ### Step 4: Get the Magento software {#perms-get-software} If you haven't done so already, get the Magento software in one of the following ways: -* [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) -* [Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) -* [Clone the repository (contributing developers only)]({{ page.baseurl }}/install-gde/prereq/dev_install.html) +* [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) +* [Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) +* [Clone the repository (contributing developers only)]({{ page.baseurl }}/install-gde/prereq/dev_install.html) ### Step 5: Set ownership and permissions for the shared group {#perms-set-two-users} To set ownership and permissions before you install the Magento software: -1. Log in to your Magento server as, or switch to, the Magento file system owner. -2. Enter the following commands in the order shown: - - ```bash - cd - ``` - - ```bash - find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + - ``` - - ```bash - find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + - ``` - - ```bash - sudo chown -R : . - ``` - - ```bash - chmod u+x bin/magento - ``` +1. Log in to your Magento server as, or switch to, the Magento file system owner. +1. Enter the following commands in the order shown: + +```bash +cd +``` + +```bash +find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + +``` + +```bash +find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + +``` + +```bash +sudo chown -R : . +``` + +```bash +chmod u+x bin/magento +``` {% include install/file-system-perms-twouser_cmds-only.md %} @@ -131,5 +149,5 @@ To set ownership and permissions before you install the Magento software: After you have set file system ownership and permissions, continue with any of the following: -* [Command-line installation]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) -* [Setup Wizard installation]({{ page.baseurl }}/install-gde/install/web/install-web.html) +* [Command-line installation]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) +* [Setup Wizard installation]({{ page.baseurl }}/install-gde/install/web/install-web.html) diff --git a/_includes/install/file-system-perms-twouser_22.md b/_includes/install/file-system-perms-twouser_22.md index 5f60be2b7ae..90a9cfe8419 100644 --- a/_includes/install/file-system-perms-twouser_22.md +++ b/_includes/install/file-system-perms-twouser_22.md @@ -1,11 +1,11 @@ Complete the following tasks in the order shown: -* [About the shared group](#mage-owner-about-group) -* [Step 1: Create the Magento file system owner and give the user a strong password](#mage-owner-create-user) -* [Step 2: Find the web server group](#install-update-depend-user-findgroup) -* [Step 3: Put the Magento file system owner in the web server's group](#install-update-depend-user-add2group) -* [Step 4: Get the Magento software](#perms-get-software) -* [Step 5: Set ownership and permissions for the shared group](#perms-set-two-users) +* [About the shared group](#mage-owner-about-group) +* [Step 1: Create the Magento file system owner and give the user a strong password](#mage-owner-create-user) +* [Step 2: Find the web server group](#install-update-depend-user-findgroup) +* [Step 3: Put the Magento file system owner in the web server's group](#install-update-depend-user-add2group) +* [Step 4: Get the Magento software](#perms-get-software) +* [Step 5: Set ownership and permissions for the shared group](#perms-set-two-users) ### About the shared group {#mage-owner-about-group} @@ -22,11 +22,15 @@ This section discusses how to create the Magento file system owner. (Magento fil To create a user on CentOS or Ubuntu, enter the following command as a user with `root` privileges: - adduser +```bash +adduser +``` To give the user a password, enter the following command as a user with `root` privileges: - passwd +```bash +passwd +``` Follow the prompts on your screen to create a password for the user. @@ -35,8 +39,13 @@ If you don't have `root` privileges on your Magento server, you can use another For example, to create a user named `magento_user` and give the user a password, enter: - sudo adduser magento_user - sudo passwd magento_user +```bash +sudo adduser magento_user +``` + +```bash +sudo passwd magento_user +``` {:.bs-callout .bs-callout-warning} Because the point of creating this user is to provide added security, make sure you create a [strong password](https://en.wikipedia.org/wiki/Password_strength). @@ -45,86 +54,94 @@ Because the point of creating this user is to provide added security, make sure To find the web server user's group: -* CentOS: +* CentOS: + +```bash +grep -E -i '^user|^group' /etc/httpd/conf/httpd.conf +``` - ```bash - grep -E -i '^user|^group' /etc/httpd/conf/httpd.conf - ``` or - ```bash - grep -Ei '^user|^group' /etc/httpd/conf/httpd.conf - ``` - -Typically, the user and group name are both `apache` -* Ubuntu: `ps aux | grep apache` to find the apache user, then `groups ` to find the group +```bash +grep -Ei '^user|^group' /etc/httpd/conf/httpd.conf +``` + +Typically, the user and group name are both `apache`. - Typically, the username and the group name are both `www-data` +* Ubuntu: `ps aux | grep apache` to find the apache user, then `groups ` to find the group. + +Typically, the username and the group name are both `www-data`. ### Step 3: Put the Magento file system owner in the web server's group {#install-update-depend-user-add2group} To put the Magento file system owner in the web server's primary group (assuming the typical Apache group name for CentOS and Ubuntu), enter the following command as a user with `root` privileges: -* CentOS: `usermod -a -G apache ` -* Ubuntu: `usermod -a -G www-data ` +* CentOS: `usermod -a -G apache ` +* Ubuntu: `usermod -a -G www-data ` {:.bs-callout .bs-callout-info} The `-a -G` options are important because they add `apache` or `www-data` as a _secondary_ group to the user account, which preserves the user's _primary_ group. Adding a secondary group to a user account helps [restrict file ownership and permissions](#perms-set-two-users) to ensure members of a shared group only have access to certain files. For example, to add the user `magento_user` to the `apache` primary group on CentOS: - sudo usermod -a -G apache magento_user +```bash +sudo usermod -a -G apache magento_user +``` To confirm your Magento user is a member of the web server group, enter the following command: - groups magento_user +```bash +groups magento_user +``` The following sample result shows the user's primary (`magento`) and secondary (`apache`) groups. - magento_user : magento_user apache +```bash +magento_user : magento_user apache +``` {:.bs-callout .bs-callout-info} Typically, the username and primary group name are the same. To complete the task, restart the web server: -* Ubuntu: `service apache2 restart` -* CentOS: `service httpd restart` +* Ubuntu: `service apache2 restart` +* CentOS: `service httpd restart` ### Step 4: Get the Magento software {#perms-get-software} If you haven't done so already, get the Magento software in one of the following ways: -* [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) -* [Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) -* [Clone the repository (contributing developers only)]({{ page.baseurl }}/install-gde/prereq/dev_install.html) +* [Compressed archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) +* [Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) +* [Clone the repository (contributing developers only)]({{ page.baseurl }}/install-gde/prereq/dev_install.html) ### Step 5: Set ownership and permissions for the shared group {#perms-set-two-users} To set ownership and permissions before you install the Magento software: -1. Log in to your Magento server as, or switch to, the Magento file system owner. -2. Enter the following commands in the order shown: - - ```bash - cd - ``` - - ```bash - find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + - ``` - - ```bash - find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + - ``` - - ```bash - sudo chown -R : . - ``` - - ```bash - chmod u+x bin/magento - ``` +1. Log in to your Magento server as, or switch to, the Magento file system owner. +1. Enter the following commands in the order shown: + +```bash +cd +``` + +```bash +find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + +``` + +```bash +find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + +``` + +```bash +sudo chown -R : . +``` + +```bash +chmod u+x bin/magento +``` {% include install/file-system-perms-twouser_cmds-only_22.md %} @@ -132,5 +149,5 @@ To set ownership and permissions before you install the Magento software: After you have set file system ownership and permissions, continue with any of the following: -* [Command-line installation]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) -* [Setup Wizard installation]({{ page.baseurl }}/install-gde/install/web/install-web.html) +* [Command-line installation]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) +* [Setup Wizard installation]({{ page.baseurl }}/install-gde/install/web/install-web.html) diff --git a/_includes/install/first-steps-cli.md b/_includes/install/first-steps-cli.md index 362c8f031d7..ed8de464e2f 100644 --- a/_includes/install/first-steps-cli.md +++ b/_includes/install/first-steps-cli.md @@ -1,29 +1,29 @@ -1. Log in to the Magento server as, or switch to, a user who has permissions to write to the Magento file system. One way to do this is to [switch to the Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). +1. Log in to the Magento server as, or switch to, a user who has permissions to write to the Magento file system. One way to do this is to [switch to the Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). - If you use the bash shell, you can also use the following syntax to switch to the Magento file system owner and enter the command at the same time: +If you use the bash shell, you can also use the following syntax to switch to the Magento file system owner and enter the command at the same time: - ```bash - su -s /bin/bash -c - ``` +```bash +su -s /bin/bash -c +``` - If the Magento file system owner does not allow logins you can do the following: +If the Magento file system owner does not allow logins you can do the following: - ```bash - sudo -u - ``` - -2. To run Magento commands from any directory, add `/bin` to your system `PATH`. +```bash +sudo -u +``` - Because shells have differing syntax, consult a reference like [unix.stackexchange.com](http://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables). +1. To run Magento commands from any directory, add `/bin` to your system `PATH`. - bash shell example for CentOS: +Because shells have differing syntax, consult a reference like [unix.stackexchange.com](http://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables). - ```bash - export PATH=$PATH:/var/www/html/magento2/bin - ``` +bash shell example for CentOS: + +```bash +export PATH=$PATH:/var/www/html/magento2/bin +``` {:.bs-callout .bs-callout-info} You can also run the commands in the following ways: -- `cd /bin` and run them as `./magento ` -- `/bin/magento ` -- `` is a subdirectory of your web server's docroot. [Need help locating the docroot?]({{ page.baseurl }}/install-gde/basics/basics_docroot.html) +- `cd /bin` and run them as `./magento ` +- `/bin/magento ` +- `` is a subdirectory of your web server's docroot. [Need help locating the docroot?]({{ page.baseurl }}/install-gde/basics/basics_docroot.html) diff --git a/_includes/install/new-cli-intro.md b/_includes/install/new-cli-intro.md index 2ec0d8d42c4..77431d63bba 100644 --- a/_includes/install/new-cli-intro.md +++ b/_includes/install/new-cli-intro.md @@ -1,16 +1,16 @@ Magento has one command-line interface that performs both installation and configuration tasks: `/bin/magento`. The new interface performs multiple tasks, including: -- Installing Magento (and related tasks such as creating or updating the database schema, creating the deployment configuration, and so on). -- Clearing the cache. -- Managing indexes, including reindexing. -- Creating translation dictionaries and translation packages. -- Generating non-existent classes such as factories and interceptors for plug-ins, generating the dependency injection configuration for the object manager. -- Deploying static view files. -- Creating CSS from Less. +- Installing Magento (and related tasks such as creating or updating the database schema, creating the deployment configuration, and so on). +- Clearing the cache. +- Managing indexes, including reindexing. +- Creating translation dictionaries and translation packages. +- Generating non-existent classes such as factories and interceptors for plug-ins, generating the dependency injection configuration for the object manager. +- Deploying static view files. +- Creating CSS from Less. Other benefits: -- A single command (`/bin/magento list`) lists all available installation and configuration commands. -- Consistent user interface based on Symfony. -- The CLI is extensible so third party developers can "plug in" to it. This has the additional benefit of eliminating users' learning curve. -- Commands for disabled modules do not display. +- A single command (`/bin/magento list`) lists all available installation and configuration commands. +- Consistent user interface based on Symfony. +- The CLI is extensible so third party developers can "plug in" to it. This has the additional benefit of eliminating users' learning curve. +- Commands for disabled modules do not display. diff --git a/_includes/install/sampledata/sample-data-after.md b/_includes/install/sampledata/sample-data-after.md index e56253b4cd4..379a73ffba7 100644 --- a/_includes/install/sampledata/sample-data-after.md +++ b/_includes/install/sampledata/sample-data-after.md @@ -1,6 +1,6 @@ ## Complete the sample data installation {#sample-next-steps} -After you download the sample data packages, log in to your Magento server as, or switch to, the Magento file system owner and enter the following command in folder: +After you download the sample data packages, log in to your Magento server as, or switch to, the Magento file system owner and enter the following command in `` folder: ```bash bin/magento setup:upgrade diff --git a/_includes/install/sampledata/sample-data-clone.md b/_includes/install/sampledata/sample-data-clone.md index c01e9bdf089..2822b41adbf 100644 --- a/_includes/install/sampledata/sample-data-clone.md +++ b/_includes/install/sampledata/sample-data-clone.md @@ -1,5 +1,4 @@ - ## Install sample data by cloning repositories {#sample-clone} This topic discusses how to clone and add Magento sample data if you cloned the Magento GitHub repository. This method is intended only for contributing developers (that is, developers who plan to contribute to the Magento 2 codebase). @@ -8,60 +7,60 @@ If you're not a contributing developer, choose one of the other options displaye Contributing developers can use this method of installing sample data *only* if all of the following are true: -* You use {{site.data.var.ce}} -* You [cloned the Magento 2 repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html). +* You use {{site.data.var.ce}} +* You [cloned the Magento 2 repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html). {:.bs-callout .bs-callout-warning} You can use sample data with either the `develop` branch (more current) or a released branch (such as `2.2` or `2.2.5` (more stable)). We recommend you use a released branch because it's more stable. If you're contributing code to the Magento 2 repository and you need the most recent code, use the `develop` branch. Regardless of the branch you choose, you must [clone]({{ page.baseurl }}/install-gde/prereq/dev_install.html) the corresponding branch of the Magento 2 GitHub repository. For example, sample data for the `develop` branch can be used *only* with the Magento 2 `develop` branch. See the following sections: -* [Clone the sample data repository](#clone-sample-repo) -* [Set file system ownership and permissions](#samp-data-perms) +* [Clone the sample data repository](#clone-sample-repo) +* [Set file system ownership and permissions](#samp-data-perms) ## Clone the sample data repository {#clone-sample-repo} This section discusses how to install Magento sample data by cloning the sample data repository. You can clone the sample data repository in any of the following ways: -* Clone with the [SSH protocol](#clone-sample-repo-ssh) -* Clone with the [HTTPS protocol](#instgde-prereq-compose-clone-https) +* Clone with the [SSH protocol](#clone-sample-repo-ssh) +* Clone with the [HTTPS protocol](#instgde-prereq-compose-clone-https) ### Clone with SSH {#clone-sample-repo-ssh} To clone the Magento sample data GitHub repository using the SSH protocol: -1. In a web browser, go to [the Magento sample data repository](https://github.com/magento/magento2-sample-data). -2. Next to the name of the branch, click **SSH** from the list. -3. Click **Copy to clipboard** +1. In a web browser, go to [the Magento sample data repository](https://github.com/magento/magento2-sample-data). +2. Next to the name of the branch, click **SSH** from the list. +3. Click **Copy to clipboard** The following figure shows an example. ![Clone the Magento GitHub repository using SSH]({{ site.baseurl }}/common/images/install_mage2_clone-ssh.png){:width="650px"} -4. Change to your web server's docroot directory. +4. Change to your web server's docroot directory. Typically, for Ubuntu, it's `/var/www` and for CentOS it's `/var/www/html`. Need [help locating the docroot?]({{ page.baseurl }}/install-gde/basics/basics_docroot.html) -5. Enter `git clone` and paste the value you obtained from step 1. +5. Enter `git clone` and paste the value you obtained from step 1. An example follows: ```bash git clone git@github.com:magento/magento2-sample-data.git ``` - -6. Wait for the repository to clone on your server. + +6. Wait for the repository to clone on your server. {:.bs-callout .bs-callout-info} If the following error displays, make sure you [shared your SSH key](https://help.github.com/articles/generating-ssh-keys/) with GitHub:
- + ```terminal Cloning into 'magento2'... Permission denied (publickey). fatal: The remote end hung up unexpectedly ``` - -7. Ensure you checkout the branch of the sample data repository that corresponds with the branch you used from the main `magento2` repository. + +7. Ensure you checkout the branch of the sample data repository that corresponds with the branch you used from the main `magento2` repository. For example: @@ -74,15 +73,15 @@ To clone the Magento sample data GitHub repository using the SSH protocol: ```bash git checkout 2.2.5 ``` - -8. Change to ``. -9. Enter the following command to create symbolic links between the files you just cloned so sample data works properly: + +8. Change to ``. +9. Enter the following command to create symbolic links between the files you just cloned so sample data works properly: ```bash php -f /dev/tools/build-sample-data.php -- --ce-source="" ``` - -10. Wait for the command to complete. + +10. Wait for the command to complete. 11. See [Set file system permissions and ownership](#samp-data-perms). @@ -90,26 +89,26 @@ To clone the Magento sample data GitHub repository using the SSH protocol: To clone the Magento sample data GitHub repository using the HTTPS protocol: -1. In a web browser, go to [the Magento sample data repository](https://github.com/magento/magento2-sample-data). -2. On the right side of the page, under the **clone URL** field, click **HTTPS**. -3. Click **Copy to clipboard**. +1. In a web browser, go to [the Magento sample data repository](https://github.com/magento/magento2-sample-data). +2. On the right side of the page, under the **clone URL** field, click **HTTPS**. +3. Click **Copy to clipboard**. The following figure shows an example. ![Clone the Magento GitHub repository using HTTPS]({{ site.baseurl }}/common/images/install_mage2_clone-https.png){:width="650px"} -4. Change to your web server's docroot directory. +4. Change to your web server's docroot directory. Typically, for Ubuntu, it's `/var/www` and for CentOS it's `/var/www/html`. -5. Enter `git clone` and paste the value you obtained from step 1. +5. Enter `git clone` and paste the value you obtained from step 1. An example follows: - + ```bash git clone https://github.com/magento/magento2-sample-data.git ``` - -6. Wait for the repository to clone on your server. -7. Ensure you checkout the branch of the sample data repository that corresponds with the branch you used from the main `magento2` repository. + +6. Wait for the repository to clone on your server. +7. Ensure you checkout the branch of the sample data repository that corresponds with the branch you used from the main `magento2` repository. For example: @@ -122,25 +121,25 @@ To clone the Magento sample data GitHub repository using the HTTPS protocol: ```bash git checkout 2.2.5 ``` - -8. Change to ``. -9. Enter the following command to create symbolic links between the files you just cloned so sample data works properly: + +8. Change to ``. +9. Enter the following command to create symbolic links between the files you just cloned so sample data works properly: ```bash php -f /dev/tools/build-sample-data.php -- --ce-source="" ``` For example, - + ```bash php -f /dev/tools/build-sample-data.php -- --ce-source="/var/www/magento2" ``` -10. Wait for the command to complete. -11. See the next section. +10. Wait for the command to complete. +11. See the next section. {:.bs-callout .bs-callout-warning} -If you're installing sample data _after_ installing Magento, you must also run the following command to update the database and schema: +If you're installing sample data _after_ installing Magento, you must also run the following command to update the database and schema: ```bash /bin/magento setup:upgrade @@ -152,8 +151,8 @@ Because the `php build-sample-data.php` script creates symlinks between the samp To set file system permissions and ownership on the sample data repository: -1. Change to your sample data clone directory. -2. Set ownership: +1. Change to your sample data clone directory. +2. Set ownership: ```bash chown -R : . @@ -165,18 +164,18 @@ To set file system permissions and ownership on the sample data repository: Ubuntu: `chown -R :www-data .` -3. Set permissions: +3. Set permissions: ```bash find . -type d -exec chmod g+ws {} + ``` - -4. Clear static files: + +4. Clear static files: ```bash cd /var ``` - + ```bash rm -rf cache/* page_cache/* generation/* ``` diff --git a/_includes/install/sampledata/sample-data-composer.md b/_includes/install/sampledata/sample-data-composer.md index a04d483fa44..ba558a1eafa 100644 --- a/_includes/install/sampledata/sample-data-composer.md +++ b/_includes/install/sampledata/sample-data-composer.md @@ -1,11 +1,10 @@ - This section discusses how to install sample data if you got the Magento software in any of the following ways: -* Downloaded a compressed archive from [Magento](https://magento.com/tech-resources/download). +* Downloaded a compressed archive from [Magento](https://magento.com/tech-resources/download). - If you downloaded an archive from GitHub, this method won't work because the `composer.json` file doesn't contain the `repo.magento.com` URL. -* Used `composer create-project` + If you downloaded an archive from GitHub, this method won't work because the `composer.json` file doesn't contain the `repo.magento.com` URL. +* Used `composer create-project` You can use this method of getting sample data for both {{site.data.var.ce}} or {{site.data.var.ee}}, but you must use the same [authentication keys]({{ page.baseurl }}/install-gde/prereq/connect-auth.html) you used to install Magento. @@ -39,9 +38,9 @@ You are required to [authenticate]({{ page.baseurl }}/install-gde/prereq/connect The following authentication error might display: ```terminal - [Composer\Downloader\TransportException] - The 'https://repo.magento.com/packages.json' URL required authentication. - You must be using the interactive console to authenticate +[Composer\Downloader\TransportException] +The 'https://repo.magento.com/packages.json' URL required authentication. +You must be using the interactive console to authenticate ``` If the error displays, change to your Magento installation directory and run `composer update`, which will prompt you for your [authentication keys]({{ page.baseurl }}/install-gde/prereq/connect-auth.html). diff --git a/_includes/install/trouble/rc_perms.md b/_includes/install/trouble/rc_perms.md index 9b225fd7f25..cc3d0db68fe 100644 --- a/_includes/install/trouble/rc_perms.md +++ b/_includes/install/trouble/rc_perms.md @@ -1,5 +1,4 @@ - ## File permissions readiness check issues Directories in the Magento file system must be writable by the web server user and the Magento file system owner, if applicable. An error similar to the following displays in the Web Setup Wizard if your permissions are not set properly: @@ -8,17 +7,19 @@ Directories in the Magento file system must be writable by the web server user a The way you resolve the issue depends on whether you have a one-user or two-user setup: -* *One user* means you log in to the Magento server as the same user that also runs the web server. This type of setup is common in shared hosting environments. -* *Two users* means you typically *cannot* log in as, or switch to, the web server user. You typically log in as one user and run the web server as a different user. This is typical in private hosting or if you have your own server. +* *One user* means you log in to the Magento server as the same user that also runs the web server. This type of setup is common in shared hosting environments. +* *Two users* means you typically *cannot* log in as, or switch to, the web server user. You typically log in as one user and run the web server as a different user. This is typical in private hosting or if you have your own server. ### One-user resolution If you have command-line access, enter the following command assuming Magento is installed in `/var/www/html/magento2`: - cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod g+w {} + && chmod u+x bin/magento +```bash +cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod g+w {} + && chmod u+x bin/magento +``` If you do not have command-line access, use an FTP client or a file manager application provided by your hosting provider to set permissions. ### Two-user resolution -{% include install/file-system-perms-twouser_cmds-only.md %} +{% include install/file-system-perms-twouser_cmds-only.md %} \ No newline at end of file diff --git a/_includes/install/trouble/rc_php-version.md b/_includes/install/trouble/rc_php-version.md index 88da81309e6..aa3b6ab714c 100644 --- a/_includes/install/trouble/rc_php-version.md +++ b/_includes/install/trouble/rc_php-version.md @@ -1,22 +1,21 @@ - ## PHP version readiness check issues You might encounter the following issues with the PHP version readiness check: -* The check fails because you're using an unsupported PHP version. +* The check fails because you're using an unsupported PHP version. - To solve this issue, use one of the supported versions listed in our [System Requirements]({{ page.baseurl }}/install-gde/system-requirements.html). +To solve this issue, use one of the supported versions listed in our [System Requirements]({{ page.baseurl }}/install-gde/system-requirements.html). -* The check reports the incorrect PHP version. +* The check reports the incorrect PHP version. - Typically, this happens only to advanced users who have multiple PHP versions installed. In some cases, the readiness check fails; in other cases, it might pass. +Typically, this happens only to advanced users who have multiple PHP versions installed. In some cases, the readiness check fails; in other cases, it might pass. -* The PHP readiness check doesn't display the PHP version as the following figure shows. +* The PHP readiness check doesn't display the PHP version as the following figure shows. - ![]({{ site.baseurl }}/common/images/upgr-tshoot-no-cron.png) + ![]({{ site.baseurl }}/common/images/upgr-tshoot-no-cron.png) - This is a symptom of incorrect cron job setup. For more information, see [Set up cron jobs]({{ page.baseurl }}/install-gde/install/post-install-config.html#post-install-cron). +This is a symptom of incorrect cron job setup. For more information, see [Set up cron jobs]({{ page.baseurl }}/install-gde/install/post-install-config.html#post-install-cron). ### PHP version is incorrect @@ -26,15 +25,15 @@ We assume that if you have this issue, you're an advanced user who has likely in To resolve the issue, try the following: -* Restart your web server or php-fm. -* Check the `$PATH` environment variable for multiple paths to PHP -* Use the `which php` command to locate the first PHP executable in your path; if it's not correct, remove it or create a symlink to the correct PHP version -* Use a [`phpinfo.php`]({{ page.baseurl }}/install-gde/prereq/optional.html#install-optional-phpinfo) page to collect more information -* Make sure you're running a supported PHP version according to our System Requirements: - - * [Version 2.0]({{ site.gdeurl }}install-gde/system-requirements.html) - * [Version 2.1]({{ site.gdeurl21 }}install-gde/system-requirements.html) - * [Version 2.2]({{ site.gdeurl22 }}install-gde/system-requirements.html) - * [Version 2.3]({{ site.gdeurl23 }}install-gde/system-requirements.html) - -* Set the same PHP settings for both the PHP command line and the PHP web server plug-in as discussed in [PHP configuration options]({{ page.baseurl }}/install-gde/prereq/php-centos.html) +* Restart your web server or php-fm. +* Check the `$PATH` environment variable for multiple paths to PHP +* Use the `which php` command to locate the first PHP executable in your path; if it's not correct, remove it or create a symlink to the correct PHP version +* Use a [`phpinfo.php`]({{ page.baseurl }}/install-gde/prereq/optional.html#install-optional-phpinfo) page to collect more information +* Make sure you're running a supported PHP version according to our System Requirements: + + * [Version 2.0]({{ site.gdeurl }}install-gde/system-requirements.html) + * [Version 2.1]({{ site.gdeurl21 }}install-gde/system-requirements.html) + * [Version 2.2]({{ site.gdeurl22 }}install-gde/system-requirements.html) + * [Version 2.3]({{ site.gdeurl23 }}install-gde/system-requirements.html) + +* Set the same PHP settings for both the PHP command line and the PHP web server plug-in as discussed in [PHP configuration options]({{ page.baseurl }}/install-gde/prereq/php-centos.html) diff --git a/_includes/migration/find-version.md b/_includes/migration/find-version.md index 5ecc122bdc3..dc05818590e 100644 --- a/_includes/migration/find-version.md +++ b/_includes/migration/find-version.md @@ -2,23 +2,23 @@ To find the version of the Magento software: -* If you downloaded the Magento software using a Composer metapackage, enter the following command in the `` folder: +* If you downloaded the Magento software using a Composer metapackage, enter the following command in the `` folder: - ```bash - bin/magento --version - ``` - -* If you cloned the Magento 2 GitHub repository, enter the following commands: +```bash +bin/magento --version +``` - ```bash - cd - ``` - - ```bash - git branch - ``` +* If you cloned the Magento 2 GitHub repository, enter the following commands: -* If you're currently in the `develop` branch, you must change to a [released branch]({{ page.baseurl }}/install-gde/install/cli/dev_downgrade.html) before you continue. +```bash +cd +``` + +```bash +git branch +``` + +* If you're currently in the `develop` branch, you must change to a [released branch]({{ page.baseurl }}/install-gde/install/cli/dev_downgrade.html) before you continue. ### Find the Data Migration Tool version {#migration-tool-version} @@ -28,4 +28,4 @@ To find the version of the migration tool: * Open `composer.json` in a text editor. * Find the value of "version" - This is the version of your Data Migration Tool. +This is the version of your Data Migration Tool. diff --git a/_includes/vendor/types-def.md b/_includes/vendor/types-def.md index f0de98771b9..f9faafcf360 100644 --- a/_includes/vendor/types-def.md +++ b/_includes/vendor/types-def.md @@ -1,12 +1,12 @@ where -* `` is the base directory in which your component is located. Typical values are `app/code` or `vendor` relative to the Magento installation directory. -* `` is the component's vendor name; for example, Magento's vendor name is `magento`. -* `` is one of the following: +* `` is the base directory in which your component is located. Typical values are `app/code` or `vendor` relative to the Magento installation directory. +* `` is the component's vendor name; for example, Magento's vendor name is `magento`. +* `` is one of the following: - * `module-`: An extension or module. - * `theme-`: Theme. - * `language-`: Language package. + * `module-`: An extension or module. + * `theme-`: Theme. + * `language-`: Language package. - {:.bs-callout .bs-callout-info} - Currently, themes are located under `/app/design/frontend` or `/app/design/adminhtml`. +{:.bs-callout .bs-callout-info} +Currently, themes are located under `/app/design/frontend` or `/app/design/adminhtml`.