From e01debb591101b5657b2a00f99edfcaa0fa34032 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Wed, 24 Jul 2019 16:06:23 -0500 Subject: [PATCH 01/14] Upgrading PHP version. MD fix-ups. --- _data/toc/installation-guide.yml | 25 +- guides/v2.2/install-gde/prereq/php-centos.md | 281 --------------- guides/v2.2/install-gde/prereq/php-parent.md | 14 - .../v2.2/install-gde/prereq/php-settings.md | 183 +++++++--- guides/v2.2/install-gde/prereq/php-ubuntu.md | 235 ------------- .../install-gde/system-requirements-tech.md | 4 + .../before-workspace-magento-prereqs.md | 105 +++--- .../deployment/pipeline/build-system.md | 95 ++--- guides/v2.3/install-gde/install-quick-ref.md | 183 +++++----- guides/v2.3/install-gde/prereq/apache.md | 151 ++++---- .../install-gde/prereq/install-rabbitmq.md | 20 +- guides/v2.3/install-gde/prereq/mysql.md | 293 ++++++++-------- .../v2.3/install-gde/prereq/mysql_remote.md | 95 +++-- guides/v2.3/install-gde/prereq/nginx.md | 277 +++++++-------- guides/v2.3/install-gde/prereq/optional.md | 152 ++++---- .../install-gde/prereq/php-centos-ubuntu.md | 326 ------------------ guides/v2.3/install-gde/prereq/php-parent.md | 1 - .../v2.3/install-gde/prereq/php-settings.md | 171 ++++++--- .../install-gde/prereq/prereq-overview.md | 21 +- guides/v2.3/install-gde/prereq/security.md | 46 +-- .../install-gde/system-requirements-tech.md | 74 ++-- .../install-gde/trouble/php/tshoot_pdo.md | 7 +- guides/v2.3/mtf/mtf_installation.md | 13 +- 23 files changed, 1071 insertions(+), 1701 deletions(-) delete mode 100644 guides/v2.2/install-gde/prereq/php-centos.md delete mode 100644 guides/v2.2/install-gde/prereq/php-parent.md delete mode 100644 guides/v2.2/install-gde/prereq/php-ubuntu.md delete mode 100644 guides/v2.3/install-gde/prereq/php-centos-ubuntu.md delete mode 120000 guides/v2.3/install-gde/prereq/php-parent.md diff --git a/_data/toc/installation-guide.yml b/_data/toc/installation-guide.yml index 4e41e2fd4ff..c7ab4e74ae7 100644 --- a/_data/toc/installation-guide.yml +++ b/_data/toc/installation-guide.yml @@ -72,29 +72,8 @@ pages: url: /install-gde/prereq/nginx.html - label: PHP - url: /install-gde/prereq/php-centos-ubuntu.html - include_versions: ["2.3"] - children: - - - label: Required PHP settings - url: /install-gde/prereq/php-settings.html - include_versions: ["2.3"] - - - label: PHP - include_versions: ["2.1", "2.2"] - children: - - - label: PHP for Centos - url: /install-gde/prereq/php-centos.html - include_versions: ["2.1", "2.2"] - - - label: PHP for Ubuntu - url: /install-gde/prereq/php-ubuntu.html - include_versions: ["2.1", "2.2"] - - - label: Required PHP settings - url: /install-gde/prereq/php-settings.html - include_versions: ["2.1", "2.2"] + url: /install-gde/prereq/php-settings.html + include_versions: ["2.2", "2.3"] - label: MySQL url: /install-gde/prereq/mysql.html diff --git a/guides/v2.2/install-gde/prereq/php-centos.md b/guides/v2.2/install-gde/prereq/php-centos.md deleted file mode 100644 index 100c726d4c8..00000000000 --- a/guides/v2.2/install-gde/prereq/php-centos.md +++ /dev/null @@ -1,281 +0,0 @@ ---- -group: installation-guide -subgroup: Prerequisites -title: PHP 7.0 or 7.1—CentOS -menu_title: PHP 7.0 or 7.1—CentOS -menu_order: 22 -level3_menu_node: level3child -level3_subgroup: php -functional_areas: - - Install - - System - - Setup ---- - -{:.bs-callout .bs-callout-info} -If you must install both Apache and PHP, [install Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) first. - -## PHP versions supported {#php-support} - - -{% include install/php-versions-template.md %} - - -## Help if you're just starting out {#php-ubuntu-help-beginner} - -If you're new to all this and need some help getting started, we suggest the following: - -* [Is the Magento software installed already?]({{ page.baseurl }}/install-gde/basics/basics_magento-installed.html) -* [What is the software that the Magento server needs to run?]({{ page.baseurl }}/install-gde/basics/basics_software.html) -* [What operating system is my server running?]({{ page.baseurl }}/install-gde/basics/basics_os-version.html) -* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{ page.baseurl }}/install-gde/basics/basics_login.html) - -## Verify PHP is installed {#centos-verify-php} - -To verify if PHP is installed already, enter `php -v`. If [PHP](https://glossary.magento.com/php) is installed, a message similar to the following displays: - - PHP 7.0.20 (cli) (built: Jun 8 2017 09:31:38) ( NTS ) - Copyright (c) 1997-2017 The PHP Group - Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies - with Zend OPcache v7.0.20, Copyright (c) 1999-2017, by Zend Technologies - -{:.bs-callout .bs-callout-info} -The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with the OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"}. - -If PHP is installed, continue with the next prerequisite, [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html). - -If PHP is *not* installed, see one of the following sections: - -* [PHP 7.0 on CentOS 6 or 7](#php-centos-70) -* [PHP 7.1 on CentOS 6 or 7](#php-centos-71) - -## CentOS repositories {#centos-php-repos} - -Linux systems provide software like PHP in one or more *repositories*. CentOS, unlike Ubuntu, has a set of [officially recommended repositories](https://wiki.centos.org/AdditionalResources/Repositories){:target="_blank"}. Other repositories are considered less safe for the reasons stated on the CentOS wiki. - -We're not aware that you can install PHP 7.0 or 7.1 from a CentOS-recommended repository. Therefore, you must consider the following: - -* If you're setting up a system that will be deployed in production, you should choose a hosting provider who uses repositories considered to be safe and reliable. - - You should also consider upgrading to a later version of CentOS that has the desired PHP version in a recommended repository. -* If you're setting up a development system, you can use any repository you wish. - -In this topic, we show how to install PHP using the [Inline with Upstream Stable (IUS)](https://ius.io/GettingStarted){:target="_blank"} repository, which is *not* on the CentOS recommended list. However, packages installed from IUS do not use the same names as CentOS-provided packages, so [no existing system packages are replaced](https://ius.io/Philosophy){:target="_blank"}. - -Before you continue, review their [Getting Started topic](https://ius.io/GettingStarted){:target="_blank"}. - -{:.bs-callout .bs-callout-info} -Magento does _not_ officially recommend using the IUS repository. We discuss it here for example purposes only. - -## PHP 7.0 on CentOS {#php-centos-70} - -There is more than one way to install PHP 7.0 on CentOS; the following is a suggestion only. Consult a reference for additional options. - -{% collapsible To install PHP 7.0 on CentOS 6 or 7: %} - -1. *CentOS 6*. Enter the following commands in the order shown: - - yum -y update - yum -y install epel-release - wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm - wget https://centos6.iuscommunity.org/ius-release.rpm - rpm -Uvh ius-release*.rpm - yum -y update -2. *CentOS 7*. Enter the following commands: - - yum install -y http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-14.ius.centos7.noarch.rpm - yum -y update -3. Install all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions): - - yum -y install php70u php70u-pdo php70u-mysqlnd php70u-opcache php70u-xml php70u-mcrypt php70u-gd php70u-devel php70u-mysql php70u-intl php70u-mbstring php70u-bcmath php70u-json php70u-iconv php70u-soap - - {:.bs-callout .bs-callout-info} - The `bcmath` extension is required for {{site.data.var.ee}} only. - -4. Restart Apache: `service httpd restart` - -5. Verify that PHP 7.0 is installed properly: - - php -v - - The following response indicates that PHP 7.0.3 is installed: - - PHP 7.0.3 (cli) (built: Feb 4 2016 08:51:10) ( NTS ) - Copyright (c) 1997-2016 The PHP Group - Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies - - {:.bs-callout .bs-callout-info} - The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with the OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"}. - -6. Verify that all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions) were installed: - - php -me - - You should see output similar to the following: - ``` - [PHP Modules] - bcmath - calendar - Core - ctype - curl - date - dom - exif - fileinfo - filter - ftp - gd - gettext - hash - iconv - intl - json - libxml - mbstring - mcrypt - mysqli - mysqlnd - openssl - pcntl - pcre - PDO - pdo_mysql - Phar - readline - Reflection - session - SimpleXML - soap - sockets - SPL - standard - tokenizer - wddx - xml - xmlreader - xmlwriter - xsl - Zend OPcache - zip - zlib - - [Zend Modules] - Zend OPcache - ``` - -7. Continue with [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). - -{% endcollapsible %} - -## PHP 7.1 on CentOS {#php-centos-71} - -There is more than one way to install PHP 7.1 on CentOS; the following is a suggestion only. Consult a reference for additional options. - -{% collapsible To install PHP 7.1 on CentOS 6 or 7: %} - -1. *CentOS 6*. Enter the following commands in the order shown: - - yum -y update - yum -y install epel-release - wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm - wget https://centos6.iuscommunity.org/ius-release.rpm - rpm -Uvh ius-release*.rpm - yum -y update -2. *CentOS 7*. Enter the following commands: - - yum install -y http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-14.ius.centos7.noarch.rpm - yum -y update -3. Install all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions): - - yum -y install php71u php71u-pdo php71u-mysqlnd php71u-opcache php71u-xml php71u-mcrypt php71u-gd php71u-devel php71u-mysql php71u-intl php71u-mbstring php71u-bcmath php71u-json php71u-iconv php71u-soap - - {:.bs-callout .bs-callout-info} - The `bcmath` extension is required for {{site.data.var.ee}} only. - -4. Restart Apache: `service httpd restart` - -5. Verify that PHP 7.1 is installed properly: - - php -v - - The following response indicates that PHP 7.1.6 is installed: - - PHP 7.1.6 (cli) (built: Jan 9 2017 09:23:16) ( NTS ) - Copyright (c) 1997-2017 The PHP Group - Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.6, Copyright (c) 1999-2017, by Zend Technologies - - {:.bs-callout .bs-callout-info} - The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with the OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"}. - -6. Verify that all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions) were installed: - - php -me - - You should see output similar to the following: - ``` - [PHP Modules] - bcmath - calendar - Core - ctype - curl - date - dom - exif - fileinfo - filter - ftp - gd - gettext - hash - iconv - intl - json - libxml - mbstring - mcrypt - mysqli - mysqlnd - openssl - pcntl - pcre - PDO - pdo_mysql - Phar - readline - Reflection - session - SimpleXML - soap - sockets - SPL - standard - tokenizer - wddx - xml - xmlreader - xmlwriter - xsl - Zend OPcache - zip - zlib - - [Zend Modules] - Zend OPcache - ``` - -7. Continue with [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). - -{% endcollapsible %} - -#### Next -[Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html) - -#### Related topics - -* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) -* [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) -* [PHP 7.0—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) -* [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) -* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) diff --git a/guides/v2.2/install-gde/prereq/php-parent.md b/guides/v2.2/install-gde/prereq/php-parent.md deleted file mode 100644 index 0c553f4db92..00000000000 --- a/guides/v2.2/install-gde/prereq/php-parent.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -group: installation-guide -subgroup: Prerequisites -title: PHP -menu_title: PHP -menu_order: 20 -level3_menu_node: level3parent -level3_subgroup: php -functional_areas: - - Install - - System - - Setup ---- - diff --git a/guides/v2.2/install-gde/prereq/php-settings.md b/guides/v2.2/install-gde/prereq/php-settings.md index d7ab4ad8618..58f5681d5f7 100644 --- a/guides/v2.2/install-gde/prereq/php-settings.md +++ b/guides/v2.2/install-gde/prereq/php-settings.md @@ -10,42 +10,104 @@ functional_areas: - Install - System - Setup +redirect_from: + - /guides/v2.2/install-gde/prereq/php-centos.html + - /guides/v2.2/install-gde/prereq/php-ubuntu.html + - /guides/v2.2/install-gde/prereq/php-centos-ubuntu.html --- This topic discusses how to set required [PHP](https://glossary.magento.com/php) options. -{% collapsible About required and recommended PHP options: %} +{:.bs-callout .bs-callout-info} +All 3rd party libraries now support PHP 7.2. +If you are interested in participating in Magento Community projects we welcome your help! See our [ZenHub board](https://app.zenhub.com/workspace/o/magento-engcom/php-7.2-support/boards?repos=116423356,116426364,115111902) for a full list of outstanding issues. + +{% include install/php-versions-template.md %} + +Magento 2.2.10 supports PHP 7.2. +Versions 7.1 and 7.0 are no longer supported in Magento 2.2. + +## Verify PHP is installed {#centos-verify-php} -* Set the system time zone for PHP; otherwise, errors like the following display during the installation and time-related operations like cron might not work: +Most flavors of Linux have PHP installed by default. +This topic assumes that you have already installed PHP. +To verify if PHP is installed already, in the command line, type: - PHP Warning: date(): It is not safe to rely on the system's timezone settings. [more messages follow] -* Set [`always_populate_raw_post_data = -1`](http://php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data){:target="_blank"} +```bash +php -v +``` - `always_populate_raw_post_data` is deprecated in PHP 5.6 and is dropped in PHP 7.0.x. This setting causes PHP to always populate `$HTTP_RAW_POST_DATA` with raw POST data. Failure to set this properly in PHP 5.5 or 5.6 results in errors when connecting to the database. -* Set the PHP memory limit. +If [PHP](https://glossary.magento.com/php) is installed, a message similar to the following displays: - Our detailed recommendations are: +```terminal +PHP 7.2.0 (cli) (built: Jan 9 2018 09:23:16) ( NTS ) +Copyright (c) 1997-2018 The PHP Group +Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.6, Copyright (c) 1999-2018, by Zend Technologies +``` - * Compiling code or deploying static assets, `756M` - * Installing and updating Magento components from Magento Marketplace, `2G` - * Testing, `2G` -* Disable [`asp_tags`](http://php.net/manual/en/ini.core.php#ini.asp-tags){:target="_blank"} +If PHP is not installed, or a version upgrade is needed, install it following instructions for your particular Linux flavor. +On CentOS, [additional steps may be required][]. - If `asp_tags are` enabled, errors display when accessing PHTML templates. +## Verify installed extensions - `asp_tags` will be removed in PHP 7. -* Enable [`opcache.save_comments`](http://php.net/manual/en/opcache.configuration.php#ini.opcache.save_comments){:target="_blank"}, which is required for Magento 2.1 and later. +Magento requires a set of extensions to be installed: - We recommend you enable the [PHP OpCache](http://php.net/manual/en/intro.opcache.php){:target="_blank"} for performance reasons. The OPcache is enabled in many PHP distributions. +- bcmath +- devel +- gd +- iconv +- intl +- json +- mbstring +- mysql +- mysqlnd +- opcache +- pdo +- soap +- xml - Magento 2.1 and later use PHP code comments in the `getDocComment` validation call in the [`getExtensionAttributes`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Api/ExtensionAttributesFactory.php#L64-L73){:target="_blank"} method in `Magento\Framework\Api\ExtensionAttributesFactory.php`. +In the command line, type `php -m` to see the list of installed modules. Verify that the listed extensions are installed. +If any modules are missing, they are added using the same workflow used for installing PHP. For example, if you use `yum` to install PHP, the PHP 7.2 modules can be added with: {:.bs-callout .bs-callout-info} -To avoid issues during installation and upgrade, we strongly recommend you apply the same PHP settings to both the PHP command-line configuration and to the PHP web server plug-in's configuration. For more information, see the next section. +The `bcmath` extension is required for {{site.data.var.ee}} only. -{% endcollapsible %} +```bash + yum -y install php72u-pdo php72u-mysqlnd php72u-opcache php72u-xml php72u-gd php72u-devel php72u-mysql php72u-intl php72u-mbstring php72u-bcmath php72u-json php72u-iconv php72u-soap +``` + +## Check PHP settings + +- Set the system time zone for PHP; otherwise, errors like the following display during the installation and time-related operations like cron might not work: + + PHP Warning: date(): It is not safe to rely on the system's timezone settings. [more messages follow] + +- Set [`always_populate_raw_post_data = -1`](http://php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data){:target="_blank"} + +`always_populate_raw_post_data` is deprecated in PHP 5.6 and is dropped in PHP 7.0.x. This setting causes PHP to always populate `$HTTP_RAW_POST_DATA` with raw POST data. Failure to set this properly in PHP 5.5 or 5.6 results in errors when connecting to the database. + +- Set the PHP memory limit. + + Our detailed recommendations are: + +- Compiling code or deploying static assets, `756M` + - Installing and updating Magento components from Magento Marketplace, `2G` + - Testing, `2G` +- Disable [`asp_tags`](http://php.net/manual/en/ini.core.php#ini.asp-tags){:target="_blank"} -### Step 1: Find PHP configuration files {#php-required-find} + If `asp_tags are` enabled, errors display when accessing PHTML templates. + `asp_tags` will be removed in PHP 7. + +- Enable [`opcache.save_comments`](http://php.net/manual/en/opcache.configuration.php#ini.opcache.save_comments){:target="_blank"}, which is required for Magento 2.1 and later. + + We recommend you enable the [PHP OpCache](http://php.net/manual/en/intro.opcache.php){:target="_blank"} for performance reasons. The OPcache is enabled in many PHP distributions. + + Magento 2.1 and later use PHP code comments in the `getDocComment` validation call in the [`getExtensionAttributes`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Api/ExtensionAttributesFactory.php#L64-L73){:target="_blank"} method in `Magento\Framework\Api\ExtensionAttributesFactory.php`. + +{:.bs-callout .bs-callout-info} +To avoid issues during installation and upgrade, we strongly recommend you apply the same PHP settings to both the PHP command-line configuration and to the PHP web server plug-in's configuration. For more information, see the next section. + +## Step 1: Find PHP configuration files {#php-required-find} This section discusses how you find the configuration files necessary to update required settings. @@ -56,12 +118,14 @@ To find the web server configuration, run a [`phpinfo.php` file]({{ page.baseurl To locate the PHP command-line configuration, enter - php --ini +```bash +php --ini +``` Use the value of Loaded Configuration file. {:.bs-callout .bs-callout-info} -If you have only one `php.ini` file, make the changes in that file. If you have two `php.ini` files, make the changes in all files. Failure to do so might cause unpredictable performance. +If you have only one `php.ini` file, make the changes in that file. If you have two `php.ini` files, make the changes in *all* files. Failure to do so might cause unpredictable performance. {% endcollapsible %} @@ -71,65 +135,74 @@ PHP OPcache settings are typically located either in `php.ini` or `opcache.ini`. Use the following guidelines to find it: -* Apache web server: +- Apache web server: - For Ubuntu with Apache, OPcache settings are typically located in `php.ini`. + For Ubuntu with Apache, OPcache settings are typically located in `php.ini`. - For CentOS with Apache or nginx, OPcache settings are typically located in `/etc/php.d/opcache.ini` + For CentOS with Apache or nginx, OPcache settings are typically located in `/etc/php.d/opcache.ini` - If not, use the following command to locate it: + If not, use the following command to locate it: - sudo find / -name 'opcache.ini' + ```bash + sudo find / -name 'opcache.ini' + ``` -* nginx web server with PHP-FPM: `/etc/php5/fpm/php.ini` +- nginx web server with PHP-FPM: `/etc/php5/fpm/php.ini` If you have more than one `opcache.ini`, modify all of them. {% endcollapsible %} -### Step 2: How to set PHP options {#php-required-set} +## Step 2: How to set PHP options {#php-required-set} {% collapsible To set PHP options: %} -1. Open a `php.ini` in a text editor. -3. Locate your server's time zone in the available [time zone settings](http://php.net/manual/en/timezones.php){:target="_blank"} -4. Locate the following setting and uncomment it if necessary: +1. Open a `php.ini` in a text editor. +1. Locate your server's time zone in the available [time zone settings](http://php.net/manual/en/timezones.php){:target="_blank"} +1. Locate the following setting and uncomment it if necessary: - date.timezone = -5. Add the time zone setting you found in step 2. -6. Change the value of `memory_limit` to one of the values at the beginning of this section. + date.timezone = - For example, +1. Add the time zone setting you found in step 2. +1. Change the value of `memory_limit` to one of the values at the beginning of this section. - memory_limit=2G -7. _Required for PHP 5.6, recommended for PHP 5.5_. Locate `always_populate_raw_post_data`, uncomment it if necessary, and set it as follows: + For example `memory_limit=2G` - always_populate_raw_post_data = -1 -8. Locate the following setting: +1. _Required for PHP 5.6, recommended for PHP 5.5_. Locate `always_populate_raw_post_data`, uncomment it if necessary, and set it as follows: - asp_tags = -9. Make sure its value is set to `Off`. -10. Save your changes and exit the text editor. -11. Open the other `php.ini` (if they are different) and make the same changes in it. + always_populate_raw_post_data = -1 + +1. Locate the following setting: + + asp_tags = + +1. Make sure its value is set to `Off`. +1. Save your changes and exit the text editor. +1. Open the other `php.ini` (if they are different) and make the same changes in it. {% endcollapsible %} -### Step 3: Set OPcache options {#php-required-opcache} +## Step 3: Set OPcache options {#php-required-opcache} {% collapsible To set opcache.ini options: %} -12. Open your OpCache configuration file in a text editor: +1. Open your OpCache configuration file in a text editor: - * `opcache.ini` (CentOS) - * `php.ini` (Ubuntu) - * `/etc/php5/fpm/php.ini` (nginx web server (CentOS or Ubuntu)) -13. Locate `opcache.save_comments` and uncomment it if necessary. -14. Make sure its value is set to `1`. -15. Save your changes and exit the text editor. -11. Restart your web server: + - `opcache.ini` (CentOS) + - `php.ini` (Ubuntu) + - `/etc/php5/fpm/php.ini` (nginx web server (CentOS or Ubuntu)) - * Apache, Ubuntu: `service apache2 restart` - * Apache, CentOS: `service httpd restart` - * nginx, Ubuntu and CentOS: `service nginx restart` +1. Locate `opcache.save_comments` and uncomment it if necessary. +1. Make sure its value is set to `1`. +1. Save your changes and exit the text editor. +1. Restart your web server: + + - Apache, Ubuntu: `service apache2 restart` + - Apache, CentOS: `service httpd restart` + - nginx, Ubuntu and CentOS: `service nginx restart` {% endcollapsible %} + + + +[additional steps may be required]: https://wiki.centos.org/HowTos/php7 diff --git a/guides/v2.2/install-gde/prereq/php-ubuntu.md b/guides/v2.2/install-gde/prereq/php-ubuntu.md deleted file mode 100644 index 5ba15c679c6..00000000000 --- a/guides/v2.2/install-gde/prereq/php-ubuntu.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -group: installation-guide -subgroup: Prerequisites -title: PHP 7.0 or 7.1 —Ubuntu -menu_title: PHP 7.0 or 7.1—Ubuntu -menu_order: 23 -level3_menu_node: level3child -level3_subgroup: php -functional_areas: - - Install - - System - - Setup ---- - -{:.bs-callout .bs-callout-info} -If you must install both Apache and PHP, [install Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) first. - -## PHP versions supported {#php-support} - - -{% include install/php-versions-template.md %} - - -## Help if you're just starting out {#php-ubuntu-help-beginner} - -If you're new to all this and need some help getting started, we suggest the following: - -* [Is the Magento software installed already?]({{ page.baseurl }}/install-gde/basics/basics_magento-installed.html) -* [What is the software that the Magento server needs to run?]({{ page.baseurl }}/install-gde/basics/basics_software.html) -* [What operating system is my server running?]({{ page.baseurl }}/install-gde/basics/basics_os-version.html) -* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{ page.baseurl }}/install-gde/basics/basics_login.html) - -## Verify PHP is installed {#ubuntu-verify-php} - -To verify if PHP is installed already, enter `php -v`. If PHP is installed, a message similar to the following displays: - - PHP 7.0.21-1~ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jul 6 2017 09:38:10) ( NTS ) - Copyright (c) 1997-2017 The PHP Group - Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies - with Zend OPcache v7.0.21-1~ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies - -{:.bs-callout .bs-callout-info} -The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"} - -If PHP is installed, continue with the next prerequisite, [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html). - -If PHP is *not* installed, see one of the following sections: - -* [PHP 7.0 on Ubuntu 14](#instgde-prereq-php70-ubuntu) -* [PHP 7.1 on Ubuntu 14](#instgde-prereq-php71-ubuntu) - -## PHP 7.0 on Ubuntu {#instgde-prereq-php70-ubuntu} -{% collapsible To install PHP 7.0 on Ubuntu 14 or 16: %} - -1. Enter the following commands in the order shown: - - sudo apt-get -y update - sudo add-apt-repository ppa:ondrej/php - sudo apt-get -y update - sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-zip php7.0-bcmath php7.0-iconv php7.0-soap - - {:.bs-callout .bs-callout-info} - The last command installs all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions). The `bcmath` extension is required for {{site.data.var.ee}} only. - -2. Verify that PHP 7.0 is installed properly: - - php -v - - The following response indicates that PHP 7.0.21 is installed: - - PHP 7.0.21-1~ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jul 6 2017 09:07:54) ( NTS ) - Copyright (c) 1997-2017 The PHP Group - Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.21-1~ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2016, by Zend Technologies - - {:.bs-callout .bs-callout-info} - The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with the OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"}. - -3. Verify that all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions) were installed: - - php -me - - You should see output similar to the following: - ``` - [PHP Modules] - bcmath - calendar - Core - ctype - curl - date - dom - exif - fileinfo - filter - ftp - gd - gettext - hash - iconv - intl - json - libxml - mbstring - mcrypt - mysqli - mysqlnd - openssl - pcntl - pcre - PDO - pdo_mysql - Phar - readline - Reflection - session - SimpleXML - soap - sockets - SPL - standard - tokenizer - wddx - xml - xmlreader - xmlwriter - xsl - Zend OPcache - zip - zlib - - [Zend Modules] - Zend OPcache - ``` - -4. Continue with [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). - -{% endcollapsible %} - -## PHP 7.1 on Ubuntu {#instgde-prereq-php71-ubuntu} -{% collapsible To install PHP 7.1 on Ubuntu 14 or 16: %} - -1. Enter the following commands in the order shown: - - 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 - - {:.bs-callout .bs-callout-info} - The last command installs all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions). The `bcmath` extension is required for {{site.data.var.ee}} only. - -2. Verify that PHP 7.1 is installed properly: - - php -v - - The following response indicates that PHP 7.1.7 is installed: - - PHP 7.1.7-1~ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jul 6 2017 09:07:54) ( NTS ) - Copyright (c) 1997-2017 The PHP Group - Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.7-1~ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies - - {:.bs-callout .bs-callout-info} - The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with the OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"}. - -3. Verify that all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions) were installed: - - php -me - - You should see output similar to the following: - ``` - [PHP Modules] - bcmath - calendar - Core - ctype - curl - date - dom - exif - fileinfo - filter - ftp - gd - gettext - hash - iconv - intl - json - libxml - mbstring - mcrypt - mysqli - mysqlnd - openssl - pcntl - pcre - PDO - pdo_mysql - Phar - readline - Reflection - session - SimpleXML - soap - sockets - SPL - standard - tokenizer - wddx - xml - xmlreader - xmlwriter - xsl - Zend OPcache - zip - zlib - - [Zend Modules] - Zend OPcache - ``` - -4. Continue with [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). - -{% endcollapsible %} - -#### Next -[Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html) - -#### Related topics - -* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) -* [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) -* [PHP 7.0—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) -* [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) -* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) diff --git a/guides/v2.2/install-gde/system-requirements-tech.md b/guides/v2.2/install-gde/system-requirements-tech.md index 052e878096d..dd2adccbc67 100644 --- a/guides/v2.2/install-gde/system-requirements-tech.md +++ b/guides/v2.2/install-gde/system-requirements-tech.md @@ -41,6 +41,10 @@ Magento only uses MySQL features compatible with MariaDB. MariaDB may not be com {% include install/php-versions-template.md %} +The Magento 2.2.10 patch enables support for PHP 7.2. +Supported PHP versions for Magento 2.2.x are 7.2 and 7.1. +PHP 7.0 is no longer supported. + #### Required PHP extensions {: .bs-callout-info } diff --git a/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md b/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md index 6ba55baf87b..7017fa4f7aa 100644 --- a/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md +++ b/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md @@ -10,7 +10,8 @@ functional_areas: - Configuration --- -#### Previous step: +## Previous step: + [Prepare for local environment setup]({{ page.baseurl }}/cloud/before/before-workspace.html) Install the following software packages and tools on your local to prepare for Magento code development. If you already have these packages installed, check for any recommendations or notes and continue to the next step. @@ -36,9 +37,9 @@ When using Vagrant, we also recommend the package [hostmanager](https://github.c ## Development tools {#devtools} * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Provides code branching and management for accessing {{site.data.var.ee}} and your code repositories. Use Git command-line commands or applications of your choice to work with Git. You can install this on your local VM or on your host. - For more information, see [How Cloud uses Git]({{ page.baseurl }}/cloud/reference/git-integration.html). + For more information, see [How Cloud uses Git]({{ page.baseurl }}/cloud/reference/git-integration.html). * [Composer](https://getcomposer.org/download/) - Used for dependency management. Composer enables us to manage the Magento components and their dependencies. Install on your local VM. - For more information, see [How Cloud uses Composer]({{ page.baseurl }}/cloud/reference/cloud-composer.html). + For more information, see [How Cloud uses Composer]({{ page.baseurl }}/cloud/reference/cloud-composer.html). ## Web server (local) {#webserver} @@ -46,7 +47,7 @@ We strongly recommend installing [Nginx]({{ page.baseurl }}/install-gde/prereq/n ## PHP (local) {#php} -Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.1.3+ or 7.2. For information on installing PHP on CentOS and Ubuntu see [PHP](../../../v2.3/install-gde/prereq/php-centos-ubuntu.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). +Install [PHP](https://glossary.magento.com/php) on your local machine. For information on installing PHP, see [PHP](../../../v2.3/install-gde/prereq/php-settings.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). The following packages may also be helpful for your PHP installation: @@ -71,20 +72,20 @@ To set `memory_limit`: Before working with your {{site.data.var.ece}} project, make sure you set the PHP `memory_limit` to at least `1G` for normal use or at least `2G` for debugging. -1. Find your `php.ini` file using the following command: +1. Find your `php.ini` file using the following command: - php --ini + php --ini - Use the value of `Loaded Configuration File`. -2. As a user with `root` privileges, open `php.ini` in a text editor. -3. Change the value of `memory_limit` to at least `1G` for normal use or at least `2G` for debugging. -4. Save your changes to `php.ini` and exit the text editor. -5. Restart your web server: + Use the value of `Loaded Configuration File`. +1. As a user with `root` privileges, open `php.ini` in a text editor. +1. Change the value of `memory_limit` to at least `1G` for normal use or at least `2G` for debugging. +1. Save your changes to `php.ini` and exit the text editor. +1. Restart your web server: - * Apache: - * CentOS: `service httpd restart` - * Ubuntu: `service apache2 restart` - * Nginx: `service nginx restart` + * Apache: + * CentOS: `service httpd restart` + * Ubuntu: `service apache2 restart` + * Nginx: `service nginx restart` ## Database (local) {#database} @@ -99,27 +100,28 @@ These example instructions detail how to install and create a MariaDB database f 1. Use this command to create the database: - apt-get install mariadb-server -2. Secure the database with the following command and completing all prompts: + apt-get install mariadb-server + +1. Secure the database with the following command and completing all prompts: - mysql_secure_installation -3. Access the MariaDB database. -4. Grant all privileges to the Magento account you created for the local: + mysql_secure_installation +1. Access the MariaDB database. +1. Grant all privileges to the Magento account you created for the local: - grant all privileges on to ''@'localhost' identified by ''; -5. Finally create the database: + grant all privileges on to ''@'localhost' identified by ''; +1. Finally create the database: - create database magento; - use magento; -6. Exit when done. + create database magento; + use magento; +1. Exit when done. ### Pro: Set up the auto-increment for MariaDB {#cloud-mysql} You need to set an auto-increment value for the MariaDB installation. -1. As a user with `root` privileges, open `/etc/mysql/mariadb.conf.d/50-server.cnf` in a text editor. -2. In the Basic Settings section, add `auto_increment_increment = 3`. -3. Restart the service: `service mysql restart`. +1. As a user with `root` privileges, open `/etc/mysql/mariadb.conf.d/50-server.cnf` in a text editor. +1. In the Basic Settings section, add `auto_increment_increment = 3`. +1. Restart the service: `service mysql restart`. ### Pro: Set up the auto-increment for MySQL {#cloud-mysql} @@ -129,24 +131,24 @@ To avoid issues, we recommend you set `auto_increment_increment=3`. First, view the current value and verify if it is set to 3: - mysqladmin variables -u -p | grep 'auto_increment' + mysqladmin variables -u -p | grep 'auto_increment' If necessary, set `auto_increment_increment` to 3: -1. As a user with `root` privileges, open `/etc/my.cnf` in a text editor. +1. As a user with `root` privileges, open `/etc/my.cnf` in a text editor. - {:.bs-callout .bs-callout-info } - On Ubuntu 16, the path is typically `/etc/mysql/mysql.conf.d/mysqld.cnf`. + {:.bs-callout .bs-callout-info } + On Ubuntu 16, the path is typically `/etc/mysql/mysql.conf.d/mysqld.cnf`. -2. Add or edit the following line in the `[mysqld]` section: +1. Add or edit the following line in the `[mysqld]` section: - auto_increment_increment=3 + auto_increment_increment=3 - {{site.data.var.ece}} supports a High Availability configuration. This setting increments the database IDs in increments of three to ensure row uniqueness for Galera databases on each of the three HA nodes in production. + {{site.data.var.ece}} supports a High Availability configuration. This setting increments the database IDs in increments of three to ensure row uniqueness for Galera databases on each of the three HA nodes in production. -3. Restart MySQL: +1. Restart MySQL: - service mysqld restart + service mysqld restart ## Magento Cloud CLI (local) {#cloud-ssh-cli-cli-install} @@ -156,31 +158,31 @@ These instructions discuss installation using commands for a Unix environment. F To install the Magento Cloud CLI: -1. Log in to your local development machine or switch to the [Magento file system owner]({{ page.baseurl }}/cloud/before/before-workspace-file-sys-owner.html). +1. Log in to your local development machine or switch to the [Magento file system owner]({{ page.baseurl }}/cloud/before/before-workspace-file-sys-owner.html). -2. Change to a directory to which the [Magento file system owner](https://glossary.magento.com/magento-file-system-owner) has write access, such as the home directory. +1. Change to a directory to which the [Magento file system owner](https://glossary.magento.com/magento-file-system-owner) has write access, such as the home directory. -3. Enter the following command: +1. Enter the following command: - curl -sS https://accounts.magento.cloud/cli/installer | php + curl -sS https://accounts.magento.cloud/cli/installer | php -4. After the CLI downloads, an operating system-specific command displays. +1. After the CLI downloads, an operating system-specific command displays. - For example, on Ubuntu and CentOS, the command is similar to: + For example, on Ubuntu and CentOS, the command is similar to: - source $HOME/.bashrc + source $HOME/.bashrc - For more information about the user shell profile, see [.bash_profile vs .bashrc](https://apple.stackexchange.com/questions/51036/what-is-the-difference-between-bash-profile-and-bashrc) + For more information about the user shell profile, see [.bash_profile vs .bashrc](https://apple.stackexchange.com/questions/51036/what-is-the-difference-between-bash-profile-and-bashrc) - You can also add the `$HOME/.magento-cloud/bin` to the Magento user's `PATH`: + You can also add the `$HOME/.magento-cloud/bin` to the Magento user's `PATH`: - export PATH=$PATH:$HOME/.magento-cloud/bin + export PATH=$PATH:$HOME/.magento-cloud/bin - Consult operating system documentation for details. + Consult operating system documentation for details. -5. Verify the `magento-cloud` command is in your path by entering the following command: +1. Verify the `magento-cloud` command is in your path by entering the following command: - magento-cloud list + magento-cloud list ## Additional requirements for Magento Commerce {#commerce} @@ -193,5 +195,6 @@ The requirements listed in this topic are specific to {{site.data.var.ece}} envi You can also install additional [optional software]({{ page.baseurl }}/install-gde/prereq/optional.html). These packages should be installed on the local VM. -#### Next step: +## Next step + [Enable SSH keys]({{ page.baseurl }}/cloud/before/before-workspace-ssh.html) diff --git a/guides/v2.3/config-guide/deployment/pipeline/build-system.md b/guides/v2.3/config-guide/deployment/pipeline/build-system.md index f49508a878f..18e695ea4e1 100644 --- a/guides/v2.3/config-guide/deployment/pipeline/build-system.md +++ b/guides/v2.3/config-guide/deployment/pipeline/build-system.md @@ -10,22 +10,23 @@ functional_areas: You can have one build system that meets the following requirements: -* All Magento code is under source control in the same repository as the development and production systems -* Make sure all of the following are _included_ in source control: - - * `app/etc/config.php` - * `generated` directory (and subdirectories) - * `pub/media` directory - * `pub/media/wysiwyg` directory (and subdirectories) - * `pub/static` directory (and subdirectories) -* Must have a compatible PHP version installed -* Must have Composer installed -* It has Magento file system ownership and permissions set as discussed in [Prerequisite for your development, build, and production systems]({{ page.baseurl }}/config-guide/deployment/pipeline/technical-details.html#config-deploy-prereq). +- All Magento code is under source control in the same repository as the development and production systems +- Make sure all of the following are _included_ in source control: + + - `app/etc/config.php` + - `generated` directory (and subdirectories) + - `pub/media` directory + - `pub/media/wysiwyg` directory (and subdirectories) + - `pub/static` directory (and subdirectories) + +- Must have a compatible PHP version installed +- Must have Composer installed +- It has Magento file system ownership and permissions set as discussed in [Prerequisite for your development, build, and production systems][]. The build system does _not_ need any of the following: -* Magento database connection -* Magento software installed (only the code must be present) +- Magento database connection +- Magento software installed (only the code must be present) {:.bs-callout .bs-callout-info} The build machine can be on its own host or on the same host as an installed Magento system. @@ -40,46 +41,60 @@ The following sections discuss how to configure the build machine. ### Install PHP -To install PHP on CentOS or Ubuntu see [PHP](../../../install-gde/prereq/php-centos-ubuntu.html). +Install PHP on [CentOS] or [Ubuntu][]. ### Set up the build system To set up the build system: -1. Log in to the build system as, or switch to, the Magento file system owner. -2. Retrieve the Magento code from source control. +1. Log in to the build system as, or switch to, the Magento file system owner. +1. Retrieve the Magento code from source control. + + If you use Git, use the following command: + + git clone [-b ] + +1. Change to the Magento root directory and enter: + + composer install + +1. Wait for Magento dependencies to update. +1. Set ownership: - If you use Git, use the following command: + chown -R : . - git clone [-b ] -2. Change to the Magento root directory and enter: + For example, - composer install -3. Wait for Magento dependencies to update. -4. Set ownership: + chown -R magento_user:apache . - chown -R : . +1. If you use Git, open `.gitignore` in a text editor. +1. Start each of the following lines with a `#` character to comment them out: - For example, + ```text + # app/etc/config.php + # pub/media/* + # generated/* + # pub/media/*.* + # pub/media/wysiwyg/* + # pub/static/* + ``` - chown -R magento_user:apache . -4. If you use Git, open `.gitignore` in a text editor. -5. Start each of the following lines with a `#` character to comment them out: +1. Save your changes to `.gitignore` and exit the text editor. +1. If you use Git, use the following commands to commit the change: - # app/etc/config.php - # pub/media/* - # generated/* - # pub/media/*.* - # pub/media/wysiwyg/* - # pub/static/* -6. Save your changes to `.gitignore` and exit the text editor. -7. If you use Git, use the following commands to commit the change: + git add .gitignore && git commit -m "Modify .gitignore for build and production" - git add .gitignore && git commit -m "Modify .gitignore for build and production" + See the [`.gitignore` reference][] for more information. - See the [`.gitignore` reference]({{ page.baseurl }}/config-guide/prod/config-reference-gitignore.html) for more information. +## Related topics -#### Related topics +- [Set up your development systems][] +- [Set up your production system][] -* [Set up your development systems]({{ page.baseurl }}/config-guide/deployment/pipeline/development-system.html) -* [Set up your production system]({{ page.baseurl }}/config-guide/deployment/pipeline/production-system.html) + +[CentOS]: https://wiki.centos.org/HowTos/php7 +[Ubuntu]: https://help.ubuntu.com/lts/serverguide/php.html +[Prerequisite for your development, build, and production systems]: {{ page.baseurl }}/config-guide/deployment/pipeline/technical-details.html#config-deploy-prereq +[`.gitignore` reference]: {{ page.baseurl }}/config-guide/prod/config-reference-gitignore.html +[Set up your development systems]: {{ page.baseurl }}/config-guide/deployment/pipeline/development-system.html +[Set up your production system]: {{ page.baseurl }}/config-guide/deployment/pipeline/production-system.html diff --git a/guides/v2.3/install-gde/install-quick-ref.md b/guides/v2.3/install-gde/install-quick-ref.md index eaa630716db..8c1ee498264 100644 --- a/guides/v2.3/install-gde/install-quick-ref.md +++ b/guides/v2.3/install-gde/install-quick-ref.md @@ -11,96 +11,101 @@ functional_areas: - Setup --- -We know it's challenging to install the Magento software. We'd like to help you by simplifying the process as much as possible. +We know it is challenging to install the Magento software. We would like to help you by simplifying the process as much as possible. This topic assumes: -* You have your own Magento server (you're not using a shared hosting provider). -* You're starting the installation using `composer create-project`, which enables you to get the most recent Magento software and to add your own customizations to it, if desired. -* Everything is installed on one host (database, web server, and so on). -* The host you're installing on is either Ubuntu or CentOS. +* You have your own Magento server (you are not using a shared hosting provider). +* You are starting the installation using `composer create-project`, which enables you to get the most recent Magento software and to add your own customizations to it, if desired. +* Everything is installed on one host (database, web server, and so on). +* The host you are installing on is either Ubuntu or CentOS. - (You can use the same instructions to install on other UNIX distributions like RedHat Enterprise Linux (RHEL), or Debian, but these instructions aren't for Mac or Windows.) -* Your host's IP address is `192.0.2.5`. + (You can use the same instructions to install on other UNIX distributions like RedHat Enterprise Linux or Debian, but Magento is not supported on Mac or Windows.) - This is just an example IP address that you'll see in detailed examples throughout this topic. You can substitute it with whatever internal/external IP address matches your server. +* Your host's IP address is `192.0.2.5`. -* You're installing to the `magento2` subdirectory under your web server's docroot (full path is `/var/www/html/magento2`) + This is just an example IP address that you will see in detailed examples throughout this topic. You can substitute it with whatever internal/external IP address matches your server. - You can optionally set up static routing or a virtual host to install to a hostname instead of an IP but that's beyond the scope of this topic. +* You are installing to the `magento2` subdirectory under your web server's docroot (full path is `/var/www/html/magento2`) -We've broken the installation process into three main parts: getting started, installing, and post-installation. We hope that what follows helps you; if you'd like to suggest improvements, click **Edit this page on GitHub** at the top of this page and let us know. + You can optionally set up static routing or a virtual host to install to a hostname instead of an IP but that is beyond the scope of this topic. + +We have broken the installation process into three main parts: getting started, installing, and post-installation. We hope that what follows helps you; if you would like to suggest improvements, click **Edit this page on GitHub** at the top of this page and let us know. ## Precondition: How advanced are you? Do you know what a "terminal" application is? Do you know what operating system your server runs? Do you know what Apache is? -If not, see the [Installation overview]({{page.baseurl }}/install-gde/bk-install-guide.html). +If not, see the [Installation overview][]. ## Installation part 1: Getting started -1. See the [system requirements]({{ page.baseurl }}/install-gde/system-requirements.html). -2. If your system lacks any requirements, see the prerequisites documentation: +1. See the [system requirements][]. +2. If your system lacks any requirements, see the prerequisites documentation: + + * [Apache][] + * [PHP][] + * [MySQL][] - * [Apache]({{page.baseurl }}/install-gde/prereq/apache.html) - * [PHP (Ubuntu)]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-ubuntu) - * [PHP (CentOS)]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-centos) - * [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) -3. Just as importantly, set up the [Magento file system owner]({{page.baseurl }}/install-gde/prereq/file-sys-perms-over.html) on the server. -4. Switch to the [Magento file system owner](https://glossary.magento.com/magento-file-system-owner). +3. Just as importantly, set up the [Magento file system owner][]on the server. +4. Switch to the [Magento file system owner][]. ### Get the Magento software -When all prerequisites have been met, get the Magento software using [Composer](https://glossary.magento.com/composer) as follows: +When all prerequisites have been met, get the Magento software using [Composer][] as follows: - cd - composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento2 +```bash +cd +composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento2 +``` -You're required to authenticate; see [Get your authentication keys]({{page.baseurl }}/install-gde/prereq/connect-auth.html) for details. This downloads Magento code only; it doesn't install the software for you. +You are required to authenticate; see [Get your authentication keys][] for details. This downloads Magento code only; it does not install the software for you. {:.bs-callout .bs-callout-tip} -Alternatively, you can also download a [Magento software archive]({{page.baseurl }}/install-gde/install/get-software.html). +Alternatively, you can also download a [Magento software archive][]. {% include install/file-system-perms-before_22.md %} ## Installation part 2: Installing the Magento software -You can choose to install the Magento software using either a [web-based Setup Wizard]({{page.baseurl }}/install-gde/install/web/install-web.html) or using the [command line]({{page.baseurl }}/install-gde/install/cli/install-cli.html). +You can choose to install the Magento software using either a [web-based Setup Wizard][] or using the [command line][]. -#### Command line installation +### Command line installation {% collapsible Click to view the command-line installation %} The following example shows how to install using the command line with the following options: -* The Magento software is installed in the `/var/www/html/magento2` directory, which means your storefront URL is `http://192.0.2.5/magento2/` - -* The database server is on the same host as the web server. +* The Magento software is installed in the `/var/www/html/magento2` directory, which means your storefront URL is `http://192.0.2.5/magento2/` +* The database server is on the same host as the web server. - The database name is `magento`, and the username and password are both `magento` + The database name is `magento`, and the username and password are both `magento` -* Uses server rewrites +* Uses server rewrites +* The Magento administrator has the following properties: -* The Magento administrator has the following properties: + * First and last name are `Magento User` + * Username is `admin` and the password is `admin123` + * E-mail address is `user@example.com` - * First and last name are `Magento User` - * Username is `admin` and the password is `admin123` - * E-mail address is `user@example.com` +* Default language is `en_US` (U.S. English) +* Default currency is U.S. dollars +* Default time zone is U.S. Central (America/Chicago) -* Default language is `en_US` (U.S. English) -* Default currency is U.S. dollars -* Default time zone is U.S. Central (America/Chicago) - - php /var/www/html/magento2/bin/magento setup:install --base-url=http://192.0.2.5/magento2/ \ - --db-host=localhost --db-name=magento --db-user=magento --db-password=magento \ - --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \ - --admin-user=admin --admin-password=admin123 --language=en_US \ - --currency=USD --timezone=America/Chicago --use-rewrites=1 + ```bash + bin/magento setup:install --base-url=http://192.0.2.5/magento2/ \ + --db-host=localhost --db-name=magento --db-user=magento --db-password=magento \ + --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \ + --admin-user=admin --admin-password=admin123 --language=en_US \ + --currency=USD --timezone=America/Chicago --use-rewrites=1 + ``` Optionally switch to [developer mode]({{page.baseurl }}/config-guide/cli/config-cli-subcommands-mode.html). - cd /bin - php magento deploy:mode:set developer +```bash +cd /bin +php magento deploy:mode:set developer +``` {% endcollapsible %} @@ -110,56 +115,78 @@ Optionally switch to [developer mode]({{page.baseurl }}/config-guide/cli/config- The following example shows how to install using the Web Setup Wizard with the following options: -* The Magento software is installed in the `magento2` directory relative to the web server docroot, which means your storefront URL is `http://192.0.2.5/magento2/` - -* The database server is on the same host as the web server. +* The Magento software is installed in the `magento2` directory relative to the web server docroot, which means your storefront URL is `http://192.0.2.5/magento2/` +* The database server is on the same host as the web server. - The database name is `magento`, and the username and password are both `magento` + The database name is `magento`, and the username and password are both `magento` -* The Magento administrator has the following properties: +* The Magento administrator has the following properties: - * Username is `admin` and the password is `admin123` - * E-mail address is `user@example.com` + * Username is `admin` and the password is `admin123` + * E-mail address is `user@example.com` -* Default language is `en_US` (U.S. English) -* Default currency is U.S. dollars -* Default time zone is U.S. Central (America/Chicago) +* Default language is `en_US` (U.S. English) +* Default currency is U.S. dollars +* Default time zone is U.S. Central (America/Chicago) To run the Web Setup Wizard: -1. Enter the following URL in your browser's address or location field: +1. Enter the following URL in your browser's address or location field: + + http://192.0.2.5/magento2/setup + +1. At the welcome page, click **Agree and Setup Magento**. + + ![You must accept the license agreement to install the Magento software]({{ site.baseurl }}/common/images/install_qr_wizard-welcome.png){:width="200px"} + +1. Readiness Check verifies your system is ready to install the Magento software. + + Click **Start Readiness Check** + + ![The Readiness Check makes sure your system is ready for the Magento software]({{ site.baseurl }}/common/images/install_qr_readiness.png){:width="400px"} + + * If the readiness check passes, click **Next** and continue with the next step. + * If the readiness check fails, see [Readiness check issues][] - http://192.0.2.5/magento2/setup -2. At the welcome page, click **Agree and Setup Magento**. +1. Add a Database enables you to set up your Magento database. - ![You must accept the license agreement to install the Magento software]({{ site.baseurl }}/common/images/install_qr_wizard-welcome.png){:width="200px"} -3. Step 1: Readiness Check verifies your system is ready to install the Magento software. + ![Set up your Magento database]({{ site.baseurl }}/common/images/install_qr_database.png){:width="400px"} - Click **Start Readiness Check** +1. Web Configuration enables you to enter the storefront and Magento Admin URLs. - ![The Readiness Check makes sure your system is ready for the Magento software]({{ site.baseurl }}/common/images/install_qr_readiness.png){:width="400px"} + ![Enter your storefront and Magento Admin URLs]({{ site.baseurl }}/common/images/install_qr_web.png){:width="400px"} - * If the readiness check passes, click **Next** and continue with the next step. - * If the readiness check fails, see [Readiness check issues]({{ page.baseurl }}/install-gde/trouble/readiness/tshoot_rc_main.html) -4. Step 2: Add a Database enables you to set up your Magento database. +1. Customize Your Store enables you to enter a default store currency, time zone, and language. - ![Set up your Magento database]({{ site.baseurl }}/common/images/install_qr_database.png){:width="400px"} -5. Step 3: Web Configuration enables you to enter the storefront and Magento Admin URLs. + ![Customize the store's language, time zone, currency]({{ site.baseurl }}/common/images/install_qr_store.png){:width="400px"} - ![Enter your storefront and Magento Admin URLs]({{ site.baseurl }}/common/images/install_qr_web.png){:width="400px"} -6. Step 4: Customize Your Store enables you to enter a default store currency, time zone, and language. +1. Create Admin Account enables you to set up a Magento administrator. This user can perform all actions in the Magento Admin. - ![Customize the store's language, time zone, currency]({{ site.baseurl }}/common/images/install_qr_store.png){:width="400px"} -7. Step 5: Create Admin Account enables you to set up a Magento administrator. This user can perform all actions in the Magento Admin. + ![Create a Magento administrator account]({{ site.baseurl }}/common/images/install_qr_admin.png){:width="400px"} - ![Create a Magento administrator account]({{ site.baseurl }}/common/images/install_qr_admin.png){:width="400px"} -8. Step 6: Install starts the installation when you click **Install Now**. +1. Install starts the installation when you click **Install Now**. - You can optionally expand **Console Log** to see installation messages while the installation is in progress. + You can optionally expand **Console Log** to see installation messages while the installation is in progress. {% endcollapsible %} ## Installation part 3: Post-installation -* [Verify the installation]({{page.baseurl }}/install-gde/install/verify.html) was successful. -* Learn about the [Component Manager and System Upgrade]({{page.baseurl }}/comp-mgr/bk-compman-upgrade-guide.html) for future updates. +* [Verify the installation][] was successful. +* Learn about the [Component Manager and System Upgrade][] for future updates. + + +[Installation overview]: {{page.baseurl }}/install-gde/bk-install-guide.html +[system requirements]: {{ page.baseurl }}/install-gde/system-requirements.html +[Apache]: {{page.baseurl }}/install-gde/prereq/apache.html +[PHP]: {{page.baseurl }}/install-gde/prereq/php-settings.html +[MySQL]: {{page.baseurl }}/install-gde/prereq/mysql.html +[Magento file system owner]: {{page.baseurl }}/install-gde/prereq/file-sys-perms-over.html +[Composer]: https://glossary.magento.com/composer +[command line]: {{page.baseurl }}/install-gde/install/cli/install-cli.html +[Get your authentication keys]: {{page.baseurl }}/install-gde/prereq/connect-auth.html +[Magento software archive]: {{page.baseurl }}/install-gde/install/get-software.html +[web-based Setup Wizard]: {{page.baseurl }}/install-gde/install/web/install-web.html +[Readiness check issues]:{{ page.baseurl }}/install-gde/trouble/readiness/tshoot_rc_main.html +[Verify the installation]: {{page.baseurl }}/install-gde/install/verify.html +[Component Manager and System Upgrade]: {{page.baseurl }}/comp-mgr/bk-compman-upgrade-guide.html diff --git a/guides/v2.3/install-gde/prereq/apache.md b/guides/v2.3/install-gde/prereq/apache.md index 0365243ae7a..4b85b649bd1 100644 --- a/guides/v2.3/install-gde/prereq/apache.md +++ b/guides/v2.3/install-gde/prereq/apache.md @@ -14,14 +14,14 @@ functional_areas: Magento requires Apache 2.2.x or 2.4.x. -## Help if you're just starting out {#apache-help-beginner} +## Help if you are just starting out {#apache-help-beginner} If you're new to all this and need some help getting started, we suggest the following: -* [Is the Magento software installed already?]({{page.baseurl }}/install-gde/basics/basics_magento-installed.html) -* [What is the software that the Magento server needs to run?]({{page.baseurl }}/install-gde/basics/basics_software.html) -* [What operating system is my server running?]({{page.baseurl }}/install-gde/basics/basics_os-version.html) -* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{page.baseurl }}/install-gde/basics/basics_login.html) +* [Is the Magento software installed already?]({{page.baseurl }}/install-gde/basics/basics_magento-installed.html) +* [What is the software that the Magento server needs to run?]({{page.baseurl }}/install-gde/basics/basics_software.html) +* [What operating system is my server running?]({{page.baseurl }}/install-gde/basics/basics_os-version.html) +* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{page.baseurl }}/install-gde/basics/basics_login.html) ## Important: Apache rewrites and .htaccess {#apache-help-rewrite} @@ -44,95 +44,102 @@ Failure to enable these settings typically results in no styles displaying on yo To verify the Apache version you're currently running, enter: - apache2 -v + apache2 -v The result displays similar to the following: - Server version: Apache/2.2.22 (Ubuntu) - Server built: Jul 22 2014 14:35:32 +```terminal +Server version: Apache/2.2.22 (Ubuntu) +Server built: Jul 22 2014 14:35:32 +``` -* If Apache is *not* installed, see: - * [Installing or upgrading Apache on Ubuntu](#install-prereq-apache-ubuntu) - * [Installing Apache on CentOS]{#install-prereq-apache-centos} -* If Apache 2.2 is installed on Ubuntu 12 *and* you want to use [PHP](https://glossary.magento.com/php) 5.6, see the next section +* If Apache is *not* installed, see: + * [Installing or upgrading Apache on Ubuntu](#install-prereq-apache-ubuntu) + * [Installing Apache on CentOS]{#install-prereq-apache-centos} +* If Apache 2.2 is installed on Ubuntu 12 *and* you want to use [PHP](https://glossary.magento.com/php) 5.6, see the next section ## Installing or upgrading Apache on Ubuntu {#install-prereq-apache-ubuntu} The following sections discusses how to install or upgrade Apache: -* Install Apache -* Upgrade to Apache 2.4 on Ubuntu 12 to use PHP 7+ +* Install Apache +* Upgrade to Apache 2.4 on Ubuntu 12 to use PHP 7+ ### Installing Apache on Ubuntu 16, 14, or 12 {#install-prereq-apache-ubuntu-install} + {% collapsible Click to show/hide content %} To install the default version of Apache (Ubuntu 14, 16—Apache 2.4, Ubuntu 12—Apache 2.2): -1. Install Apache +1. Install Apache - apt-get -y install apache2 + apt-get -y install apache2 -2. Verify the installation. +1. Verify the installation. - apache2 -v + apache2 -v - The result displays similar to the following: + The result displays similar to the following: - Server version: Apache/2.4.18 (Ubuntu) - Server built: 2016-04-15T18:00:57 + Server version: Apache/2.4.18 (Ubuntu) + Server built: 2016-04-15T18:00:57 -3. Enable rewrites and `.htaccess` as discussed in the following sections. +1. Enable rewrites and `.htaccess` as discussed in the following sections. ### Enable rewrites and .htaccess for Apache 2.4 + {% include install/allowoverrides24.md %} ### Enable rewrites and .htaccess for Apache 2.2 + {% include install/allowoverrides22.md %} #### Next steps -* [Solving 403 (Forbidden) errors](#apache-error) -* Continue with the next prerequisite ([PHP Ubuntu]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-ubuntu)) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Solving 403 (Forbidden) errors](#apache-error) +* Continue with the next prerequisite ([PHP]({{page.baseurl }}/install-gde/prereq/php-settings.html)) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) {% endcollapsible %} ### Upgrading Apache on Ubuntu 12 {#install-prereq-apache-ubuntu-upgrade} + {% collapsible Click to show/hide content %} To use PHP 5.6 on Ubuntu 12, you must upgrade Apache to version 2.4. (By default, Ubuntu 12 comes with Apache 2.2.) To upgrade to Apache 2.4: -1. Add the `ppa:ondrej` repository, which has Apache 2.4: +1. Add the `ppa:ondrej` repository, which has Apache 2.4: - apt-get -y update - apt-add-repository ppa:ondrej/apache2 - apt-get -y update + apt-get -y update + apt-add-repository ppa:ondrej/apache2 + apt-get -y update -2. Install Apache 2.4: +1. Install Apache 2.4: - apt-get install -y apache2 + apt-get install -y apache2 {:.bs-callout .bs-callout-info} If the 'apt-get install' command fails because of unmet dependencies, consult a resource like [http://askubuntu.com](http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa){:target="_blank"}. -3. Verify the installation. +1. Verify the installation. - apache2 -v + apache2 -v - Messages similar to the following should display: + Messages similar to the following should display: - Server version: Apache/2.4.10 (Ubuntu) - Server built: Jul 22 2014 22:46:25 + Server version: Apache/2.4.10 (Ubuntu) + Server built: Jul 22 2014 22:46:25 -4. Continue with the next section. +1. Continue with the next section. ### Enable rewrites and .htaccess for Apache 2.4 + {% include install/allowoverrides24.md %} #### Next steps -* [Solving 403 (Forbidden) errors](#apache-error) -* Continue with the next prerequisite ([PHP Ubuntu]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-ubuntu)) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Solving 403 (Forbidden) errors](#apache-error) +* Continue with the next prerequisite ([PHP]({{page.baseurl }}/install-gde/prereq/php-settings.html)) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) {% endcollapsible %} ## Installing Apache on CentOS 6 or 7 {#install-prereq-apache-centos} @@ -144,32 +151,33 @@ Installing and configuring Apache is basically a three-step process: install the ### Installing Apache {#apache-install-centos} -1. Install Apache 2 if you haven't already done so. +1. Install Apache 2 if you haven't already done so. - yum -y install httpd + yum -y install httpd -2. Verify the installation: +1. Verify the installation: - httpd -v + httpd -v - Messages similar to the following display to confirm the installation was successful: + Messages similar to the following display to confirm the installation was successful: - Server version: Apache/2.2.15 (Unix) - Server built: Oct 16 2014 14:48:21 + Server version: Apache/2.2.15 (Unix) + Server built: Oct 16 2014 14:48:21 -3. Continue with the next section. +1. Continue with the next section. {:.bs-callout .bs-callout-info} Even though Apache 2.4 is provided by default with CentOS 7, you configure it like Apache 2.2. See the following section. ### Enable rewrites and .htaccess for Apache 2.2 (including CentOS 7) + {% include install/allowoverrides22.md %} #### Next steps -* [Solving 403 (Forbidden) errors](#apache-error) -* Continue with the next prerequisite ([PHP Ubuntu]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-ubuntu)) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Solving 403 (Forbidden) errors](#apache-error) +* Continue with the next prerequisite ([PHP]({{page.baseurl }}/install-gde/prereq/php-settings.html#)) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) {% endcollapsible %} ## Solving 403 (Forbidden) errors {#apache-error} @@ -177,8 +185,8 @@ Even though Apache 2.4 is provided by default with CentOS 7, you configure it li {% collapsible Click to install solve 403 errors %} If you encounter 403 Forbidden errors when trying to access the Magento site, you can update your Apache configuration or your virtual host configuration to enable visitors to the site as discussed in one of the following sections: -* [Solving 403 Forbidden errors for Apache 2.4](#apache-error-2-4) -* [Solving 403 Forbidden errors for Apache 2.2](#apache-error-2-2) +* [Solving 403 Forbidden errors for Apache 2.4](#apache-error-2-4) +* [Solving 403 Forbidden errors for Apache 2.2](#apache-error-2-2) #### Solving 403 Forbidden errors for Apache 2.4 {#apache-error-2-4} @@ -186,12 +194,12 @@ To enable website visitors to access your site, use one of the [Require directiv For example: - - Options Indexes FollowSymLinks MultiViews - AllowOverride - Order allow,deny - Require all granted - + + Options Indexes FollowSymLinks MultiViews + AllowOverride + Order allow,deny + Require all granted + {:.bs-callout .bs-callout-info} The preceding values for `Order` might not work in all cases. For more information, see the [Apache documentation](https://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#order){:target="_blank"}. @@ -202,22 +210,21 @@ To enable website visitors to access your site, use the [Allow directive](http:/ For example: - - Options Indexes FollowSymLinks MultiViews - AllowOverride - Order allow,deny - Allow from all - + + Options Indexes FollowSymLinks MultiViews + AllowOverride + Order allow,deny + Allow from all + {:.bs-callout .bs-callout-info} The preceding values for `Order` might not work in all cases. For more information, see the [Apache documentation](https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order){:target="_blank"}. {% endcollapsible %} -#### Related topics: +#### Related topics -* [PHP—Ubuntu]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-ubuntu) -* [PHP—CentOS]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-centos) -* [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) -* [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) -* [Installing optional software]({{page.baseurl }}/install-gde/prereq/optional.html) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [PHP]({{page.baseurl }}/install-gde/prereq/php-settings.html) +* [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) +* [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) +* [Installing optional software]({{page.baseurl }}/install-gde/prereq/optional.html) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.3/install-gde/prereq/install-rabbitmq.md b/guides/v2.3/install-gde/prereq/install-rabbitmq.md index 9f1fab32527..6b8c9e8e773 100644 --- a/guides/v2.3/install-gde/prereq/install-rabbitmq.md +++ b/guides/v2.3/install-gde/prereq/install-rabbitmq.md @@ -29,6 +29,7 @@ A basic message queue system can be implemented using cron instead of RabbitMQ. ## Install RabbitMQ on Ubuntu {#ubuntu-install} To install RabbitMQ on Ubuntu 16 enter the following command: + ```bash sudo apt install -y rabbitmq-server ``` @@ -54,6 +55,7 @@ Run the following commands to install this feature. ```bash wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm ``` + ```bash rpm -Uvh erlang-solutions-1.0-1.noarch.rpm ``` @@ -68,6 +70,7 @@ The RabbitMQ server is included on CentOS, but the version is often old. RabbitM ```bash rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc ``` + ```bash yum install rabbitmq-server-3.5.6-1.noarch.rpm ``` @@ -101,7 +104,6 @@ where: |`--amqp-virtualhost`|The virtual host for connecting to RabbitMQ. The default is `/`. |`--amqp-ssl`|Indicates whether to connect to RabbitMQ. The default is `false`. If you set the value to true, see Configure SSL for more information.| - ## Configure SSL To configure support for SSL, edit the `ssl` and `ssl_options` parameters in the `/app/etc/env.php` file so that they are similar to the following: @@ -131,12 +133,12 @@ To configure support for SSL, edit the `ssl` and `ssl_options` parameters in the After you have connected Magento and RabbitMQ, you must start the message queue consumers. See [Configure message queues]({{page.baseurl}}/config-guide/mq/manage-mysql.html) for details. -#### Related topics +## Related topics -* [Installing optional software]({{page.baseurl}}/install-gde/prereq/optional.html) -* [Apache]({{page.baseurl}}/install-gde/prereq/apache.html) -* [PHP 7.1 or 7.2]({{page.baseurl}}/install-gde/prereq/php-centos-ubuntu.html) -* [Configuring security options]({{page.baseurl}}/install-gde/prereq/security.html) -* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) -* [Message queue overview]({{page.baseurl}}/config-guide/mq/rabbitmq-overview.html) -* [Manage message queues]({{page.baseurl}}/config-guide/mq/manage-mysql.html) +* [Installing optional software]({{page.baseurl}}/install-gde/prereq/optional.html) +* [Apache]({{page.baseurl}}/install-gde/prereq/apache.html) +* [PHP 7.1 or 7.2]({{page.baseurl}}/install-gde/prereq/php-settings.html) +* [Configuring security options]({{page.baseurl}}/install-gde/prereq/security.html) +* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Message queue overview]({{page.baseurl}}/config-guide/mq/rabbitmq-overview.html) +* [Manage message queues]({{page.baseurl}}/config-guide/mq/manage-mysql.html) diff --git a/guides/v2.3/install-gde/prereq/mysql.md b/guides/v2.3/install-gde/prereq/mysql.md index f0578ca50eb..4d92dafdb00 100644 --- a/guides/v2.3/install-gde/prereq/mysql.md +++ b/guides/v2.3/install-gde/prereq/mysql.md @@ -6,25 +6,25 @@ menu_title: MySQL menu_order: 25 --- -## Help if you're just starting out {#mysql-help-beginner} +## Help if you are just starting out {#mysql-help-beginner} -If you're new to all this and need some help getting started, we suggest the following: +If you are new to all this and need some help getting started, we suggest the following: -* [Is the Magento software installed already?]({{page.baseurl }}/install-gde/basics/basics_magento-installed.html) -* [What is the software that the Magento server needs to run?]({{page.baseurl }}/install-gde/basics/basics_software.html) -* [What operating system is my server running?]({{page.baseurl }}/install-gde/basics/basics_os-version.html) -* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{page.baseurl }}/install-gde/basics/basics_login.html) +* [Is the Magento software installed already?]({{page.baseurl }}/install-gde/basics/basics_magento-installed.html) +* [What is the software that the Magento server needs to run?]({{page.baseurl }}/install-gde/basics/basics_software.html) +* [What operating system is my server running?]({{page.baseurl }}/install-gde/basics/basics_os-version.html) +* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{page.baseurl }}/install-gde/basics/basics_login.html) ## General guidelines {#instgde-prereq-mysql-intro} {:.bs-callout .bs-callout-info} -The Magento application requires MySQL 5.6.x. Magento versions 2.1.2 and later are compatible with MySQL 5.7.x. Magento is also compatible with MySQL NDB Cluster 7.4.\*, MariaDB 10.0, 10.1, 10.2, Percona 5.7 and other binary compatible MySQL technologies. +The Magento application requires MySQL 5.6.x. Magento versions 2.1.2 and later are compatible with MySQL 5.7.x. Magento is also compatible with MySQL NDB Cluster 7.4.x, MariaDB 10.0, 10.1, 10.2, Percona 5.7 and other binary compatible MySQL technologies. Magento _strongly_ recommends you observe the following standard when you set up your Magento database: -* Magento uses [MySQL database triggers](http://dev.mysql.com/doc/refman/5.0/en/triggers.html){:target="_blank"} to improve database access during reindexing. Magento does not support any custom triggers in the Magento database because custom triggers can introduce incompatibilities with future Magento versions. -* Familiarize yourself with [these potential MySQL trigger limitations](http://dev.mysql.com/doc/mysql-reslimits-excerpt/5.1/en/stored-program-restrictions.html){:target="_blank"} before you continue. -* If you use MySQL database replication, be aware that Magento does _not_ support MySQL statement-based replication. Make sure you use _only_ [row-based replication](http://dev.mysql.com/doc/refman/5.1/en/replication-formats.html){:target="_blank"}. +* Magento uses [MySQL database triggers](http://dev.mysql.com/doc/refman/5.0/en/triggers.html){:target="_blank"} to improve database access during reindexing. Magento does not support any custom triggers in the Magento database because custom triggers can introduce incompatibilities with future Magento versions. +* Familiarize yourself with [these potential MySQL trigger limitations](http://dev.mysql.com/doc/mysql-reslimits-excerpt/5.1/en/stored-program-restrictions.html){:target="_blank"} before you continue. +* If you use MySQL database replication, be aware that Magento does _not_ support MySQL statement-based replication. Make sure you use _only_ [row-based replication](http://dev.mysql.com/doc/refman/5.1/en/replication-formats.html){:target="_blank"}. {:.bs-callout .bs-callout-warning} Magento 2 currently utilizes `CREATE TEMPORARY TABLE` statements inside transactions, which are [incompatible](https://dev.mysql.com/doc/refman/5.7/en/replication-gtids-restrictions.html) with database implementations utilizing GTID-based replication, such as [Google Cloud SQL second-generation instances](https://cloud.google.com/sql/docs/features#differences). @@ -36,9 +36,9 @@ If your web server and database server are on different hosts, perform the tasks See one of the following sections for more information: -* [Installing and configuring MySQL 5.7 on Ubuntu 16](#instgde-prereq-mysql57-ub16) -* [Installing MySQL 5.6 on Ubuntu 14](#instgde-prereq-mysql56ubu14) -* [Installing MySQL 5.6 on Ubuntu 12](#instgde-prereq-mysql56ubu12) +* [Installing and configuring MySQL 5.7 on Ubuntu 16](#instgde-prereq-mysql57-ub16) +* [Installing MySQL 5.6 on Ubuntu 14](#instgde-prereq-mysql56ubu14) +* [Installing MySQL 5.6 on Ubuntu 12](#instgde-prereq-mysql56ubu12) ### Installing and configuring MySQL 5.7 on Ubuntu 16 {#instgde-prereq-mysql57-ub16} @@ -49,130 +49,130 @@ The Magento application 2.1.2 and later are compatible with MySQL 5.7. To install MySQL 5.7 on Ubuntu 16: -1. Enter this command: +1. Enter this command: - sudo apt install -y mysql-server mysql-client + sudo apt install -y mysql-server mysql-client 2. Start MySQL: - sudo service mysql start + sudo service mysql start -3. Secure the installation: +3. Secure the installation: - sudo mysql_secure_installation + sudo mysql_secure_installation -4. Test the installation: +4. Test the installation: - mysql -u root -p + mysql -u root -p - Sample output: + Sample output: - Welcome to the MySQL monitor. Commands end with ; or \g. - Your MySQL connection id is 45 - Server version: 5.6.19-0ubuntu0.14.04.1 (Ubuntu) + Welcome to the MySQL monitor. Commands end with ; or \g. + Your MySQL connection id is 45 + Server version: 5.6.19-0ubuntu0.14.04.1 (Ubuntu) - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. - Oracle is a registered trademark of Oracle Corporation and/or its - affiliates. Other names may be trademarks of their respective - owners. + Oracle is a registered trademark of Oracle Corporation and/or its + affiliates. Other names may be trademarks of their respective + owners. - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. - mysql> + mysql> -5. If you expect to import large numbers of products into Magento, you can increase the value for [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} that is larger than the default, 16MB. +1. If you expect to import large numbers of products into Magento, you can increase the value for [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} that is larger than the default, 16MB. - {% include install/mysql_max-allowed-packet-ubuntu.md %} + {% include install/mysql_max-allowed-packet-ubuntu.md %} -6. [Configure the Magento database instance](#instgde-prereq-mysql-config). +1. [Configure the Magento database instance](#instgde-prereq-mysql-config). ### Installing MySQL 5.6 on Ubuntu 14 {#instgde-prereq-mysql56ubu14} To install MySQL 5.6 on Ubuntu 14: -1. Enter this command: +1. Enter this command: - apt-get -y install mysql-server-5.6 mysql-client-5.6 + apt-get -y install mysql-server-5.6 mysql-client-5.6 2. Start MySQL: - sudo service mysql start + sudo service mysql start -3. Secure the installation: +3. Secure the installation: - mysql_secure_installation + mysql_secure_installation -4. Test the installation by entering the following command: +4. Test the installation by entering the following command: - mysql -u root -p + mysql -u root -p - Sample output: + Sample output: - Welcome to the MySQL monitor. Commands end with ; or \g. - Your MySQL connection id is 45 - Server version: 5.6.19-0ubuntu0.14.04.1 (Ubuntu) + Welcome to the MySQL monitor. Commands end with ; or \g. + Your MySQL connection id is 45 + Server version: 5.6.19-0ubuntu0.14.04.1 (Ubuntu) - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. - Oracle is a registered trademark of Oracle Corporation and/or its - affiliates. Other names may be trademarks of their respective - owners. + Oracle is a registered trademark of Oracle Corporation and/or its + affiliates. Other names may be trademarks of their respective + owners. - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. - mysql> + mysql> -5. If you expect to import large numbers of products into Magento, you can increase the value for [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} that is larger than the default, 16MB. +1. If you expect to import large numbers of products into Magento, you can increase the value for [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} that is larger than the default, 16MB. - {% include install/mysql_max-allowed-packet-ubuntu.md %} + {% include install/mysql_max-allowed-packet-ubuntu.md %} -6. [Configure the Magento database instance](#instgde-prereq-mysql-config). +1. [Configure the Magento database instance](#instgde-prereq-mysql-config). ### Installing MySQL 5.6 on Ubuntu 12 {#instgde-prereq-mysql56ubu12} To install MySQL 5.6 on Ubuntu 12, use the following instructions from [askubuntu.com](http://askubuntu.com/questions/433014/unable-to-install-mysql-5-6-in-ubuntu-12-04){:target="_blank"}. -1. Enter the following commands in the order shown: +1. Enter the following commands in the order shown: - apt-get -y update - apt-add-repository ppa:ondrej/mysql-5.6 - apt-get -y update - apt-get -y install mysql-server + apt-get -y update + apt-add-repository ppa:ondrej/mysql-5.6 + apt-get -y update + apt-get -y install mysql-server 2. Start MySQL: - sudo service mysql start + sudo service mysql start -3. Secure the installation: +3. Secure the installation: - mysql_secure_installation + mysql_secure_installation -4. Test the installation: +4. Test the installation: - mysql -u root -p + mysql -u root -p - Messages similar to the following display: + Messages similar to the following display: - Welcome to the MySQL monitor. Commands end with ; or \g. - Your MySQL connection id is 43 - Server version: 5.6.21-1+deb.sury.org~precise+1 (Ubuntu) + Welcome to the MySQL monitor. Commands end with ; or \g. + Your MySQL connection id is 43 + Server version: 5.6.21-1+deb.sury.org~precise+1 (Ubuntu) - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. - Oracle is a registered trademark of Oracle Corporation and/or its - affiliates. Other names may be trademarks of their respective - owners. + Oracle is a registered trademark of Oracle Corporation and/or its + affiliates. Other names may be trademarks of their respective + owners. - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. - mysql> + mysql> -5. If you expect to import large numbers of products into Magento, you can increase the value for [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} that is larger than the default, 16MB. +1. If you expect to import large numbers of products into Magento, you can increase the value for [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} that is larger than the default, 16MB. - {% include install/mysql_max-allowed-packet-ubuntu.md %} + {% include install/mysql_max-allowed-packet-ubuntu.md %} -6. [Configure the Magento database instance](#instgde-prereq-mysql-config). +1. [Configure the Magento database instance](#instgde-prereq-mysql-config). ## Installing and configuring MySQL 5.7 on CentOS {#instgde-prereq-mysql57-centos} @@ -187,8 +187,8 @@ The following procedure is based on [How to Install Latest MySQL 5.7.9 on RHEL/C As a user with `root` privileges, enter the following commands in the order shown: - wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm - yum -y localinstall mysql57-community-release-el7-7.noarch.rpm + wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm + yum -y localinstall mysql57-community-release-el7-7.noarch.rpm Continue with [Install and configure MySQL 5.7 on CentOS 6 or 7](#mysql57-centos-config). @@ -198,84 +198,83 @@ The following procedure is based on [How to Install Latest MySQL 5.7.9 on RHEL/C As a user with `root` privileges, enter the following commands in the order shown: - wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm - yum -y localinstall mysql57-community-release-el6-7.noarch.rpm + wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm + yum -y localinstall mysql57-community-release-el6-7.noarch.rpm Continue with the next section. ### Install and configure MySQL 5.7 on CentOS 6 or 7 {#mysql57-centos-config} -1. Enter the following commands in the order shown: +1. Enter the following commands in the order shown: - yum -y install mysql-community-server - service mysqld start + yum -y install mysql-community-server + service mysqld start -2. Verify the version: +2. Verify the version: - mysql --version + mysql --version - Sample output follows: + Sample output follows: - mysql Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using EditLine wrapper + mysql Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using EditLine wrapper -3. Get the temporary database `root` user password: +1. Get the temporary database `root` user password: - grep 'temporary password' /var/log/mysqld.log -4. Secure the installation: + grep 'temporary password' /var/log/mysqld.log +1. Secure the installation: - mysql_secure_installation + mysql_secure_installation - Follow the prompts on your screen to set a new password and configure other options. -5. Configure MySQL 5.7 as discussed in [Configuring the Magento database instance](#instgde-prereq-mysql-config). + Follow the prompts on your screen to set a new password and configure other options. +5. Configure MySQL 5.7 as discussed in [Configuring the Magento database instance](#instgde-prereq-mysql-config). ## Installing and configuring MySQL 5.6 on CentOS {#instgde-prereq-mysql-centos} The following procedure is based on [Install MySQL Server 5.6 in CentOS 6.x and Red Hat 6.x Linux](http://sharadchhetri.com/2013/12/26/install-mysql-server-5-6-in-centos-6-x-and-red-hat-6-x-linux/){:target="_blank"}. -1. *CentOS 6* Install the MySQL database: +1. *CentOS 6* Install the MySQL database: - yum -y update - sudo wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm && sudo rpm -ivh mysql-community-release-el6-5.noarch.rpm - sudo yum -y install mysql-server + yum -y update + sudo wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm && sudo rpm -ivh mysql-community-release-el6-5.noarch.rpm + sudo yum -y install mysql-server -2. *CentOS 7* Install the MySQL database: +1. *CentOS 7* Install the MySQL database: - yum -y update - sudo wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm - sudo yum -y install mysql-server + yum -y update + sudo wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm + sudo yum -y install mysql-server +1.Start MySQL: -2. Start MySQL: + service mysqld start - service mysqld start +1. Set a password for the root user and set other security-related options. Enter the following command and follow the prompts on your screen to complete the configuration: -3. Set a password for the root user and set other security-related options. Enter the following command and follow the prompts on your screen to complete the configuration: + mysql_secure_installation - mysql_secure_installation +1. Verify the MySQL server version: -4. Verify the MySQL server version: + mysql -u root -p - mysql -u root -p + Messages similar to the following display: - Messages similar to the following display: + Welcome to the MySQL monitor. Commands end with ; or \g. + Your MySQL connection id is 15 + Server version: 5.6.23 MySQL Community Server (GPL) - Welcome to the MySQL monitor. Commands end with ; or \g. - Your MySQL connection id is 15 - Server version: 5.6.23 MySQL Community Server (GPL) + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. - Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + Oracle is a registered trademark of Oracle Corporation and/or its + affiliates. Other names may be trademarks of their respective + owners. - Oracle is a registered trademark of Oracle Corporation and/or its - affiliates. Other names may be trademarks of their respective - owners. + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. +1. If you expect to import large numbers of products into Magento, you can configure MySQL to use the [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} parameter. We recommend a value of at least 16MB. -5. If you expect to import large numbers of products into Magento, you can configure MySQL to use the [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} parameter. We recommend a value of at least 16MB. + {% include install/mysql_max-allowed-packet-centos.md %} - {% include install/mysql_max-allowed-packet-centos.md %} - -6. Configure the Magento database instance as discussed in the next section. +1. Configure the Magento database instance as discussed in the next section. ## Configuring the Magento database instance {#instgde-prereq-mysql-config} @@ -283,40 +282,40 @@ This section discusses how to create a new database instance for Magento. Althou To configure a MySQL database instance: -1. Log in to your database server as any user. -2. Get to a MySQL command prompt: +1. Log in to your database server as any user. +1. Get to a MySQL command prompt: - mysql -u root -p + mysql -u root -p -3. Enter the MySQL `root` user's password when prompted. -4. Enter the following commands in the order shown to create a database instance named `magento` with username `magento`: +1. Enter the MySQL `root` user's password when prompted. +1. Enter the following commands in the order shown to create a database instance named `magento` with username `magento`: - create database magento; - create user magento IDENTIFIED BY 'magento'; - GRANT ALL ON magento.* TO magento@localhost IDENTIFIED BY 'magento'; - flush privileges; + create database magento; + create user magento IDENTIFIED BY 'magento'; + GRANT ALL ON magento.* TO magento@localhost IDENTIFIED BY 'magento'; + flush privileges; -5. Enter `exit` to quit the command prompt. +1. Enter `exit` to quit the command prompt. -6. Verify the database: +1. Verify the database: - mysql -u magento -p + mysql -u magento -p - If the MySQL monitor displays, you created the database properly. If an error displays, repeat the preceding commands. + If the MySQL monitor displays, you created the database properly. If an error displays, repeat the preceding commands. -7. If your web server and database server are on different hosts, perform the tasks discussed in this topic on the database server host then see [Set up a remote MySQL database connection]({{page.baseurl }}/install-gde/prereq/mysql_remote.html). +1. If your web server and database server are on different hosts, perform the tasks discussed in this topic on the database server host then see [Set up a remote MySQL database connection]({{page.baseurl }}/install-gde/prereq/mysql_remote.html). We recommend you configure your database instance as appropriate for your business. When configuring your database, please keep the following in mind: - - - Indexers require higher `tmp_table_size` and `max_heap_table_size` values (e.g., 64M). If you configure the `batch_size` parameter, you can adjust that value along with the table size settings to improve indexer performance. Refer to the [Magento Optimization Guide]({{page.baseurl }}/performance-best-practices/configuration.html) for more information. - - - For optimal performance, make sure all MySQL and Magento index tables can be kept in memory (e.g., configure `innodb_buffer_pool_size`). - -#### Related topics - -* [Set up a remote MySQL database connection]({{page.baseurl }}/install-gde/prereq/mysql_remote.html) -* [Installing optional software]({{page.baseurl }}/install-gde/prereq/optional.html) -* [Apache]({{page.baseurl }}/install-gde/prereq/apache.html) -* [PHP](php-centos-ubuntu.html) -* [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) -* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) + + * Indexers require higher `tmp_table_size` and `max_heap_table_size` values (e.g., 64M). If you configure the `batch_size` parameter, you can adjust that value along with the table size settings to improve indexer performance. Refer to the [Magento Optimization Guide]({{page.baseurl }}/performance-best-practices/configuration.html) for more information. + + * For optimal performance, make sure all MySQL and Magento index tables can be kept in memory (e.g., configure `innodb_buffer_pool_size`). + +## Related topics + +* [Set up a remote MySQL database connection]({{page.baseurl }}/install-gde/prereq/mysql_remote.html) +* [Installing optional software]({{page.baseurl }}/install-gde/prereq/optional.html) +* [Apache]({{page.baseurl }}/install-gde/prereq/apache.html) +* [PHP](php-settings.html) +* [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) +* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.3/install-gde/prereq/mysql_remote.md b/guides/v2.3/install-gde/prereq/mysql_remote.md index ee2d514b9a8..8887d00306b 100644 --- a/guides/v2.3/install-gde/prereq/mysql_remote.md +++ b/guides/v2.3/install-gde/prereq/mysql_remote.md @@ -21,18 +21,18 @@ This is an advanced topic that should be used only by an experienced network adm Before you begin, you must: -* [Install MySQL server]({{page.baseurl }}/install-gde/prereq/mysql.html) on the database server -* [Create a database instance]({{page.baseurl }}/install-gde/prereq/mysql.html#instgde-prereq-mysql-config) on the database server -* Install the MySQL client on your Magento web node. Consult MySQL documentation for details. +* [Install MySQL server]({{page.baseurl }}/install-gde/prereq/mysql.html) on the database server +* [Create a database instance]({{page.baseurl }}/install-gde/prereq/mysql.html#instgde-prereq-mysql-config) on the database server +* Install the MySQL client on your Magento web node. Consult MySQL documentation for details. ### High availability Use the following guidelines to configure remote database connections if your web server or database server are clustered: -* You must configure a connection for each web server node -* Typically, you configure a database connection to the database load balancer; however, database clustering can be complex and configuring it is up to you. Magento makes no specific recommendations for database clustering. +* You must configure a connection for each web server node +* Typically, you configure a database connection to the database load balancer; however, database clustering can be complex and configuring it is up to you. Magento makes no specific recommendations for database clustering. - For more information, see [MySQL documentation](https://dev.mysql.com/doc/refman/5.6/en/mysql-cluster.html). + For more information, see [MySQL documentation](https://dev.mysql.com/doc/refman/5.6/en/mysql-cluster.html). ### Resolving connection issues @@ -42,36 +42,36 @@ If you have issues connecting to either host, first ping the other host to make To create a remote connection: -1. On your database server, as a user with `root` privileges, open your MySQL configuration file. +1. On your database server, as a user with `root` privileges, open your MySQL configuration file. - To locate it, enter the following command: + To locate it, enter the following command: - mysql --help + mysql --help - The location displays similar to the following: + The location displays similar to the following: - Default options are read from the following files in the given order: - /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf + Default options are read from the following files in the given order: + /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf {:.bs-callout .bs-callout-info} On Ubuntu 16, the path is typically `/etc/mysql/mysql.conf.d/mysqld.cnf`. -3. Search the configuration file for `bind-address`. +1. Search the configuration file for `bind-address`. - If it exists, change the value as follows. + If it exists, change the value as follows. - If it doesn't exist, add it anywhere except the `[mysqld]` section. + If it doesn't exist, add it anywhere except the `[mysqld]` section. - bind-address = + bind-address = - See [MySQL documentation](https://dev.mysql.com/doc/refman/5.6/en/server-options.html), especially if you have a clustered web server. + See [MySQL documentation](https://dev.mysql.com/doc/refman/5.6/en/server-options.html), especially if you have a clustered web server. -3. Save your changes to the configuration file and exit the text editor. -4. Restart the MySQL service: +1. Save your changes to the configuration file and exit the text editor. +1. Restart the MySQL service: - CentOS: `service mysqld restart` + CentOS: `service mysqld restart` - Ubuntu: `service mysql restart` + Ubuntu: `service mysql restart` {:.bs-callout .bs-callout-info} If MySQL fails to start, look in syslog for the source of the issue. Resolve the issue using [MySQL documentation](https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_bind-address) or another authoritative source. @@ -84,15 +84,15 @@ This example grants the `root` database user full access to the database on the To grant access to a database user: -1. Log in to the database server. -2. Connect to the MySQL database as the `root` user. -3. Enter the following command: +1. Log in to the database server. +1. Connect to the MySQL database as the `root` user. +1. Enter the following command: - GRANT ALL ON .* TO @ IDENTIFIED BY ''; + GRANT ALL ON .* TO @ IDENTIFIED BY ''; - For example, + For example, - GRANT ALL ON magento_remote.* TO dbuser@192.0.2.50 IDENTIFIED BY 'dbuserpassword'; + GRANT ALL ON magento_remote.* TO dbuser@192.0.2.50 IDENTIFIED BY 'dbuserpassword'; {:.bs-callout .bs-callout-info} If your web server is clustered, enter the same command on every web server. You must use the same username for every web server. @@ -101,21 +101,21 @@ If your web server is clustered, enter the same command on every web server. You On your web node host, enter the following command to verify the connection works: - mysql -u -h -p + mysql -u -h -p If the MySQL monitor displays as follows, the database is ready for the Magento software: - Welcome to the MySQL monitor. Commands end with ; or \g. - Your MySQL connection id is 213 - Server version: 5.6.26 MySQL Community Server (GPL) + Welcome to the MySQL monitor. Commands end with ; or \g. + Your MySQL connection id is 213 + Server version: 5.6.26 MySQL Community Server (GPL) - Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. - Oracle is a registered trademark of Oracle Corporation and/or its - affiliates. Other names may be trademarks of their respective - owners. + Oracle is a registered trademark of Oracle Corporation and/or its + affiliates. Other names may be trademarks of their respective + owners. - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. If your web server is clustered, enter the command on each web server host. @@ -123,17 +123,16 @@ If your web server is clustered, enter the command on each web server host. When you install the Magento software using either the command line or Setup Wizard, you must specify the following: -* The Base [URL](https://glossary.magento.com/url) (also referred to as the *store address*) specifies the hostname or IP address of the *web node* -* Database host is the *remote database server* IP address (or load balancer if the database server is clustered) -* Database username is the *local web node* database user to which you gave access -* Database password is the local web node user's password -* Database name is the name of the database on the remote server +* The Base [URL](https://glossary.magento.com/url) (also referred to as the *store address*) specifies the hostname or IP address of the *web node* +* Database host is the *remote database server* IP address (or load balancer if the database server is clustered) +* Database username is the *local web node* database user to which you gave access +* Database password is the local web node user's password +* Database name is the name of the database on the remote server -#### Related topics +## Related topics -* [Installing optional software]({{page.baseurl }}/install-gde/prereq/optional.html) -* [Apache]({{page.baseurl }}/install-gde/prereq/apache.html) -* [PHP—Ubuntu]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-ubuntu) -* [PHP—CentOS]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-centos) -* [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) -* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Installing optional software]({{page.baseurl}}/install-gde/prereq/optional.html) +* [Apache]({{page.baseurl}}/install-gde/prereq/apache.html) +* [PHP]({{page.baseurl}}/install-gde/prereq/php-settings.html) +* [Configuring security options]({{page.baseurl}}/install-gde/prereq/security.html) +* [How to get the Magento software]({{ page.baseurl}}/install-gde/bk-install-guide.html) diff --git a/guides/v2.3/install-gde/prereq/nginx.md b/guides/v2.3/install-gde/prereq/nginx.md index 52d1527734b..6d70f736834 100644 --- a/guides/v2.3/install-gde/prereq/nginx.md +++ b/guides/v2.3/install-gde/prereq/nginx.md @@ -12,16 +12,16 @@ functional_areas: Magento supports nginx 1.8 (or the [latest mainline version](http://nginx.org/en/linux_packages.html#mainline){:target="_blank}). You must also install the latest version of `php-fpm`. -Installation instructions vary based on which operating system you're using. See [PHP](php-centos-ubuntu.html) for instructions to install PHP on CentOS and Ubuntu. +Installation instructions vary based on which operating system you are using. See [PHP](php-settings.html) for for information. ## Help if you're just starting out {#apache-help-beginner} If you're new to all this and need some help getting started, we suggest the following: -* [Is the Magento software installed already?]({{page.baseurl }}/install-gde/basics/basics_magento-installed.html) -* [What is the software that the Magento server needs to run?]({{page.baseurl }}/install-gde/basics/basics_software.html) -* [What operating system is my server running?]({{page.baseurl }}/install-gde/basics/basics_os-version.html) -* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{page.baseurl }}/install-gde/basics/basics_login.html) +* [Is the Magento software installed already?]({{page.baseurl }}/install-gde/basics/basics_magento-installed.html) +* [What is the software that the Magento server needs to run?]({{page.baseurl }}/install-gde/basics/basics_software.html) +* [What operating system is my server running?]({{page.baseurl }}/install-gde/basics/basics_os-version.html) +* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{page.baseurl }}/install-gde/basics/basics_login.html) ## Ubuntu 16 @@ -29,42 +29,44 @@ The following section describes how to install Magento 2.x on Ubuntu 16 using ng ### Install nginx - apt-get -y install nginx +```bash +apt-get -y install nginx +``` After completing the following sections and [installing Magento]({{page.baseurl }}/install-gde/prereq/nginx.html#install-magento2-ubuntu), we'll use a sample configuration file to [configure nginx]({{page.baseurl }}/install-gde/prereq/nginx.html#configure-nginx-ubuntu). ### Install and configure php-fpm -Magento requires several [PHP extensions](php-centos-ubuntu.html) to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you're using nginx. +Magento requires several [PHP extensions](php-settings.html) to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you are using nginx. To install and configure `php-fpm`: 1. Install `php-fpm` and `php-cli`: - apt-get -y install php7.2-fpm php7.2-cli + apt-get -y install php7.2-fpm php7.2-cli {:.bs-callout .bs-callout-info} This command installs the latest available version of PHP 7.2.X. See [Magento 2.3.x technology stack requirements]({{ page.baseurl }}/install-gde/system-requirements-tech.html) for supported PHP versions. -2. Open the `php.ini` files in an editor: +1. Open the `php.ini` files in an editor: - vim /etc/php/7.2/fpm/php.ini - vim /etc/php/7.2/cli/php.ini + vim /etc/php/7.2/fpm/php.ini + vim /etc/php/7.2/cli/php.ini -3. Edit both files to match the following lines: +1. Edit both files to match the following lines: - memory_limit = 2G - max_execution_time = 1800 - zlib.output_compression = On + memory_limit = 2G + max_execution_time = 1800 + zlib.output_compression = On {:.bs-callout .bs-callout-info} We recommend setting the memory limit to 2G when testing Magento. Refer to [Required PHP settings]({{page.baseurl }}/install-gde/prereq/php-settings.html) for more information. -4. Save and exit the editor. +1. Save and exit the editor. -5. Restart the `php-fpm` service: +1. Restart the `php-fpm` service: - systemctl restart php7.2-fpm + systemctl restart php7.2-fpm ### Install and configure MySQL @@ -74,35 +76,37 @@ Refer to [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) for more infor There are several ways to download the Magento software, including: -* [Get the Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) +* [Get the Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) -* [Download an archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) +* [Download an archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) -* [Clone the git repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html) +* [Clone the git repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html) For this example, we'll install using Composer and the command line. {:.bs-callout .bs-callout-info} You cannot use the Web Setup Wizard when installing Magento on nginx. You must use the command line. -1. As the [Magento file system owner]({{page.baseurl}}/install-gde/prereq/file-sys-perms-over.html), log in to your Magento server. +1. As the [Magento file system owner]({{page.baseurl}}/install-gde/prereq/file-sys-perms-over.html), log in to your Magento server. -1. Change to the web server docroot directory or a directory that you have configured as a virtual host docroot. For this example, we're using the Ubuntu default `/var/www/html`. +1. Change to the web server docroot directory or a directory that you have configured as a virtual host docroot. For this example, we're using the Ubuntu default `/var/www/html`. - cd /var/www/html + cd /var/www/html -1. Install Composer globally. You'll need Composer to update dependencies before installing Magento: +1. Install Composer globally. You'll need Composer to update dependencies before installing Magento: - curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer + curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer 1. Create a new Composer project using the {{site.data.var.ce}} or {{site.data.var.ee}} metapackage. **{{site.data.var.ce}}** + ```bash composer create-project --repository=https://repo.magento.com/ magento/project-community-edition ``` **{{site.data.var.ee}}** + ```bash composer create-project --repository=https://repo.magento.com/ magento/project-enterprise-edition ``` @@ -142,7 +146,7 @@ You cannot use the Web Setup Wizard when installing Magento on nginx. You must u 1. Switch to developer mode: - cd /var/www/html/magento2/bin + cd /var/www/html/magento2/bin ./magento deploy:mode:set developer ### Configure nginx {#configure-nginx-ubuntu} @@ -153,40 +157,40 @@ These instructions assume you're using the Ubuntu default location for the nginx 1. Create a new virtual host for your Magento site: - vim /etc/nginx/sites-available/magento + vim /etc/nginx/sites-available/magento 2. Add the following configuration: - upstream fastcgi_backend { - server unix:/run/php/php7.2-fpm.sock; - } + upstream fastcgi_backend { + server unix:/run/php/php7.2-fpm.sock; + } - server { + server { - listen 80; - server_name www.magento-dev.com; - set $MAGE_ROOT /var/www/html/magento2; - include /var/www/html/magento2/nginx.conf.sample; - } + listen 80; + server_name www.magento-dev.com; + set $MAGE_ROOT /var/www/html/magento2; + include /var/www/html/magento2/nginx.conf.sample; + } {:.bs-callout .bs-callout-info} The `include` directive must point to the sample nginx configuration file in your Magento installation directory. -3. Replace `www.magento-dev.com` with your domain name. This must match the base URL you specified when installing Magento. +1. Replace `www.magento-dev.com` with your domain name. This must match the base URL you specified when installing Magento. -4. Save and exit the editor. +1. Save and exit the editor. -5. Activate the newly created virtual host by creating a symlink to it in the `/etc/nginx/sites-enabled` directory: +1. Activate the newly created virtual host by creating a symlink to it in the `/etc/nginx/sites-enabled` directory: - ln -s /etc/nginx/sites-available/magento /etc/nginx/sites-enabled + ln -s /etc/nginx/sites-available/magento /etc/nginx/sites-enabled -6. Verify that the syntax is correct: +1. Verify that the syntax is correct: - nginx -t + nginx -t -7. Restart nginx: +1. Restart nginx: - systemctl restart nginx + systemctl restart nginx ### Verify the installation @@ -198,82 +202,82 @@ The following section describes how to install Magento 2.x on CentOS 7 using ngi ### Install nginx - yum -y install epel-release - yum -y install nginx + yum -y install epel-release + yum -y install nginx After installation is complete, start nginx and configure it to start at boot time: - systemctl start nginx - systemctl enable nginx + systemctl start nginx + systemctl enable nginx After completing the following sections and [installing Magento]({{page.baseurl }}/install-gde/prereq/nginx.html#install-magento2-centos), we'll use a sample configuration file to [configure nginx]({{page.baseurl }}/install-gde/prereq/nginx.html#configure-nginx-centos). ### Install and configure php-fpm -Magento requires several [PHP extensions](php-centos-ubuntu.html) to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you're using nginx. +Magento requires several [PHP extensions](php-settings.html) to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you're using nginx. 1. Install `php-fpm`: - yum -y install php70w-fpm + yum -y install php70w-fpm -2. Open the `/etc/php.ini` file in an editor. +1. Open the `/etc/php.ini` file in an editor. -3. Uncomment the `cgi.fix_pathinfo` line and change the value to `0`. +1. Uncomment the `cgi.fix_pathinfo` line and change the value to `0`. -4. Edit the file to match the following lines: +1. Edit the file to match the following lines: - memory_limit = 2G - max_execution_time = 1800 - zlib.output_compression = On + memory_limit = 2G + max_execution_time = 1800 + zlib.output_compression = On {:.bs-callout .bs-callout-info} We recommend setting the memory limit to 2G when testing Magento. Refer to [Required PHP settings]({{page.baseurl }}/install-gde/prereq/php-settings.html) for more information. -5. Uncomment the session path directory and set the path: +1. Uncomment the session path directory and set the path: - session.save_path = "/var/lib/php/session" + session.save_path = "/var/lib/php/session" -6. Save and exit the editor. +1. Save and exit the editor. -7. Open `/etc/php-fpm.d/www.conf` in an editor. +1. Open `/etc/php-fpm.d/www.conf` in an editor. -8. Edit the file to match the following lines: +1. Edit the file to match the following lines: - user = nginx - group = nginx - listen = /run/php-fpm/php-fpm.sock - listen.owner = nginx - listen.group = nginx - listen.mode = 0660 + user = nginx + group = nginx + listen = /run/php-fpm/php-fpm.sock + listen.owner = nginx + listen.group = nginx + listen.mode = 0660 -9. Uncomment the environment lines: +1. Uncomment the environment lines: - env[HOSTNAME] = $HOSTNAME - env[PATH] = /usr/local/bin:/usr/bin:/bin - env[TMP] = /tmp - env[TMPDIR] = /tmp - env[TEMP] = /tmp + env[HOSTNAME] = $HOSTNAME + env[PATH] = /usr/local/bin:/usr/bin:/bin + env[TMP] = /tmp + env[TMPDIR] = /tmp + env[TEMP] = /tmp -10. Save and exit the editor. +1. Save and exit the editor. -11. Create a new directory for the PHP session path and change the owner to the `apache` user and group: +1. Create a new directory for the PHP session path and change the owner to the `apache` user and group: - mkdir -p /var/lib/php/session/ - chown -R apache:apache /var/lib/php/ + mkdir -p /var/lib/php/session/ + chown -R apache:apache /var/lib/php/ -12. Create a new directory for the PHP session path and change the owner to the `apache` user and group: +1. Create a new directory for the PHP session path and change the owner to the `apache` user and group: - mkdir -p /run/php-fpm/ - chown -R apache:apache /run/php-fpm/ + mkdir -p /run/php-fpm/ + chown -R apache:apache /run/php-fpm/ -13. Start the `php-fpm` service and configure it to start at boot time: +1. Start the `php-fpm` service and configure it to start at boot time: - systemctl start php-fpm - systemctl enable php-fpm + systemctl start php-fpm + systemctl enable php-fpm -14. Verify that the `php-fpm` service is running: +1. Verify that the `php-fpm` service is running: - netstat -pl | grep php-fpm.sock + netstat -pl | grep php-fpm.sock ### Install and configure MySQL @@ -283,35 +287,37 @@ Refer to [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) for more infor There are several ways to download the Magento software, including: -* [Get the Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) +* [Get the Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) -* [Download an archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) +* [Download an archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) -* [Clone the git repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html) +* [Clone the git repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html) For this example, we'll install using Composer and the command line. {:.bs-callout .bs-callout-info} You cannot use the Web Setup Wizard when installing Magento on nginx. You must use the command line. -1. As the [Magento file system owner]({{page.baseurl}}/install-gde/prereq/file-sys-perms-over.html), log in to your Magento server. +1. As the [Magento file system owner]({{page.baseurl}}/install-gde/prereq/file-sys-perms-over.html), log in to your Magento server. -1. Change to the web server docroot directory or a directory that you have configured as a virtual host docroot. For this example, we're using the Ubuntu default `/var/www/html`. +1. Change to the web server docroot directory or a directory that you have configured as a virtual host docroot. For this example, we're using the Ubuntu default `/var/www/html`. - cd /var/www/html + cd /var/www/html -1. Install Composer globally. You'll need Composer to update dependencies before installing Magento: +1. Install Composer globally. You'll need Composer to update dependencies before installing Magento: - curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer + curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer 1. Create a new Composer project using the {{site.data.var.ce}} or {{site.data.var.ee}} metapackage. **{{site.data.var.ce}}** + ```bash composer create-project --repository=https://repo.magento.com/ magento/project-community-edition ``` **{{site.data.var.ee}}** + ```bash composer create-project --repository=https://repo.magento.com/ magento/project-enterprise-edition ``` @@ -351,7 +357,7 @@ You cannot use the Web Setup Wizard when installing Magento on nginx. You must u 1. Switch to developer mode: - cd /var/www/html/magento2/bin + cd /var/www/html/magento2/bin ./magento deploy:mode:set developer ### Configure nginx {#configure-nginx-centos} @@ -362,81 +368,80 @@ These instructions assume you're using the CentOS default location for the nginx 1. Create a new virtual host for your Magento site: - vim /etc/nginx/conf.d/magento.conf + vim /etc/nginx/conf.d/magento.conf -2. Add the following configuration: +1. Add the following configuration: - upstream fastcgi_backend { - server unix:/run/php-fpm/php-fpm.sock; - } + upstream fastcgi_backend { + server unix:/run/php-fpm/php-fpm.sock; + } - server { + server { - listen 80; - server_name www.magento-dev.com; - set $MAGE_ROOT /usr/share/nginx/html/magento2; - include /usr/share/nginx/html/magento2/nginx.conf.sample; - } + listen 80; + server_name www.magento-dev.com; + set $MAGE_ROOT /usr/share/nginx/html/magento2; + include /usr/share/nginx/html/magento2/nginx.conf.sample; + } {:.bs-callout .bs-callout-info} The `include` directive must point to the sample nginx configuration file in your Magento installation directory. -3. Replace `www.magento-dev.com` with your domain name. +1. Replace `www.magento-dev.com` with your domain name. -4. Save and exit the editor. +1. Save and exit the editor. -5. Verify that the syntax is correct: +1. Verify that the syntax is correct: - nginx -t + nginx -t -6. Restart nginx: +1. Restart nginx: - systemctl restart nginx + systemctl restart nginx ### Configure SELinux and Firewalld SELinux is enabled by default on CentOS 7. Use the following command to see if it's running: - sestatus + sestatus To configure SELinux and firewalld: 1. Install SELinux management tools: - yum -y install policycoreutils-python - -2. Run the following commands to change the security context for the Magento installation directory: + yum -y install policycoreutils-python +1. Run the following commands to change the security context for the Magento installation directory: - semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/app/etc(/.*)?' - semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/var(/.*)?' - semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/media(/.*)?' - semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/static(/.*)?' - restorecon -Rv '/usr/share/nginx/html/magento2/' + semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/app/etc(/.*)?' + semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/var(/.*)?' + semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/media(/.*)?' + semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/static(/.*)?' + restorecon -Rv '/usr/share/nginx/html/magento2/' -3. Install the firewalld package: +1. Install the firewalld package: - yum -y install firewalld + yum -y install firewalld -4. Start the firewall service and configure it to start at boot time: +1. Start the firewall service and configure it to start at boot time: - systemctl start firewalld - systemctl enable firewalld + systemctl start firewalld + systemctl enable firewalld -5. Run the following commands to open ports for HTTP and HTTPS so you can access the Magento base URL from a web browser: +1. Run the following commands to open ports for HTTP and HTTPS so you can access the Magento base URL from a web browser: - firewall-cmd --permanent --add-service=http - firewall-cmd --permanent --add-service=https - firewall-cmd --reload + firewall-cmd --permanent --add-service=http + firewall-cmd --permanent --add-service=https + firewall-cmd --reload ### Verify the installation Open a web browser and navigate to your site's base URL to [verify the installation.]({{page.baseurl }}/install-gde/install/verify.html) -#### Related topics: +## Related topics -* [PHP](php-centos-ubuntu.html) -* [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) -* [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) -* [Installing optional software]({{page.baseurl }}/install-gde/prereq/optional.html) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [PHP](php-settings.html) +* [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) +* [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) +* [Installing optional software]({{page.baseurl }}/install-gde/prereq/optional.html) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.3/install-gde/prereq/optional.md b/guides/v2.3/install-gde/prereq/optional.md index 8f92fa810c4..a1db9125ab2 100644 --- a/guides/v2.3/install-gde/prereq/optional.md +++ b/guides/v2.3/install-gde/prereq/optional.md @@ -17,21 +17,22 @@ We strongly recommend you install NTP because otherwise, cron-related tasks migh The other optional utilities discussed in this topic might assist you with your installation; however, they are not required to install or use Magento. ## Installing and Configuring Network Time Protocol (NTP) {#install-optional-ntp} + [NTP](http://www.ntp.org){:target="_blank"} enables servers to synchronize their system clocks using [globally available pool servers](http://www.pool.ntp.org/en){:target="_blank"}. Magento recommends you use NTP servers you trust, whether they are dedicated hardware solutions your internal network or external, public servers. If you are deploying Magento on multiple hosts, NTP is a simple way to guarantee their clocks are all synchronized, no matter what time zone the servers are in. Also, cron-related tasks (such as indexing and transactional e-mails) depend on the server clock being accurate. See one of the following sections: -* [Install and configure NTP on Ubuntu](#install-optional-ntp-ubuntu) -* [Install and configure NTP on CentOS](#install-optional-ntp-centos) -* [Use NTP pool servers](#install-optional-ntp-servers) +* [Install and configure NTP on Ubuntu](#install-optional-ntp-ubuntu) +* [Install and configure NTP on CentOS](#install-optional-ntp-centos) +* [Use NTP pool servers](#install-optional-ntp-servers) ### Install and configure NTP on Ubuntu {#install-optional-ntp-ubuntu} Enter the following command to install NTP: - apt-get install ntp + apt-get install ntp Continue with [Use NTP pool servers](#install-optional-ntp-servers). @@ -39,59 +40,60 @@ Continue with [Use NTP pool servers](#install-optional-ntp-servers). To install and configure NTP: -1. Enter the following command to find the appropriate NTP software: +1. Enter the following command to find the appropriate NTP software: - yum search ntp + yum search ntp -2. Select a package to install. For example, `ntp.x86_64`. +1. Select a package to install. For example, `ntp.x86_64`. -2. Install the package. +1. Install the package. - yum -y install ntp.x86_64 + yum -y install ntp.x86_64 -3. Enter the following command so that NTP starts when the server starts. +1. Enter the following command so that NTP starts when the server starts. - chkconfig ntpd on + chkconfig ntpd on -3. Continue with the next section. +1. Continue with the next section. ### Use NTP pool servers {#install-optional-ntp-servers} Selecting pool servers is up to you. If you use NTP pool servers, ntp.org recommends you use [pool servers](http://www.pool.ntp.org/en){:target="_blank"} that are close to your servers' time zone as discussed on the [NTP pool project help page](http://www.pool.ntp.org/en/use.html){:target="_blank"}. If you have a private NTP server that is available to all hosts in your Magento deployment, you can use that server instead. -1. Open `/etc/ntp.conf` in a text editor. +1. Open `/etc/ntp.conf` in a text editor. -2. Look for lines similar to the following: +1. Look for lines similar to the following: - server 0.centos.pool.ntp.org - server 1.centos.pool.ntp.org - server 2.centos.pool.ntp.org + server 0.centos.pool.ntp.org + server 1.centos.pool.ntp.org + server 2.centos.pool.ntp.org -3. Replace those lines or add additional lines that specify your NTP pool server or other NTP servers. It's a good idea to specify more than one. +1. Replace those lines or add additional lines that specify your NTP pool server or other NTP servers. It's a good idea to specify more than one. -4. An example of using three United States-based NTP servers follows: +1. An example of using three United States-based NTP servers follows: - server 0.us.pool.ntp.org - server 1.us.pool.ntp.org - server 2.us.pool.ntp.org + server 0.us.pool.ntp.org + server 1.us.pool.ntp.org + server 2.us.pool.ntp.org -5. Save your changes to `/etc/ntp.conf` and exit the text editor. +1. Save your changes to `/etc/ntp.conf` and exit the text editor. -4. Restart the service. +1. Restart the service. - Ubuntu: `service ntp restart` + Ubuntu: `service ntp restart` - CentOS: `service ntpd restart` + CentOS: `service ntpd restart` -4. Enter `date` to check the server's date. +1. Enter `date` to check the server's date. - If the date is incorrect, make sure the NTP client port (typically, UDP 123) is open in your firewall. + If the date is incorrect, make sure the NTP client port (typically, UDP 123) is open in your firewall. - Try the `ntpdate _[pool server hostname]_` command. If it fails, search for the error it returns. + Try the `ntpdate _[pool server hostname]_` command. If it fails, search for the error it returns. - If all else fails, try rebooting the server. + If all else fails, try rebooting the server. ## Create phpinfo.php {#install-optional-phpinfo} + [`phpinfo.php`](http://php.net/manual/en/function.phpinfo.php){:target="_blank"} displays a large amount of information about [PHP](https://glossary.magento.com/php) and its extensions. {:.bs-callout .bs-callout-info} @@ -99,26 +101,29 @@ Use `phpinfo.php` in a development system _only_. It can be a security issue in Add the following code anywhere in your web server's docroot: - /phpinfo.php + http:///phpinfo.php If a 404 (Not Found) error displays, check the following: -* Start the web server if necessary. -* Make sure your firewall allows traffic on port 80. +* Start the web server if necessary. +* Make sure your firewall allows traffic on port 80. - [Help for Ubuntu](https://help.ubuntu.com/community/UFW) + [Help for Ubuntu](https://help.ubuntu.com/community/UFW) - [Help for CentOS](http://wiki.centos.org/HowTos/Network/IPTables){:target="_blank"} + [Help for CentOS](http://wiki.centos.org/HowTos/Network/IPTables){:target="_blank"} ## Install phpmyadmin {#install-optional-phpmyadmin} + `phpmyadmin` is an easy-to-use, free database administration utility. You can use it to check and manipulate the contents of your database. You must log in to `phpmyadmin` as the MySQL database administrative user. For more information about `phpmyadmin`, see the [phpmyadmin home page](http://www.phpmyadmin.net/home_page/index.php){:target="_blank"}. @@ -132,71 +137,70 @@ Use phpmyadmin in a development system _only_. It can be a security issue in pro To install phpmyadmin on Ubuntu: -1. Use the following command: +1. Use the following command: - apt-get install phpmyadmin + apt-get install phpmyadmin -2. Follow the prompts on your screen to complete the installation. +1. Follow the prompts on your screen to complete the installation. -3. To use phpmyadmin, enter the following URL in your browser's address or location field: +1. To use phpmyadmin, enter the following URL in your browser's address or location field: - http:///phpmyadmin + http:///phpmyadmin -4. When prompted, log in using your MySQL database `root` or administrative user's username and password. +1. When prompted, log in using your MySQL database `root` or administrative user's username and password. ## Install phpmyadmin on CentOS {#install-optional-phpmyadmin-centos} To install phpmyadmin on CentOS: -1. Download the epel RPM for the version of CentOS you're using. A sample follows. +1. Download the epel RPM for the version of CentOS you're using. A sample follows. - cd /tmp - wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm - rpm -ivh epel-release-6-8.noarch.rpm + cd /tmp + wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm + rpm -ivh epel-release-6-8.noarch.rpm -2. Install `phpmyadmin` as follows: +1. Install `phpmyadmin` as follows: - yum -y install phpmyadmin + yum -y install phpmyadmin -3. Authorize access to phpmyadmin from your machine's IP address. +1. Authorize access to phpmyadmin from your machine's IP address. - Open the following file for editing: + Open the following file for editing: - vim /etc/httpd/conf.d/phpMyAdmin.conf + vim /etc/httpd/conf.d/phpMyAdmin.conf -3. Replace the following IP address with your IP address +1. Replace the following IP address with your IP address - Require ip localhost + Require ip localhost - For example, + For example, - Require ip 192.51.100.101 + Require ip 192.51.100.101 -4. Replace the following IP with your IP address: +1. Replace the following IP with your IP address: - Allow from localhost + Allow from localhost - For example, + For example, - Allow from 192.51.100.101 + Allow from 192.51.100.101 -5. Save your changes to `/etc/httpd/conf.d/phpMyAdmin.conf` and exit the text editor. +1. Save your changes to `/etc/httpd/conf.d/phpMyAdmin.conf` and exit the text editor. -6. Restart Apache. +1. Restart Apache. - service httpd Restart + service httpd Restart -7. To use phpmyadmin, enter the following command in your browser's address or location field: +1. To use phpmyadmin, enter the following command in your browser's address or location field: - http:///phpmyadmin + http:///phpmyadmin -8. When prompted, log in using your MySQL database `root` or administrative user's username and password. +1. When prompted, log in using your MySQL database `root` or administrative user's username and password. -#### Related topics: +## Related topics -* [Apache]({{page.baseurl }}/install-gde/prereq/apache.html) -* [PHP—Ubuntu]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-ubuntu) -* [PHP—CentOS]({{page.baseurl }}/install-gde/prereq/php-centos-ubuntu.html#php-for-centos) -* [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) -* [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) -* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Apache]({{page.baseurl }}/install-gde/prereq/apache.html) +* [PHP]({{page.baseurl }}/install-gde/prereq/php-settings.html) +* [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) +* [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) +* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.3/install-gde/prereq/php-centos-ubuntu.md b/guides/v2.3/install-gde/prereq/php-centos-ubuntu.md deleted file mode 100644 index 1d2c4e86e85..00000000000 --- a/guides/v2.3/install-gde/prereq/php-centos-ubuntu.md +++ /dev/null @@ -1,326 +0,0 @@ ---- -group: installation-guide -title: PHP -redirect_from: - - /guides/v2.3/install-gde/prereq/php-centos.html -functional_areas: - - Install - - System - - Setup ---- - -This page details how to install PHP for both CentOS and Ubuntu systems. - -{:.bs-callout .bs-callout-info} -Magento 2.3.1 supports PHP 7.2.11. -All 3rd party libraries now support PHP 7.2. -If you are interested in participating in Magento Community projects we welcome your help! See our [ZenHub board](https://app.zenhub.com/workspace/o/magento-engcom/php-7.2-support/boards?repos=116423356,116426364,115111902) for a full list of outstanding issues. - -## Supported PHP versions {#php-support} - - -{% include install/php-versions-template.md %} - - -{:.bs-callout .bs-callout-info} -If you must install both Apache and PHP, [install Apache]({{page.baseurl}}/install-gde/prereq/apache.html) first. - -## PHP for CentOS - -The following sections give you all the info you need to install PHP for CentOS. - -### Verify PHP is installed {#centos-verify-php} - -To verify if PHP is installed already, enter `php -v`. If [PHP](https://glossary.magento.com/php) is installed, a message similar to the following displays: - -```bash -PHP 7.1.6 (cli) (built: Jan 9 2017 09:23:16) ( NTS ) -Copyright (c) 1997-2017 The PHP Group -Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.6, Copyright (c) 1999-2017, by Zend Technologies -``` - -{:.bs-callout .bs-callout-info} -The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with the OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"}. - -If PHP is installed, continue with the next prerequisite, [MySQL]({{page.baseurl}}/install-gde/prereq/mysql.html). - -If PHP is *not* installed, see the [PHP 7.1 on CentOS](#php-centos-71) section. - -### CentOS repositories {#centos-php-repos} - -Linux systems provide software like PHP in one or more *repositories*. CentOS, unlike Ubuntu, has a set of [officially recommended repositories](https://wiki.centos.org/AdditionalResources/Repositories){:target="_blank"}. Other repositories are considered less safe for the reasons stated on the CentOS wiki. - -We're not aware that you can install PHP 7.1 or 7.2 from a CentOS-recommended repository. Therefore, you must consider the following: - -* If you're setting up a system that will be deployed in production, you should choose a hosting provider who uses repositories considered to be safe and reliable. - -You should also consider upgrading to a later version of CentOS that has the desired PHP version in a recommended repository. - -* If you're setting up a development system, you can use any repository you wish. - -In this topic, we show how to install PHP using the [Inline with Upstream Stable (IUS)](https://ius.io/GettingStarted){:target="_blank"} repository, which is *not* on the CentOS recommended list. However, packages installed from IUS do not use the same names as CentOS-provided packages, so [no existing system packages are replaced](https://ius.io/Philosophy){:target="_blank"}. - -Before you continue, review their [Getting Started topic](https://ius.io/GettingStarted){:target="_blank"}. - -{:.bs-callout .bs-callout-warning} -Magento does **not** officially recommend using the IUS repository. We discuss it here for example purposes only. - -### PHP 7.1 on CentOS {#php-centos-71} - -There is more than one way to install PHP 7.1 on CentOS; the following is a suggestion only. Consult a reference for additional options. - -To install PHP 7.1 on CentOS 6 or 7: - -1. *CentOS 6*. Enter the following commands in the order shown: - - ```bash - yum -y update - ``` - - ```bash - yum -y install epel-release - ``` - - ```bash - wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm - ``` - - ```bash - wget https://centos6.iuscommunity.org/ius-release.rpm - ``` - - ```bash - rpm -Uvh ius-release*.rpm - ``` - - ```bash - yum -y update - ``` - -1. *CentOS 7*. Enter the following commands: - - ```bash - yum install -y http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-15.ius.centos7.noarch.rpm - ``` - - ```bash - yum -y update - ``` - -1. Install all [required PHP extensions]({{page.baseurl}}/install-gde/system-requirements-tech.html#required-php-extensions): - - ```bash - yum -y install php71u php71u-pdo php71u-mysqlnd php71u-opcache php71u-xml php71u-gd php71u-devel php71u-mysql php71u-intl php71u-mbstring php71u-bcmath php71u-json php71u-iconv php71u-soap - ``` - - {:.bs-callout .bs-callout-info} - The `bcmath` extension is required for {{site.data.var.ee}} only. - -1. Restart Apache: - - ```bash - service httpd restart` - ``` - -1. Verify that PHP 7.1 is installed properly: - - ```bash - php -v - ``` - - The following response indicates that PHP 7.1.6 is installed: - - ```terminal - PHP 7.1.6 (cli) (built: Jan 9 2017 09:23:16) ( NTS ) - Copyright (c) 1997-2017 The PHP Group - Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.6, Copyright (c) 1999-2017, by Zend Technologies - ``` - - {:.bs-callout .bs-callout-info} - The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with the OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"}. - -1. Verify that all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions) were installed: - - ```bash - php -me - ``` - - You should see output similar to the following: - - ```terminal - [PHP Modules] - bcmath - calendar - Core - ctype - curl - date - dom - exif - fileinfo - filter - ftp - gd - gettext - hash - iconv - intl - json - libxml - mbstring - mysqli - mysqlnd - openssl - pcntl - pcre - PDO - pdo_mysql - Phar - readline - Reflection - session - SimpleXML - soap - sockets - SPL - standard - tokenizer - wddx - xml - xmlreader - xmlwriter - xsl - Zend OPcache - zip - zlib - - [Zend Modules] - Zend OPcache - ``` - -1. Continue with [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). - -## PHP for Ubuntu - -The following sections give you all the info you need to install PHP for Ubuntu. - -### Verify PHP is installed {#ubuntu-verify-php} - -To verify if PHP is installed already, enter `php -v`. If PHP is installed, a message similar to the following displays: - -```bash -PHP 7.1.7-1~ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jul 6 2017 09:07:54) ( NTS ) -Copyright (c) 1997-2017 The PHP Group -Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.7-1~ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies -``` - -{:.bs-callout .bs-callout-info} -The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"} - -If PHP is installed, continue with the next prerequisite, [MySQL]({{page.baseurl}}/install-gde/prereq/mysql.html). - -If PHP is *not* installed see the next section, PHP 7.1 on Ubuntu. - -### PHP 7.1 on Ubuntu {#instgde-prereq-php71-ubuntu} - -To install PHP 7.1 on Ubuntu 14 or 16: - -1. Enter the following commands in the order shown: - - ```bash - sudo apt-get -y update - ``` - - ```bash - sudo add-apt-repository ppa:ondrej/php - ``` - - ```bash - sudo apt-get -y update - ``` - - ```bash - sudo apt-get install -y php7.1 libapache2-mod-php7.1 php7.1-common php7.1-gd php7.1-mysql php7.1-curl php7.1-intl php7.1-xsl php7.1-mbstring php7.1-zip php7.1-bcmath php7.1-iconv php7.1-soap - ``` - - The last command installs all [required PHP extensions]({{page.baseurl}}/install-gde/system-requirements-tech.html#required-php-extensions). - -1. Verify that PHP 7.1 is installed properly: - - ```bash - php -v - ``` - - The following response indicates that PHP 7.1.7 is installed: - - ```terminal - PHP 7.1.7-1~ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jul 6 2017 09:07:54) ( NTS ) - Copyright (c) 1997-2017 The PHP Group - Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.7-1~ubuntu14.04.1+deb.sury.org+1,Copyright (c) 1999-2017, by Zend Technologies - ``` - - {:.bs-callout .bs-callout-info} - The preceding message confirms that the `Zend OPcache` is installed. We strongly recommend using the OPcache for performance reasons. If your PHP distribution does not come with the OPcache, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php){:target="_blank"}. - -1. Verify that all [required PHP extensions]({{ page.baseurl }}/install-gde/system-requirements-tech.html#required-php-extensions) were installed: - - ```bash - php -me - ``` - - You should see output similar to the following: - - ```terminal - [PHP Modules] - bcmath - calendar - Core - ctype - curl - date - dom - exif - fileinfo - filter - ftp - gd - gettext - hash - iconv - intl - json - libxml - mbstring - mysqli - mysqlnd - openssl - pcntl - pcre - PDO - pdo_mysql - Phar - readline - Reflection - session - SimpleXML - soap - sockets - SPL - standard - tokenizer - wddx - xml - xmlreader - xmlwriter - xsl - Zend OPcache - zip - zlib - - [Zend Modules] - Zend OPcache - ``` - -### Next - -[Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html) diff --git a/guides/v2.3/install-gde/prereq/php-parent.md b/guides/v2.3/install-gde/prereq/php-parent.md deleted file mode 120000 index 5c85a085bd8..00000000000 --- a/guides/v2.3/install-gde/prereq/php-parent.md +++ /dev/null @@ -1 +0,0 @@ -../../../../guides/v2.2/install-gde/prereq/php-parent.md \ No newline at end of file diff --git a/guides/v2.3/install-gde/prereq/php-settings.md b/guides/v2.3/install-gde/prereq/php-settings.md index bf9db7b9154..abe53a06d97 100644 --- a/guides/v2.3/install-gde/prereq/php-settings.md +++ b/guides/v2.3/install-gde/prereq/php-settings.md @@ -5,33 +5,101 @@ functional_areas: - Install - System - Setup +redirect_from: + - /guides/v2.3/install-gde/prereq/php-centos.html + - /guides/v2.3/install-gde/prereq/php-ubuntu.html + - /guides/v2.3/install-gde/prereq/php-centos-ubuntu.html --- This topic discusses how to set required [PHP](https://glossary.magento.com/php) options. -## Requirements and recommendations +{:.bs-callout .bs-callout-info} +All 3rd party libraries now support PHP 7.2. +If you are interested in participating in Magento Community projects we welcome your help! See our [ZenHub board](https://app.zenhub.com/workspace/o/magento-engcom/php-7.2-support/boards?repos=116423356,116426364,115111902) for a full list of outstanding issues. + +{% include install/php-versions-template.md %} + +Magento 2.3.3 supports PHP 7.3. + +## Verify PHP is installed {#centos-verify-php} + +Most flavors of Linux have PHP installed by default. +This topic assumes that you have already installed PHP. +To verify if PHP is installed already, in the command line, type: + +```bash +php -v +``` + +If [PHP](https://glossary.magento.com/php) is installed, a message similar to the following displays: + +```terminal +PHP 7.2.0 (cli) (built: Jan 9 2018 09:23:16) ( NTS ) +Copyright (c) 1997-2018 The PHP Group +Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.6, Copyright (c) 1999-2018, by Zend Technologies +``` + +If PHP is not installed, or a version upgrade is needed, install it following instructions for your particular Linux flavor. +On CentOS, [additional steps may be required][]. + +## Verify installed extensions + +Magento requires a set of extensions to be installed: + +- bcmath +- devel +- gd +- iconv +- intl +- json +- mbstring +- mysql +- mysqlnd +- opcache +- pdo +- soap +- xml -* Set the system time zone for PHP; otherwise, errors like the following display during the installation and time-related operations like cron might not work: +In the command line, type: - PHP Warning: date(): It is not safe to rely on the system's timezone settings. [more messages follow] +```bash +php -m +``` -* Set the PHP memory limit. +to see the list of installed modules. Verify that the listed extensions are installed. +If any modules are missing, they are added using the same workflow used for installing PHP. For example, if you use `yum` to install PHP, the PHP 7.2 modules can be added with: - Our detailed recommendations are: +```bash + yum -y install php72u-pdo php72u-mysqlnd php72u-opcache php72u-xml php72u-gd php72u-devel php72u-mysql php72u-intl php72u-mbstring php72u-bcmath php72u-json php72u-iconv php72u-soap +``` - * Compiling code or deploying static assets, `756M` - * Installing and updating Magento components from Magento Marketplace, `2G` - * Testing, `~3-4G` -* Disable [`asp_tags`](http://php.net/manual/en/ini.core.php#ini.asp-tags){:target="_blank"} +{:.bs-callout .bs-callout-info} +The `bcmath` extension is required for {{site.data.var.ee}} only. + +## Check PHP settings + +- Set the system time zone for PHP; otherwise, errors like the following display during the installation and time-related operations like cron might not work: + + PHP Warning: date(): It is not safe to rely on the system's timezone settings. [more messages follow] + +- Set the PHP memory limit. + + Our detailed recommendations are: - If `asp_tags are` enabled, errors display when accessing PHTML templates. + - Compiling code or deploying static assets, `756M` + - Installing and updating Magento components from Magento Marketplace, `2G` + - Testing, `~3-4G` - `asp_tags` were removed in PHP 7. -* Enable [`opcache.save_comments`](http://php.net/manual/en/opcache.configuration.php#ini.opcache.save_comments){:target="_blank"}, which is required for Magento 2.1 and later. +- Disable [`asp_tags`](http://php.net/manual/en/ini.core.php#ini.asp-tags){:target="_blank"} - We recommend you enable the [PHP OpCache](http://php.net/manual/en/intro.opcache.php){:target="_blank"} for performance reasons. The OPcache is enabled in many PHP distributions. + If `asp_tags are` enabled, errors display when accessing PHTML templates. + `asp_tags` were removed in PHP 7. - Magento 2.1 and later use PHP code comments for code generation. +- Enable [`opcache.save_comments`](http://php.net/manual/en/opcache.configuration.php#ini.opcache.save_comments){:target="_blank"}, which is required for Magento 2.1 and later. + + We recommend you enable the [PHP OpCache](http://php.net/manual/en/intro.opcache.php){:target="_blank"} for performance reasons. The OPcache is enabled in many PHP distributions. + + Magento 2.1 and later use PHP code comments for code generation. {:.bs-callout .bs-callout-info} To avoid issues during installation and upgrade, we strongly recommend you apply the same PHP settings to both the PHP command-line configuration and to the PHP web server plug-in's configuration. For more information, see the next section. @@ -48,30 +116,34 @@ To find the web server configuration, run a [`phpinfo.php` file]({{page.baseurl} To locate the PHP command-line configuration, enter - php --ini +```bash +php --ini +``` Use the value of Loaded Configuration file. {:.bs-callout .bs-callout-info} -If you have only one `php.ini` file, make the changes in that file. If you have two `php.ini` files, make the changes in all files. Failure to do so might cause unpredictable performance. +If you have only one `php.ini` file, make the changes in that file. If you have two `php.ini` files, make the changes in *all* files. Failure to do so might cause unpredictable performance. ### Find OPcache configuration settings -PHP OPcache settings are typically located either in `php.ini` or `opcache.ini`. The location might depend on your operating system and PHP version. The OPcache configuration file might have an `[opcache]` section or settings like `opcache.enable`. +PHP OPcache settings are typically located either in `php.ini` or `opcache.ini`. The location might depend on your operating system and PHP version. The OPcache configuration file might have an `opcache` section or settings like `opcache.enable`. Use the following guidelines to find it: -* Apache web server: +- Apache web server: - For Ubuntu with Apache, OPcache settings are typically located in `php.ini`. + For Ubuntu with Apache, OPcache settings are typically located in `php.ini`. - For CentOS with Apache or nginx, OPcache settings are typically located in `/etc/php.d/opcache.ini` + For CentOS with Apache or nginx, OPcache settings are typically located in `/etc/php.d/opcache.ini` - If not, use the following command to locate it: + If not, use the following command to locate it: - sudo find / -name 'opcache.ini' + ```bash + sudo find / -name 'opcache.ini' + ``` -* nginx web server with PHP-FPM: `/etc/php5/fpm/php.ini` +- nginx web server with PHP-FPM: `/etc/php5/fpm/php.ini` If you have more than one `opcache.ini`, modify all of them. @@ -79,39 +151,44 @@ If you have more than one `opcache.ini`, modify all of them. To set PHP options: -1. Open a `php.ini` in a text editor. -3. Locate your server's time zone in the available [time zone settings](http://php.net/manual/en/timezones.php){:target="_blank"} -4. Locate the following setting and uncomment it if necessary: +1. Open a `php.ini` in a text editor. +1. Locate your server's time zone in the available [time zone settings](http://php.net/manual/en/timezones.php){:target="_blank"} +1. Locate the following setting and uncomment it if necessary: + + date.timezone = - date.timezone = -5. Add the time zone setting you found in step 2. -6. Change the value of `memory_limit` to one of the values at the beginning of this section. +1. Add the time zone setting you found in step 2. +1. Change the value of `memory_limit` to one of the values at the beginning of this section. - For example, + For example, `memory_limit=2G` - memory_limit=2G +1. Locate the following setting: -8. Locate the following setting: + asp_tags = - asp_tags = -9. Make sure its value is set to `Off`. -10. Save your changes and exit the text editor. -11. Open the other `php.ini` (if they are different) and make the same changes in it. +1. Make sure its value is set to `Off`. +1. Save your changes and exit the text editor. +1. Open the other `php.ini` (if they are different) and make the same changes in it. ## Step 3: Set OPcache options {#php-required-opcache} To set opcache.ini options: -12. Open your OpCache configuration file in a text editor: +1. Open your OpCache configuration file in a text editor: + + - `opcache.ini` (CentOS) + - `php.ini` (Ubuntu) + - `/etc/php5/fpm/php.ini` (nginx web server (CentOS or Ubuntu)) + +1. Locate `opcache.save_comments` and uncomment it if necessary. +1. Make sure its value is set to `1`. +1. Save your changes and exit the text editor. +1. Restart your web server: + + - Apache, Ubuntu: `service apache2 restart` + - Apache, CentOS: `service httpd restart` + - nginx, Ubuntu and CentOS: `service nginx restart` - * `opcache.ini` (CentOS) - * `php.ini` (Ubuntu) - * `/etc/php5/fpm/php.ini` (nginx web server (CentOS or Ubuntu)) -13. Locate `opcache.save_comments` and uncomment it if necessary. -14. Make sure its value is set to `1`. -15. Save your changes and exit the text editor. -11. Restart your web server: + - * Apache, Ubuntu: `service apache2 restart` - * Apache, CentOS: `service httpd restart` - * nginx, Ubuntu and CentOS: `service nginx restart` +[additional steps may be required]: https://wiki.centos.org/HowTos/php7 diff --git a/guides/v2.3/install-gde/prereq/prereq-overview.md b/guides/v2.3/install-gde/prereq/prereq-overview.md index acb1c76548c..32472752f1d 100644 --- a/guides/v2.3/install-gde/prereq/prereq-overview.md +++ b/guides/v2.3/install-gde/prereq/prereq-overview.md @@ -31,6 +31,7 @@ Enter the following commands as a user with `root` privileges: ```bash apt-get update ``` + ```bash apt-get upgrade ``` @@ -40,6 +41,7 @@ apt-get upgrade ```bash yum -y update ``` + ```bash yum -y upgrade ``` @@ -66,7 +68,7 @@ To install or upgrade Apache, see [Apache]({{page.baseurl}}/install-gde/prereq/a ### PHP {:.bs-callout .bs-callout-info} -Magento 2.3.1 supports PHP 7.2.11. +Magento 2.3.3 supports PHP 7.2. All 3rd party libraries now support PHP 7.2. If you are interested in participating in Magento Community projects we welcome your help! See our [ZenHub board](https://app.zenhub.com/workspace/o/magento-engcom/php-7.2-support/boards?repos=116423356,116426364,115111902) for a full list of outstanding issues. @@ -74,15 +76,17 @@ If you are interested in participating in Magento Community projects we welcome php -v ``` -You must run [PHP](https://glossary.magento.com/php) version 7.1.x or 7.2.x as the following result indicates: +{% include install/php-versions-template.md %} + +You must run [PHP](https://glossary.magento.com/php) version 7.2 or 7.3: ```terminal -PHP 7.1.6 (cli) (built: Jan 9 2017 09:23:16) ( NTS ) - Copyright (c) 1997-2017 The PHP Group - Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.6, Copyright (c) 1999-2017, by Zend Technologies +PHP 7.2.0 (cli) (built: Jan 9 2018 09:23:16) ( NTS ) +Copyright (c) 1997-2017 The PHP Group +Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.6, Copyright (c) 1999-2018, by Zend Technologies ``` -See [PHP](/guides/v2.3/install-gde/prereq/php-centos-ubuntu.html) for info on installing PHP for CentOS or Ubuntu. +See [PHP](/guides/v2.3/install-gde/prereq/php-settings.html) for info on installing PHP. ### MySQL @@ -124,7 +128,6 @@ To install or upgrade MySQL, see [MySQL]({{page.baseurl}}/install-gde/prereq/mys * [MySQL]({{page.baseurl}}/install-gde/prereq/mysql.html) * [Apache]({{page.baseurl}}/install-gde/prereq/apache.html) -* [PHP—Ubuntu]({{page.baseurl}}/install-gde/prereq/php-centos-ubuntu.html#php-for-ubuntu) -* [PHP—CentOS]({{page.baseurl}}/install-gde/prereq/php-centos-ubuntu.html#php-for-centos) +* [PHP]({{page.baseurl}}/install-gde/prereq/php-settings.html) * [Installing optional software]({{page.baseurl}}/install-gde/prereq/optional.html) -* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) \ No newline at end of file +* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.3/install-gde/prereq/security.md b/guides/v2.3/install-gde/prereq/security.md index 89cac90774f..3781008601b 100644 --- a/guides/v2.3/install-gde/prereq/security.md +++ b/guides/v2.3/install-gde/prereq/security.md @@ -11,7 +11,8 @@ functional_areas: --- ## SELinux {#install-prereq-selinux} -[Security Enhanced Linux (SELinux)](http://selinuxproject.org/page/Main_Page) enables CentOS and Ubuntu administrators greater access control over their servers. If you're using SELinux \*and\* Apache must initiate a connection to another host, you must run the commands discussed in this section. + +[Security Enhanced Linux (SELinux)](http://selinuxproject.org/page/Main_Page) enables CentOS and Ubuntu administrators greater access control over their servers. If you are using SELinux *and* Apache must initiate a connection to another host, you must run the commands discussed in this section. {:.bs-callout .bs-callout-info} Magento has no recommendation about using SELinux; you can use it for enhanced security if you wish. If you use SELinux, you must configure it properly or the Magento application will function unpredictably. If you choose to use SELinux, consult a resource like [the CentOS wiki](http://wiki.centos.org/HowTos/SELinux) to set up rules to enable communication. @@ -20,15 +21,15 @@ Magento has no recommendation about using SELinux; you can use it for enhanced s If you choose to enable SELinux, you might have issues running the installer unless you change the *security context* of some directories as follows: - chcon -R --type httpd_sys_rw_content_t /app/etc - chcon -R --type httpd_sys_rw_content_t /var - chcon -R --type httpd_sys_rw_content_t /pub/media - chcon -R --type httpd_sys_rw_content_t /pub/static + chcon -R --type httpd_sys_rw_content_t /app/etc + chcon -R --type httpd_sys_rw_content_t /var + chcon -R --type httpd_sys_rw_content_t /pub/media + chcon -R --type httpd_sys_rw_content_t /pub/static -The preceding commands work only with the Apache web server. Because of the variety of configurations and security requirements, we don't guarantee these commands work in all situations. For more information, see: +The preceding commands work only with the Apache web server. Because of the variety of configurations and security requirements, we do not guarantee these commands work in all situations. For more information, see: -* [man page](http://linux.die.net/man/8/httpd_selinux) -* [serverlab](http://www.serverlab.ca/tutorials/linux/web-servers-linux/configuring-selinux-policies-for-apache-web-servers/) +* [man page](http://linux.die.net/man/8/httpd_selinux) +* [serverlab](http://www.serverlab.ca/tutorials/linux/web-servers-linux/configuring-selinux-policies-for-apache-web-servers/) ### Enable inter-server communication @@ -36,29 +37,28 @@ If Apache and the database server are on the same host, you can skip this sectio To enable Apache to initiate a connection to another host with SELinux enabled: -1. To determine if SELinux is enabled, use the following command: - - getenforce +1. To determine if SELinux is enabled, use the following command: - `Enforcing` displays to confirm that SELinux is running. + getenforce -2. Enter one of the following commands: + `Enforcing` displays to confirm that SELinux is running. - CentOS: `setsebool -P httpd_can_network_connect=1` +1. Enter one of the following commands: - Ubuntu: `setsebool -P apache2_can_network_connect=1` + CentOS: `setsebool -P httpd_can_network_connect=1` + Ubuntu: `setsebool -P apache2_can_network_connect=1` ## Opening Ports In Your Firewall {#install-iptables} Depending on your security requirements, you might find it necessary to open port 80 and other ports in your firewall. Because of the sensitive nature of networking security, Magento strongly recommends you consult with your IT department before proceeding. Following are some suggested references: -* Ubuntu: [Ubuntu documentation page](https://help.ubuntu.com/community/IptablesHowTo) -* CentOS: [CentOS how-to](http://wiki.centos.org/HowTos/Network/IPTables) and [CentOS reference page](http://www.centos.org/docs/4/4.5/Security_Guide/s1-firewall-ipt-basic.html). +* Ubuntu: [Ubuntu documentation page](https://help.ubuntu.com/community/IptablesHowTo) +* CentOS: [CentOS how-to](http://wiki.centos.org/HowTos/Network/IPTables) and [CentOS reference page](http://www.centos.org/docs/4/4.5/Security_Guide/s1-firewall-ipt-basic.html). -#### Related topics: +## Related topics -* [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) -* [PHP 7.1 or 7.2]({{page.baseurl}}/install-gde/prereq/php-centos-ubuntu.html) -* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) -* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) -* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) +* [PHP]({{page.baseurl}}/install-gde/prereq/php-settings.html) +* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) +* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) +* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.3/install-gde/system-requirements-tech.md b/guides/v2.3/install-gde/system-requirements-tech.md index 10bcde8b786..22f93a8e292 100644 --- a/guides/v2.3/install-gde/system-requirements-tech.md +++ b/guides/v2.3/install-gde/system-requirements-tech.md @@ -21,15 +21,15 @@ Upgrading the Magento applications and extensions you obtain from Magento Market ## Composer (latest stable version) -[Composer](https://glossary.magento.com/composer) is required for developers who wish to contribute to the Magento 2 codebase or anyone who wishes to develop Magento extensions. +[Composer][] is required for developers who wish to contribute to the Magento 2 codebase or anyone who wishes to develop Magento extensions. ## Web servers -* [Apache 2.2 or 2.4](http://httpd.apache.org/download.cgi) +* [Apache 2.4][] - In addition, you must enable the Apache `mod_rewrite` and `mod_version` modules. The [`mod_rewrite`](https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html) module enables the server to perform URL rewriting. The [`mod_version`](https://httpd.apache.org/docs/2.4/mod/mod_version.html) module provides flexible version checking for different `httpd` versions. For more information, see [our Apache documentation]({{page.baseurl}}/install-gde/prereq/apache.html). + In addition, you must enable the Apache `mod_rewrite` and `mod_version` modules. The [`mod_rewrite`][] module enables the server to perform URL rewriting. The [`mod_version`][] module provides flexible version checking for different `httpd` versions. For more information, see [our Apache documentation][]. -* [nginx 1.x](https://nginx.org/en/download.html) +* [nginx 1.x][] ## Database @@ -44,42 +44,43 @@ Magento only uses MySQL features compatible with MariaDB. MariaDB may not be com {:.bs-callout .bs-callout-info} All 3rd party libraries now support PHP 7.2. - If you are interested in participating in Magento Community projects we welcome your help! See our [ZenHub board](https://app.zenhub.com/workspace/o/magento-engcom/php-7.2-support/boards?repos=116423356,116426364,115111902) for a full list of outstanding issues. + If you are interested in participating in Magento Community projects we welcome your help! See our [ZenHub board][] for a full list of outstanding issues. {% include install/php-versions-template.md %} Magento 2.3.1 is certified and tested on PHP 7.2.11. +Magento 2.3.3 adds support for PHP 7.3. ### Required PHP extensions {:.bs-callout .bs-callout-info} -The [PHP installation instructions](prereq/php-centos-ubuntu.html) include a step for installing these extensions. +The [PHP installation instructions][] include a step for installing these extensions. {% include install/php-extensions-template.md %} -Refer to [official PHP documentation](http://php.net/manual/en/extensions.php) for installation details. +Refer to [official PHP documentation][] for installation details. ### PHP OPcache -We strongly recommend you verify that [PHP OPcache](http://php.net/manual/en/intro.opcache.php) is enabled for performance reasons. The OPcache is enabled in many PHP distributions. To verify if it is installed, see our [PHP documentation](prereq/php-centos-ubuntu.html). +We strongly recommend you verify that [PHP OPcache][] is enabled for performance reasons. The OPcache is enabled in many PHP distributions. To verify if it is installed, see our [PHP documentation][]. -If you must install it separately, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php). +If you must install it separately, see the [PHP OPcache documentation][]. ### PHP settings We recommend particular PHP configuration settings, such as `memory_limit`, that can avoid common problems when using Magento. -For more information, see [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). +For more information, see [Required PHP settings][]. ## SSL -* A valid [security certificate](https://glossary.magento.com/security-certificate) is required for HTTPS. +* A valid [security certificate][] is required for HTTPS. * Self-signed SSL certificates are not supported. * Transport Layer Security (TLS) requirement - PayPal and `repo.magento.com` both require TLS 1.1 or later: - * [More information about PayPal]({{page.baseurl}}/install-gde/system-requirements_tls1-2.html) + * [More information about PayPal][] ### Required system dependencies @@ -101,42 +102,47 @@ Mail Transfer Agent (MTA) or an SMTP server ## Technologies Magento can use -* [Redis]({{page.baseurl}}/config-guide/redis/config-redis.html) versions 3.2, 4.0, 5.0 (compatible with 2.4+) for page caching and session storage. +* [Redis][] versions 3.2, 4.0, 5.0 (compatible with 2.4+) for page caching and session storage. Version 5.0 is highly recommended. -* [Varnish]({{page.baseurl}}/config-guide/varnish/config-varnish.html) version 4.x or 5.2 -* [Elasticsearch]({{page.baseurl}}/config-guide/elasticsearch/es-overview.html) +* [Varnish][] version 4.x or 5.2 +* [Elasticsearch][] {{site.data.var.ee}} version 2.3.x supports the following Elasticsearch versions: - * Elasticsearch [6.x](https://www.elastic.co/downloads/past-releases/elasticsearch-6-6-1){:target="_blank"} + * Elasticsearch [6.x][]{:target="_blank"} - Magento 2.3 uses [Elasticsearch PHP client](https://github.com/elastic/elasticsearch-php){:target="_blank"} version 6.1. + Magento 2.3 uses [Elasticsearch PHP client][]{:target="_blank"} version 6.1. {: .bs-callout .bs-callout-warning} - Magento still provides support for but does not recommend Elasticsearch [2.x and 5.x](https://www.elastic.co/support/eol). + Magento still provides support for but does not recommend Elasticsearch [2.x and 5.x][]. If you must run Elasticsearch 2.x or 5.x with Magento 2.3.1, you must change the Elasticsearch client version. Follow the instructions in [Change Elasticsearch Module][]. * RabbitMQ 3.7.x (compatible with 2.0 and later) - [RabbitMQ]({{page.baseurl}}/config-guide/mq/rabbitmq-overview.html){:target="_blank"} can be used to publish messages to queue and to define the consumers that receive the messages asynchronously. + [RabbitMQ][]{:target="_blank"} can be used to publish messages to queue and to define the consumers that receive the messages asynchronously. ### {{site.data.var.ee}} only * Three master databases - These [master databases]({{page.baseurl}}/config-guide/multi-master/multi-master.html) provide scalability advantages for different functional areas of the Magento application such as checkout, orders, and all remaining Magento2 application tables. + These [master databases][] provide scalability advantages for different functional areas of the Magento application such as checkout, orders, and all remaining Magento2 application tables. ### Optional but recommended -* [php_xdebug 2.5.x](http://xdebug.org/download.php){:target="_blank"} or later (development environments only; can have an adverse effect on performance) +* [php_xdebug 2.5.x][]{:target="_blank"} or later (development environments only; can have an adverse effect on performance) {:.bs-callout .bs-callout-info} -There is a known issue with `xdebug` that can affect Magento installations or access to the storefront or Magento Admin after installation. For details, see [Known issue with xdebug]({{page.baseurl}}/install-gde/trouble/tshoot_install-issues.html). +There is a known issue with `xdebug` that can affect Magento installations or access to the storefront or Magento Admin after installation. For details, see [Known issue with xdebug][]. -* [`mcrypt`](http://php.net/manual/en/book.mcrypt.php){:target="_blank"} +* [`mcrypt`][]{:target="_blank"} * PHPUnit (as a command-line tool) 6.2.0 + +[`mcrypt`]: http://php.net/manual/en/book.mcrypt.php +[Known issue with xdebug]: {{page.baseurl}}/install-gde/trouble/tshoot_install-issues.html +[php_xdebug 2.5.x]: http://xdebug.org/download.php +[master databases]: {{page.baseurl}}/config-guide/multi-master/multi-master.html [bash]: https://www.gnu.org/software/bash/ [gzip]: https://www.gzip.org/ [lsof]: https://linux.die.net/man/8/lsof @@ -147,3 +153,25 @@ There is a known issue with `xdebug` that can affect Magento installations or ac [sed]: https://www.gnu.org/software/sed/manual/sed.html [tar]: https://linux.die.net/man/1/tar [Change Elasticsearch Module]: https://devdocs.magento.com/guides/v2.3/config-guide/elasticsearch/es-downgrade.html +[Composer]: https://glossary.magento.com/composer +[Apache 2.4]: http://httpd.apache.org/download.cgi +[`mod_rewrite`]: https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html +[`mod_version`]: https://httpd.apache.org/docs/2.4/mod/mod_version.html +[our Apache documentation]: {{page.baseurl}}/install-gde/prereq/apache.html +[nginx 1.x]: https://nginx.org/en/download.html +[ZenHub board]: https://app.zenhub.com/workspace/o/magento-engcom/php-7.2-support/boards?repos=116423356,116426364,115111902 +[PHP installation instructions]: prereq/php-settings.html +[official PHP documentation]: http://php.net/manual/en/extensions.php +[PHP OPcache]: http://php.net/manual/en/intro.opcache.php +[PHP documentation]: prereq/php-settings.html +[PHP OPcache documentation]: http://php.net/manual/en/opcache.setup.php +[Required PHP settings]: {{ page.baseurl }}/install-gde/prereq/php-settings.html +[security certificate]: https://glossary.magento.com/security-certificate +[More information about PayPal]: {{page.baseurl}}/install-gde/system-requirements_tls1-2.html +[Redis]: {{page.baseurl}}/config-guide/redis/config-redis.html +[Varnish]: {{page.baseurl}}/config-guide/varnish/config-varnish.html +[Elasticsearch]: {{page.baseurl}}/config-guide/elasticsearch/es-overview.html +[6.x]: https://www.elastic.co/downloads/past-releases/elasticsearch-6-6-1 +[Elasticsearch PHP client]: https://github.com/elastic/elasticsearch-php +[2.x and 5.x]: https://www.elastic.co/support/eol +[RabbitMQ]: {{page.baseurl}}/config-guide/mq/rabbitmq-overview.html diff --git a/guides/v2.3/install-gde/trouble/php/tshoot_pdo.md b/guides/v2.3/install-gde/trouble/php/tshoot_pdo.md index ddcc0e3e7b6..706b7307dd6 100644 --- a/guides/v2.3/install-gde/trouble/php/tshoot_pdo.md +++ b/guides/v2.3/install-gde/trouble/php/tshoot_pdo.md @@ -13,9 +13,10 @@ functional_areas: ### Details - PHP Fatal error: Class 'PDO' not found in /var/www/html/magento2/setup/module/Magento/Setup/src/Module/Setup/ConnectionFactory.php on line 44 +```terminal +PHP Fatal error: Class 'PDO' not found in /var/www/html/magento2/setup/module/Magento/Setup/src/Module/Setup/ConnectionFactory.php on line 44 +``` ### Solution -Make sure you installed all [required PHP extensions](../../prereq/php-centos-ubuntu.html). - +Make sure you installed all [required PHP extensions](../../prereq/php-settings.html). diff --git a/guides/v2.3/mtf/mtf_installation.md b/guides/v2.3/mtf/mtf_installation.md index eadafb00942..3e13206461e 100644 --- a/guides/v2.3/mtf/mtf_installation.md +++ b/guides/v2.3/mtf/mtf_installation.md @@ -23,7 +23,7 @@ To install the Magento application, see Ubuntu, CentOS). +For more details about PHP verification, installation and configuration (PHP). {: .bs-callout .bs-callout-warning } In `php.ini` file, make sure `extension=php_openssl.dll` is not commented out. Note: The Windows environment is not officially supported. @@ -40,8 +40,8 @@ The Functional Testing Framework requires Composer, which downloads libraries de {: .bs-callout-info } If you're not sure that Composer is installed, see [Install Composer]({{page.baseurl }}/install-gde/prereq/dev_install.html#instgde-prereq-compose-install). -1. Open a command prompt. -1. Log in to your Magento server as a user with permissions to modify the Magento file system. (This is typically the Magento file system owner.) +1. Open a command prompt. +1. Log in to your Magento server as a user with permissions to modify the Magento file system. (This is typically the Magento file system owner.) cd /dev/tests/functional/ composer install @@ -50,9 +50,9 @@ If you're not sure that Composer is installed, see [Install Composer]({{page.bas If command failed, maybe [Composer](https://getcomposer.org) hasn't been installed globally. -* Copy `composer.phar` to `/usr/local/bin/composer`. -* To run it locally put `composer.phar` into directory, where `composer.json` file is located (that is, `/dev/tests/functional/`). -* And run from this directory `php composer.phar install`. +- Copy `composer.phar` to `/usr/local/bin/composer`. +- To run it locally put `composer.phar` into directory, where `composer.json` file is located (that is, `/dev/tests/functional/`). +- And run from this directory `php composer.phar install`. ## Check the installation {#mtf_install_check} @@ -73,4 +73,5 @@ Find the `mtf` directory. Open `/dev/tests/functional/vendor/magento/mtf/CHANGELOG.md`. The latest version in `CHANGELOG.md` is version of the FTF you installed. ## Next Steps {#mtf_install_next} + [Adjust the FTF configuration ]({{ page.baseurl }}/mtf/mtf_quickstart/mtf_quickstart_config.html) From 184e8af2c8e6bf9dcca8c512c6dcca7db9ad1795 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Thu, 25 Jul 2019 09:10:14 -0500 Subject: [PATCH 02/14] Fixed links and markdown errors. --- _includes/install/trouble/rc_php-version.md | 20 +- .../before-workspace-magento-prereqs.md | 3 +- .../project/project-conf-files_magento-app.md | 396 +++++++++--------- .../comp-mgr/trouble/cman/out-of-memory.md | 18 +- .../deployment/pipeline/build-system.md | 83 ++-- guides/v2.2/install-gde/install-quick-ref.md | 5 +- guides/v2.2/install-gde/prereq/apache.md | 139 +++--- .../install-gde/prereq/install-rabbitmq.md | 19 +- guides/v2.2/install-gde/prereq/mysql.md | 3 +- .../v2.2/install-gde/prereq/mysql_remote.md | 3 +- guides/v2.2/install-gde/prereq/nginx.md | 257 ++++++------ guides/v2.2/install-gde/prereq/optional.md | 81 ++-- .../v2.2/install-gde/prereq/php-settings.md | 6 +- .../install-gde/prereq/prereq-overview.md | 84 ++-- guides/v2.2/install-gde/prereq/security.md | 3 +- .../install-gde/system-requirements-tech.md | 6 +- .../install-gde/trouble/php/tshoot_pdo.md | 7 +- .../trouble/php/tshoot_php-date.md | 7 +- .../install-gde/trouble/php/tshoot_php-set.md | 36 +- guides/v2.2/mtf/mtf_installation.md | 5 +- guides/v2.3/install-gde/prereq/apache.md | 18 +- guides/v2.3/install-gde/prereq/nginx.md | 2 +- .../v2.3/install-gde/prereq/php-settings.md | 6 +- .../install-gde/prereq/prereq-overview.md | 8 +- guides/v2.3/mtf/mtf_installation.md | 2 +- 25 files changed, 609 insertions(+), 608 deletions(-) diff --git a/_includes/install/trouble/rc_php-version.md b/_includes/install/trouble/rc_php-version.md index 5df0d0c1b9d..7dcc84a9d2e 100644 --- a/_includes/install/trouble/rc_php-version.md +++ b/_includes/install/trouble/rc_php-version.md @@ -25,13 +25,13 @@ 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.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 are running a supported PHP version according to our System Requirements: + + * [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-settings.html) diff --git a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md index 303b4e32ff4..bf2bcac5d23 100644 --- a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md +++ b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md @@ -50,7 +50,8 @@ Although {{ site.data.var.ee }} supports the Apache web server, {{ site.data.var ## PHP (local) {#php} -Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.0. For information on installing PHP, see these instructions for [CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) and [Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). +Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.2. +For information on installing PHP, see these instructions for [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). The following packages may also be helpful for your PHP installation: diff --git a/guides/v2.2/cloud/project/project-conf-files_magento-app.md b/guides/v2.2/cloud/project/project-conf-files_magento-app.md index 0d6bf8f958d..7cc53c0bb92 100644 --- a/guides/v2.2/cloud/project/project-conf-files_magento-app.md +++ b/guides/v2.2/cloud/project/project-conf-files_magento-app.md @@ -39,33 +39,33 @@ The `build` property determines what happens by default when building the projec ```yaml build: - flavor: composer + flavor: composer ``` ### `access` The _access_ property indicates a minimum user role level that is allowed SSH access to the environments. The available user roles are: -- `admin`—Can change settings and execute actions in the environment. Also has _contributor_ and _viewer_ rights. -- `contributor`—Can push code to this environment and branch from the environment. Also has _viewer_ rights. -- `viewer`—Can view the environment only. +- `admin`—Can change settings and execute actions in the environment. Also has _contributor_ and _viewer_ rights. +- `contributor`—Can push code to this environment and branch from the environment. Also has _viewer_ rights. +- `viewer`—Can view the environment only. The default user role is `contributor`, which restricts the SSH access from users with only _viewer_ rights. You can change the user role to `viewer` to allow SSH access for users with only _viewer_ rights: ```yaml access: - ssh: viewer + ssh: viewer ``` ### `relationships` Defines the service mapping in your application. -The left-hand side is the name of the relationship as it will be exposed to the application in the `MAGENTO_CLOUD_RELATIONSHIPS` environment variable. The right-hand side is in the form `:`, where `` comes from `.magento/services.yaml` and `` should be the same as the value of `type` declared in that same file. +The left-hand side is the name of the relationship as it will be exposed to the application in the `MAGENTO_CLOUD_RELATIONSHIPS` environment variable. The right-hand side is in the form `:`, where `` comes from `.magento/services.yaml` and `` should be the same as the value of `type` declared in that same file. Example of valid options are: -``` +```yaml database: "mysql:mysql" database2: "mysql2:mysql" cache: "arediscache:redis" @@ -93,45 +93,45 @@ Contrary to standard `.htaccess` approaches that accept a _blacklist_ and allow Our default configuration allows the following: -- From the root (`/`) path, only web and media can be accessed -- From the `~/pub/static` and `~/pub/media` paths, any file can be accessed +- From the root (`/`) path, only web and media can be accessed +- From the `~/pub/static` and `~/pub/media` paths, any file can be accessed The following example shows the default configuration for a set of web-accessible locations associated with an entry in the [`mounts` property](#mounts): ```yaml # The configuration of app when it is exposed to the web. web: - locations: - "/": - # The public directory of the app, relative to its root. - root: "pub" - # The front-controller script to send non-static requests to. - passthru: "/index.php" - index: - - index.php - expires: -1 - scripts: true - allow: false - rules: - \.(css|js|map|hbs|gif|jpe?g|png|tiff|wbmp|ico|jng|bmp|svgz|midi?|mp?ga|mp2|mp3|m4a|ra|weba|3gpp?|mp4|mpe?g|mpe|ogv|mov|webm|flv|mng|asx|asf|wmv|avi|ogx|swf|jar|ttf|eot|woff|otf|html?)$: - allow: true - ^/sitemap(.*)\.xml$: - passthru: "/media/sitemap$1.xml" - "/media": - root: "pub/media" - allow: true - scripts: false - expires: 1y - passthru: "/get.php" - "/static": - root: "pub/static" - allow: true - scripts: false - expires: 1y - passthru: "/front-static.php" - rules: - ^/static/version\d+/(?.*)$: - passthru: "/static/$resource" + locations: + "/": + # The public directory of the app, relative to its root. + root: "pub" + # The front-controller script to send non-static requests to. + passthru: "/index.php" + index: + - index.php + expires: -1 + scripts: true + allow: false + rules: + \.(css|js|map|hbs|gif|jpe?g|png|tiff|wbmp|ico|jng|bmp|svgz|midi?|mp?ga|mp2|mp3|m4a|ra|weba|3gpp?|mp4|mpe?g|mpe|ogv|mov|webm|flv|mng|asx|asf|wmv|avi|ogx|swf|jar|ttf|eot|woff|otf|html?)$: + allow: true + ^/sitemap(.*)\.xml$: + passthru: "/media/sitemap$1.xml" + "/media": + root: "pub/media" + allow: true + scripts: false + expires: 1y + passthru: "/get.php" + "/static": + root: "pub/static" + allow: true + scripts: false + expires: 1y + passthru: "/front-static.php" + rules: + ^/static/version\d+/(?.*)$: + passthru: "/static/$resource" ``` @@ -153,20 +153,20 @@ An object whose keys are paths relative to the root of the application. The moun ```yaml # The mounts that will be performed when the package is deployed. mounts: - "var": "shared:files/var" - "app/etc": "shared:files/etc" - "pub/media": "shared:files/media" - "pub/static": "shared:files/static" + "var": "shared:files/var" + "app/etc": "shared:files/etc" + "pub/media": "shared:files/media" + "pub/static": "shared:files/static" ``` The format for adding your mount to this list is as follows: -``` +```yaml "/public/sites/default/files": "shared:files/files" ``` -- `shared`—Shares a volume between your applications inside an environment. -- `disk`—Defines the size available for the shared volume. +- `shared`—Shares a volume between your applications inside an environment. +- `disk`—Defines the size available for the shared volume. {:.bs-callout .bs-callout-warning} The subpath portion of the mount is the unique identifier of the files area. If changed, files at the old location will be permanently lost. Do not change this value once your site has data unless you really want to lose all existing data. @@ -180,15 +180,15 @@ Enables you to specify dependencies that your application might need during the {{site.data.var.ee}} supports dependencies on the following languages: -- PHP -- Ruby -- NodeJS +- PHP +- Ruby +- NodeJS Those dependencies are independent of the eventual dependencies of your application, and are available in the `PATH`, during the build process and in the runtime environment of your application. You can specify those dependencies as follows: -``` +```yaml ruby: sass: "~3.4" nodejs: @@ -199,42 +199,42 @@ nodejs: Use the `hooks` section to run shell commands during the build, deploy, and post-deploy phases: -- **`build`**—Execute commands _before_ packaging your application. Services, such as the database or Redis, are not available at this time since the application has not been deployed yet. You must add custom commands _before_ the default `php ./vendor/bin/ece-tools` command so that custom-generated content continues to the deployment phase. +- **`build`**—Execute commands _before_ packaging your application. Services, such as the database or Redis, are not available at this time since the application has not been deployed yet. You must add custom commands _before_ the default `php ./vendor/bin/ece-tools` command so that custom-generated content continues to the deployment phase. -- **`deploy`**—Execute commands _after_ packaging and deploying your application. You can access other services at this point. Since the default `php ./vendor/bin/ece-tools` command copies the `app/etc` directory to the correct location, you must add custom commands _after_ the deploy command to prevent custom commands from failing. +- **`deploy`**—Execute commands _after_ packaging and deploying your application. You can access other services at this point. Since the default `php ./vendor/bin/ece-tools` command copies the `app/etc` directory to the correct location, you must add custom commands _after_ the deploy command to prevent custom commands from failing. -- **`post_deploy`**—Execute commands _after_ deploying your application and _after_ the container begins accepting connections. The `post_deploy` hook clears the cache and preloads (warms) the cache. You can customize the list of pages using the `WARM_UP_PAGES` variable in the [Post-deploy stage]({{ page.baseurl }}/cloud/env/variables-post-deploy.html). It is available only for Pro projects that contain [Staging and Production environments in the Project Web UI]({{ page.baseurl }}/cloud/trouble/pro-env-management.html) and for Starter projects. Although not required, this works in tandem with the `SCD_ON_DEMAND` environment variable. +- **`post_deploy`**—Execute commands _after_ deploying your application and _after_ the container begins accepting connections. The `post_deploy` hook clears the cache and preloads (warms) the cache. You can customize the list of pages using the `WARM_UP_PAGES` variable in the [Post-deploy stage]({{ page.baseurl }}/cloud/env/variables-post-deploy.html). It is available only for Pro projects that contain [Staging and Production environments in the Project Web UI]({{ page.baseurl }}/cloud/trouble/pro-env-management.html) and for Starter projects. Although not required, this works in tandem with the `SCD_ON_DEMAND` environment variable. Add CLI commands under the `build`, `deploy`, or `post_deploy` sections _before_ the `ece-tools` command: ```yaml hooks: - # We run build hooks before your application has been packaged. - build: | - php ./vendor/bin/ece-tools build - # We run deploy hook after your application has been deployed and started. - deploy: | - php ./vendor/bin/ece-tools deploy - # We run post deploy hook to clean and warm the cache. Available with ECE-Tools 2002.0.10. - post_deploy: | - php ./vendor/bin/ece-tools post-deploy + # We run build hooks before your application has been packaged. + build: | + php ./vendor/bin/ece-tools build + # We run deploy hook after your application has been deployed and started. + deploy: | + php ./vendor/bin/ece-tools deploy + # We run post deploy hook to clean and warm the cache. Available with ECE-Tools 2002.0.10. + post_deploy: | + php ./vendor/bin/ece-tools post-deploy ``` Also, you can customize the build phase further by using the `generate` and `transfer` commands to perform additional actions when specifically building code or moving files. ```yaml hooks: - # We run build hooks before your application has been packaged. - build: | - set -e - php ./vendor/bin/ece-tools build:generate - # php /path/to/your/script - php ./vendor/bin/ece-tools build:transfer + # We run build hooks before your application has been packaged. + build: | + set -e + php ./vendor/bin/ece-tools build:generate + # php /path/to/your/script + php ./vendor/bin/ece-tools build:transfer ``` -- `set -e`—causes hooks to fail on the first failed command, instead of the final failed command. -- `build:generate`—applies patches, validates configuration, generates DI, and generates static content if SCD is enabled for build phase. -- `build:transfer`—transfers generated code and static content to the final destination. +- `set -e`—causes hooks to fail on the first failed command, instead of the final failed command. +- `build:generate`—applies patches, validates configuration, generates DI, and generates static content if SCD is enabled for build phase. +- `build:transfer`—transfers generated code and static content to the final destination. The commands run from the application (`/app`) directory. You can use the `cd` command to change the directory. The hooks fail if the final command in them fails. To cause them to fail on the first failed command, add `set -e` to the beginning of the hook. @@ -242,18 +242,18 @@ The commands run from the application (`/app`) directory. You can use the `cd` c ```yaml dependencies: - ruby: - sass: "3.4.7" - nodejs: - grunt-cli: "~0.1.13" + ruby: + sass: "3.4.7" + nodejs: + grunt-cli: "~0.1.13" hooks: - build: | - cd public/profiles/project_name/themes/custom/theme_name - npm install - grunt - cd - php ./vendor/bin/ece-tools + build: | + cd public/profiles/project_name/themes/custom/theme_name + npm install + grunt + cd + php ./vendor/bin/ece-tools ``` You must compile Sass files using `grunt` before static content deployment, which happens during the build. Place the `grunt` command before the `build` command. @@ -264,23 +264,23 @@ Describes processes that are triggered on a schedule. We recommend you run `cron `crons` support the following: -- `spec`—The cron specification. For Starter environments and Pro Integration environments, the minimum interval is once per five minutes and once per one minute in Pro Staging and Production environments. You need to complete [additional configurations]({{ page.baseurl }}/cloud/configure/setup-cron-jobs.html#add-cron) for crons in those environments. -- `cmd`—The command to execute. +- `spec`—The cron specification. For Starter environments and Pro Integration environments, the minimum interval is once per five minutes and once per one minute in Pro Staging and Production environments. You need to complete [additional configurations]({{ page.baseurl }}/cloud/configure/setup-cron-jobs.html#add-cron) for crons in those environments. +- `cmd`—The command to execute. A cron job is well suited for the following tasks: -- They need to happen on a fixed schedule, not continually. -- The task itself is not especially long, as a running cron job will block a new deployment. -- Or it is long, but can be easily divided into many small queued tasks. -- A delay between when a task is registered and when it actually happens is acceptable. +- They need to happen on a fixed schedule, not continually. +- The task itself is not especially long, as a running cron job will block a new deployment. +- Or it is long, but can be easily divided into many small queued tasks. +- A delay between when a task is registered and when it actually happens is acceptable. By default, every Cloud project has the following default crons configuration to run the default Magento cron jobs: ```yaml crons: - cronrun: - spec: "* * * * *" - cmd: "php bin/magento cron:run" + cronrun: + spec: "* * * * *" + cmd: "php bin/magento cron:run" ``` For {{site.data.var.ece}} 2.1.X, you can use only [workers](#workers) and [cron jobs](#crons). For {{site.data.var.ece}} 2.2.X, cron jobs launch consumers to process batches of messages, and do not require additional configuration. @@ -293,17 +293,17 @@ The following environment variables are included in `.magento.app.yaml`. These a ```yaml variables: - env: - CONFIG__DEFAULT__PAYPAL_ONBOARDING__MIDDLEMAN_DOMAIN: 'payment-broker.magento.com' - CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL: 'Magento_Enterprise_Cloud_BT' - CONFIG__STORES__DEFAULT__PAYPAL__NOTATION_CODE: 'Magento_Enterprise_Cloud' + env: + CONFIG__DEFAULT__PAYPAL_ONBOARDING__MIDDLEMAN_DOMAIN: 'payment-broker.magento.com' + CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL: 'Magento_Enterprise_Cloud_BT' + CONFIG__STORES__DEFAULT__PAYPAL__NOTATION_CODE: 'Magento_Enterprise_Cloud' ``` ## Configure PHP options You can choose which version of PHP to run in your `.magento.app.yaml` file: -``` +```yaml name: mymagento type: php:7.1 ``` @@ -315,19 +315,19 @@ type: php:7.1 You can enable additional PHP extensions in the `runtime:extension` section. Also, the extensions specified become available in the Docker PHP containers. -> .magento.app.yaml +`.magento.app.yaml` ```yaml runtime: - extensions: - - sockets - - sodium - - ssh2 - disabled_extensions: - - bcmath - - bz2 - - calendar - - exif + extensions: + - sockets + - sodium + - ssh2 + disabled_extensions: + - bcmath + - bz2 + - calendar + - exif ``` #### To view the current list of PHP extensions: @@ -342,93 +342,93 @@ For details about a specific PHP extension, see the [PHP Extension List](https:/ {{site.data.var.ece}} supports the following extensions: -- Default extensions: - - `bcmath` - - `bz2` - - `calendar` - - `exif` - - `gd` - - `gettext` - - `intl` - - `mysqli` - - `pcntl` - - `pdo_mysql` - - `soap` - - `sockets` - - `sysvmsg` - - `sysvsem` - - `sysvshm` - - `opcache` - - `zip` - -- Extensions that are installed and cannot be uninstalled: - - `ctype` - - `curl` - - `date` - - `dom` - - `fileinfo` - - `filter` - - `ftp` - - `hash` - - `iconv` - - `json` - - `mbstring` - - `mysqlnd` - - `openssl` - - `pcre` - - `pdo` - - `pdo_sqlite` - - `phar` - - `posix` - - `readline` - - `session` - - `sqlite3` - - `tokenizer` - - `xml` - - `xmlreader` - - `xmlwriter` - -- Extensions that can be installed and uninstalled as needed: - - `bcmath` - - `bz2` - - `calendar` - - `exif` - - `gd` - - `geoip` - - `gettext` - - `gmp` - - `igbinary` - - `imagick` - - `imap` - - `intl` - - `ldap` - - `mailparse` - - `mcrypt` - - `msgpack` - - `mysqli` - - `oauth` - - `opcache` - - `pdo_mysql` - - `propro` - - `pspell` - - `raphf` - - `recode` - - `redis` - - `shmop` - - `soap` - - `sockets` - - `sodium` - - `ssh2` - - `sysvmsg` - - `sysvsem` - - `sysvshm` - - `tidy` - - `xdebug` - - `xmlrpc` - - `xsl` - - `yaml` - - `zip` - - `pcntl` +- Default extensions: + - `bcmath` + - `bz2` + - `calendar` + - `exif` + - `gd` + - `gettext` + - `intl` + - `mysqli` + - `pcntl` + - `pdo_mysql` + - `soap` + - `sockets` + - `sysvmsg` + - `sysvsem` + - `sysvshm` + - `opcache` + - `zip` + +- Extensions that are installed and cannot be uninstalled: + - `ctype` + - `curl` + - `date` + - `dom` + - `fileinfo` + - `filter` + - `ftp` + - `hash` + - `iconv` + - `json` + - `mbstring` + - `mysqlnd` + - `openssl` + - `pcre` + - `pdo` + - `pdo_sqlite` + - `phar` + - `posix` + - `readline` + - `session` + - `sqlite3` + - `tokenizer` + - `xml` + - `xmlreader` + - `xmlwriter` + +- Extensions that can be installed and uninstalled as needed: + - `bcmath` + - `bz2` + - `calendar` + - `exif` + - `gd` + - `geoip` + - `gettext` + - `gmp` + - `igbinary` + - `imagick` + - `imap` + - `intl` + - `ldap` + - `mailparse` + - `mcrypt` + - `msgpack` + - `mysqli` + - `oauth` + - `opcache` + - `pdo_mysql` + - `propro` + - `pspell` + - `raphf` + - `recode` + - `redis` + - `shmop` + - `soap` + - `sockets` + - `sodium` + - `ssh2` + - `sysvmsg` + - `sysvsem` + - `sysvshm` + - `tidy` + - `xdebug` + - `xmlrpc` + - `xsl` + - `yaml` + - `zip` + - `pcntl` {: .bs-callout-warning} PHP compiled with debug is not supported and the Probe may conflict with XDebug or XHProf. Disable those extensions when enabling the Probe. The Probe conflicts with some PHP extensions like Pinba or IonCube. @@ -481,11 +481,11 @@ A basic, common worker configuration could look like this: ``` workers: - queue: - size: S - commands: - start: | - php worker.php + queue: + size: S + commands: + start: | + php worker.php ``` This example defines a single worker named queue, with a "small" container, and runs the command `php worker.php` on startup. If `worker.php` exits, it is automatically restarted. diff --git a/guides/v2.2/comp-mgr/trouble/cman/out-of-memory.md b/guides/v2.2/comp-mgr/trouble/cman/out-of-memory.md index 050398af065..e51c70ed83c 100644 --- a/guides/v2.2/comp-mgr/trouble/cman/out-of-memory.md +++ b/guides/v2.2/comp-mgr/trouble/cman/out-of-memory.md @@ -15,9 +15,9 @@ You may encounter an error, caused by your system running out of physical memory When installing or updating the Magento application or components like extensions, themes, or language packages, an error similar to the following displays: - Could not complete update {"components":[ - {"name":"magento/module-bundle-sample-data","version":"100.1.0"} - ]} successfully: proc_open(): fork failed - Cannot allocate memory + Could not complete update {"components":[ + {"name":"magento/module-bundle-sample-data","version":"100.1.0"} + ]} successfully: proc_open(): fork failed - Cannot allocate memory The error `proc_open(): fork failed - Cannot allocate memory` can also display on the command line. @@ -37,14 +37,14 @@ The following are suggestions only; other options might be available. Consult a Use the `fallocate` command as discussed in these references: -* [How To Add Swap on Ubuntu 14.04 (Digitalocean)](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04){:target="_blank"} -* [How To Add Swap Space on Ubuntu 16.04 (Digitalocean)](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04){:target="_blank"} -* [SwapFaq (help.ubuntu.com)](https://help.ubuntu.com/community/SwapFaq){:target="_blank"} +* [How To Add Swap on Ubuntu 14.04 (Digitalocean)](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04){:target="_blank"} +* [How To Add Swap Space on Ubuntu 16.04 (Digitalocean)](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04){:target="_blank"} +* [SwapFaq (help.ubuntu.com)](https://help.ubuntu.com/community/SwapFaq){:target="_blank"} #### Swap file on CentOS Use the `mkswap` command as discussed in these references: -* [How To Add Swap on CentOS 6 (Digitalocean)](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-6){:target="_blank"} -* [How To Add Swap on CentOS 7 (Digitalocean)](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7){:target="_blank"} -* [Swap Space (RedHat customer portal)](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ch-swapspace.html){:target="_blank"} +* [How To Add Swap on CentOS 6 (Digitalocean)](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-6){:target="_blank"} +* [How To Add Swap on CentOS 7 (Digitalocean)](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7){:target="_blank"} +* [Swap Space (RedHat customer portal)](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ch-swapspace.html){:target="_blank"} diff --git a/guides/v2.2/config-guide/deployment/pipeline/build-system.md b/guides/v2.2/config-guide/deployment/pipeline/build-system.md index e935f5f06a2..78c6b418464 100644 --- a/guides/v2.2/config-guide/deployment/pipeline/build-system.md +++ b/guides/v2.2/config-guide/deployment/pipeline/build-system.md @@ -10,22 +10,22 @@ functional_areas: You can have one build system that meets the following requirements: -* All Magento code is under source control in the same repository as the development and production systems -* Make sure all of the following are _included_ in source control: - - * `app/etc/config.php` - * `generated` directory (and subdirectories) - * `pub/media` directory - * `pub/media/wysiwyg` directory (and subdirectories) - * `pub/static` directory (and subdirectories) -* Must have a compatible PHP version installed -* Must have Composer installed -* It has Magento file system ownership and permissions set as discussed in [Prerequisite for your development, build, and production systems]({{ page.baseurl }}/config-guide/deployment/pipeline/technical-details.html#config-deploy-prereq). +* All Magento code is under source control in the same repository as the development and production systems +* Make sure all of the following are _included_ in source control: + + * `app/etc/config.php` + * `generated` directory (and subdirectories) + * `pub/media` directory + * `pub/media/wysiwyg` directory (and subdirectories) + * `pub/static` directory (and subdirectories) +* Must have a compatible PHP version installed +* Must have Composer installed +* It has Magento file system ownership and permissions set as discussed in [Prerequisite for your development, build, and production systems]({{ page.baseurl }}/config-guide/deployment/pipeline/technical-details.html#config-deploy-prereq). The build system does _not_ need any of the following: -* Magento database connection -* Magento software installed (only the code must be present) +* Magento database connection +* Magento software installed (only the code must be present) {:.bs-callout .bs-callout-info} The build machine can be on its own host or on the same host as an installed Magento system. @@ -42,47 +42,50 @@ The following sections discuss how to configure the build machine. To install PHP, see one of the following topics: -* [CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) -* [Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) +* [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) ### Set up the build system To set up the build system: -1. Log in to the build system as, or switch to, the Magento file system owner. -2. Retrieve the Magento code from source control. +1. Log in to the build system as, or switch to, the Magento file system owner. +1. Retrieve the Magento code from source control. - If you use Git, use the following command: + If you use Git, use the following command: - git clone [-b ] -2. Change to the Magento root directory and enter: + git clone [-b ] +1. Change to the Magento root directory and enter: - composer install -3. Wait for Magento dependencies to update. -4. Set ownership: + composer install +1. Wait for Magento dependencies to update. +1. Set ownership: - chown -R : . + chown -R : . - For example, + For example, - chown -R magento_user:apache . -4. If you use Git, open `.gitignore` in a text editor. -5. Start each of the following lines with a `#` character to comment them out: + chown -R magento_user:apache . - # app/etc/config.php - # pub/media/* - # generated/* - # pub/media/*.* - # pub/media/wysiwyg/* - # pub/static/* -6. Save your changes to `.gitignore` and exit the text editor. -7. If you use Git, use the following commands to commit the change: +1. If you use Git, open `.gitignore` in a text editor. +1. Start each of the following lines with a `#` character to comment them out: - git add .gitignore && git commit -m "Modify .gitignore for build and production" + ```text + # app/etc/config.php + # pub/media/* + # generated/* + # pub/media/*.* + # pub/media/wysiwyg/* + # pub/static/* + ``` - See the [`.gitignore` reference]({{ page.baseurl }}/config-guide/prod/config-reference-gitignore.html) for more information. +1. Save your changes to `.gitignore` and exit the text editor. +1. If you use Git, use the following commands to commit the change: + + git add .gitignore && git commit -m "Modify .gitignore for build and production" + + See the [`.gitignore` reference]({{ page.baseurl }}/config-guide/prod/config-reference-gitignore.html) for more information. #### Related topics -* [Set up your development systems]({{ page.baseurl }}/config-guide/deployment/pipeline/development-system.html) -* [Set up your production system]({{ page.baseurl }}/config-guide/deployment/pipeline/production-system.html) +* [Set up your development systems]({{ page.baseurl }}/config-guide/deployment/pipeline/development-system.html) +* [Set up your production system]({{ page.baseurl }}/config-guide/deployment/pipeline/production-system.html) diff --git a/guides/v2.2/install-gde/install-quick-ref.md b/guides/v2.2/install-gde/install-quick-ref.md index e6f0907f043..873fe6886d9 100644 --- a/guides/v2.2/install-gde/install-quick-ref.md +++ b/guides/v2.2/install-gde/install-quick-ref.md @@ -44,9 +44,8 @@ If not, see the [Installation overview]({{ page.baseurl }}/install-gde/bk-instal 2. If your system lacks any requirements, see the prerequisites documentation: * [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) - * [PHP (Ubuntu)]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) - * [PHP (CentOS)]({{ page.baseurl }}/install-gde/prereq/php-centos.html) - * MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) + * [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) + * [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) 3. ust as importantly, set up the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html) on the server. 4. Switch to the [Magento file system owner](https://glossary.magento.com/magento-file-system-owner). diff --git a/guides/v2.2/install-gde/prereq/apache.md b/guides/v2.2/install-gde/prereq/apache.md index d0da32bdc6b..b51eeebc6ff 100644 --- a/guides/v2.2/install-gde/prereq/apache.md +++ b/guides/v2.2/install-gde/prereq/apache.md @@ -18,10 +18,10 @@ Magento requires Apache 2.2.x or 2.4.x. If you're new to all this and need some help getting started, we suggest the following: -* [Is the Magento software installed already?]({{ page.baseurl }}/install-gde/basics/basics_magento-installed.html) -* [What is the software that the Magento server needs to run?]({{ page.baseurl }}/install-gde/basics/basics_software.html) -* [What operating system is my server running?]({{ page.baseurl }}/install-gde/basics/basics_os-version.html) -* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{ page.baseurl }}/install-gde/basics/basics_login.html) +* [Is the Magento software installed already?]({{ page.baseurl }}/install-gde/basics/basics_magento-installed.html) +* [What is the software that the Magento server needs to run?]({{ page.baseurl }}/install-gde/basics/basics_software.html) +* [What operating system is my server running?]({{ page.baseurl }}/install-gde/basics/basics_os-version.html) +* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{ page.baseurl }}/install-gde/basics/basics_login.html) ## Important: Apache rewrites and .htaccess {#apache-help-rewrite} @@ -44,43 +44,43 @@ Failure to enable these settings typically results in no styles displaying on yo To verify the Apache version you're currently running, enter: - apache2 -v + apache2 -v The result displays similar to the following: - Server version: Apache/2.2.22 (Ubuntu) - Server built: Jul 22 2014 14:35:32 + Server version: Apache/2.2.22 (Ubuntu) + Server built: Jul 22 2014 14:35:32 -* If Apache is *not* installed, see: - * [Installing or upgrading Apache on Ubuntu](#install-prereq-apache-ubuntu) - * [Installing Apache on CentOS](#install-prereq-apache-centos) -* If Apache 2.2 is installed on Ubuntu 12 *and* you want to use [PHP](https://glossary.magento.com/php) 5.6, see the next section +* If Apache is *not* installed, see: + * [Installing or upgrading Apache on Ubuntu](#install-prereq-apache-ubuntu) + * [Installing Apache on CentOS](#install-prereq-apache-centos) +* If Apache 2.2 is installed on Ubuntu 12 *and* you want to use [PHP](https://glossary.magento.com/php) 5.6, see the next section ## Installing or upgrading Apache on Ubuntu {#install-prereq-apache-ubuntu} The following sections discusses how to install or upgrade Apache: -* Install Apache -* Upgrade to Apache 2.4 on Ubuntu 12 to use PHP 5.6 or PHP 7 +* Install Apache +* Upgrade to Apache 2.4 on Ubuntu 12 to use PHP 5.6 or PHP 7 ### Installing Apache on Ubuntu 16, 14, or 12 {#install-prereq-apache-ubuntu-install} {% collapsible Click to show/hide content %} To install the default version of Apache (Ubuntu 14, 16—Apache 2.4, Ubuntu 12—Apache 2.2): -1. Install Apache +1. Install Apache - apt-get -y install apache2 + apt-get -y install apache2 -2. Verify the installation. +2. Verify the installation. - apache2 -v + apache2 -v - The result displays similar to the following: + The result displays similar to the following: - Server version: Apache/2.4.18 (Ubuntu) - Server built: 2016-04-15T18:00:57 + Server version: Apache/2.4.18 (Ubuntu) + Server built: 2016-04-15T18:00:57 -3. Enable rewrites and `.htaccess` as discussed in the following sections. +3. Enable rewrites and `.htaccess` as discussed in the following sections. ### Enable rewrites and .htaccess for Apache 2.4 {% include install/allowoverrides24.md %} @@ -90,9 +90,9 @@ To install the default version of Apache (Ubuntu 14, 16—Apache 2.4, Ubuntu #### Next steps -* [Solving 403 (Forbidden) errors](#apache-error) -* Continue with the next prerequisite ([PHP Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html)) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Solving 403 (Forbidden) errors](#apache-error) +* Continue with the next prerequisite ([PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html)) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) {% endcollapsible %} ### Upgrading Apache on Ubuntu 12 {#install-prereq-apache-ubuntu-upgrade} @@ -101,38 +101,38 @@ To use PHP 5.6 on Ubuntu 12, you must upgrade Apache to version 2.4. (By default To upgrade to Apache 2.4: -1. Add the `ppa:ondrej` repository, which has Apache 2.4: +1. Add the `ppa:ondrej` repository, which has Apache 2.4: - apt-get -y update - apt-add-repository ppa:ondrej/apache2 - apt-get -y update + apt-get -y update + apt-add-repository ppa:ondrej/apache2 + apt-get -y update -2. Install Apache 2.4: +2. Install Apache 2.4: - apt-get install -y apache2 + apt-get install -y apache2 {:.bs-callout .bs-callout-info} If the `apt-get install` command fails because of unmet dependencies, consult a resource like [http://askubuntu.com](http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa){:target="_blank"}. -3. Verify the installation. +3. Verify the installation. - apache2 -v + apache2 -v - Messages similar to the following should display: + Messages similar to the following should display: - Server version: Apache/2.4.10 (Ubuntu) - Server built: Jul 22 2014 22:46:25 + Server version: Apache/2.4.10 (Ubuntu) + Server built: Jul 22 2014 22:46:25 -4. Continue with the next section. +4. Continue with the next section. ### Enable rewrites and .htaccess for Apache 2.4 {% include install/allowoverrides24.md %} #### Next steps -* [Solving 403 (Forbidden) errors](#apache-error) -* Continue with the next prerequisite ([PHP Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html)) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Solving 403 (Forbidden) errors](#apache-error) +* Continue with the next prerequisite ([PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html)) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) {% endcollapsible %} ## Installing Apache on CentOS 6 or 7 {#install-prereq-apache-centos} @@ -144,20 +144,20 @@ Installing and configuring Apache is basically a three-step process: install the ### Installing Apache {#apache-install-centos} -1. Install Apache 2 if you haven't already done so. +1. Install Apache 2 if you haven't already done so. - yum -y install httpd + yum -y install httpd -2. Verify the installation: +2. Verify the installation: - httpd -v + httpd -v - Messages similar to the following display to confirm the installation was successful: + Messages similar to the following display to confirm the installation was successful: - Server version: Apache/2.2.15 (Unix) - Server built: Oct 16 2014 14:48:21 + Server version: Apache/2.2.15 (Unix) + Server built: Oct 16 2014 14:48:21 -3. Continue with the next section. +3. Continue with the next section. {:.bs-callout .bs-callout-info} Even though Apache 2.4 is provided by default with CentOS 7, you configure it like Apache 2.2. See the following section. @@ -167,9 +167,9 @@ Even though Apache 2.4 is provided by default with CentOS 7, you configure it li #### Next steps -* [Solving 403 (Forbidden) errors](#apache-error) -* Continue with the next prerequisite ([PHP Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html)) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Solving 403 (Forbidden) errors](#apache-error) +* Continue with the next prerequisite ([PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html)) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) {% endcollapsible %} ## Solving 403 (Forbidden) errors {#apache-error} @@ -177,8 +177,8 @@ Even though Apache 2.4 is provided by default with CentOS 7, you configure it li {% collapsible Click to install solve 403 errors %} If you encounter 403 Forbidden errors when trying to access the Magento site, you can update your Apache configuration or your virtual host configuration to enable visitors to the site as discussed in one of the following sections: -* [Solving 403 Forbidden errors for Apache 2.4](#apache-error-2-4) -* [Solving 403 Forbidden errors for Apache 2.2](#apache-error-2-2) +* [Solving 403 Forbidden errors for Apache 2.4](#apache-error-2-4) +* [Solving 403 Forbidden errors for Apache 2.2](#apache-error-2-2) #### Solving 403 Forbidden errors for Apache 2.4 {#apache-error-2-4} @@ -186,12 +186,12 @@ To enable website visitors to access your site, use one of the [Require directiv For example: - - Options Indexes FollowSymLinks MultiViews - AllowOverride - Order allow,deny - Require all granted - + + Options Indexes FollowSymLinks MultiViews + AllowOverride + Order allow,deny + Require all granted + {:.bs-callout .bs-callout-info} The preceding values for `Order` might not work in all cases. For more information, see the [Apache documentation](https://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#order){:target="_blank"}. @@ -202,12 +202,12 @@ To enable website visitors to access your site, use the [Allow directive](http:/ For example: - - Options Indexes FollowSymLinks MultiViews - AllowOverride - Order allow,deny - Allow from all - + + Options Indexes FollowSymLinks MultiViews + AllowOverride + Order allow,deny + Allow from all + {:.bs-callout .bs-callout-info} The preceding values for `Order` might not work in all cases. For more information, see the [Apache documentation](https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order){:target="_blank"}. @@ -215,9 +215,8 @@ The preceding values for `Order` might not work in all cases. For more informati #### Related topics: -* [PHP 5.5, 5.6, or 7.0—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) -* [PHP 5.5, 5.6, or 7.0—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) -* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) -* [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) -* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) +* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) +* [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) +* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.2/install-gde/prereq/install-rabbitmq.md b/guides/v2.2/install-gde/prereq/install-rabbitmq.md index b36b5126f9c..dadc952fc2a 100644 --- a/guides/v2.2/install-gde/prereq/install-rabbitmq.md +++ b/guides/v2.2/install-gde/prereq/install-rabbitmq.md @@ -132,13 +132,12 @@ To configure support for SSL, edit the `ssl` and `ssl_options` parameters in the After you have connected {{site.data.var.ee}} and RabbitMQ, you must start the message queue consumers. See [Configure message queues]({{ page.baseurl }}/config-guide/mq/manage-mysql.html) for details. -#### Related topics - -* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) -* [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) -* [PHP 5.5, 5.6, or 7.0—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) -* [PHP 5.5, 5.6, or 7.0—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) -* [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) -* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) -* [Message queue overview]({{ page.baseurl }}/config-guide/mq/rabbitmq-overview.html) -* [Manage message queues]({{ page.baseurl }}/config-guide/mq/manage-mysql.html) +## Related topics + +* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) +* [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) +* [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) +* [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) +* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [Message queue overview]({{ page.baseurl }}/config-guide/mq/rabbitmq-overview.html) +* [Manage message queues]({{ page.baseurl }}/config-guide/mq/manage-mysql.html) diff --git a/guides/v2.2/install-gde/prereq/mysql.md b/guides/v2.2/install-gde/prereq/mysql.md index 89ba5f2b819..6db9fc6d864 100644 --- a/guides/v2.2/install-gde/prereq/mysql.md +++ b/guides/v2.2/install-gde/prereq/mysql.md @@ -314,7 +314,6 @@ We recommend you configure your database instance as appropriate for your busine * [Set up a remote MySQL database connection]({{ page.baseurl }}/install-gde/prereq/mysql_remote.html) * [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) * [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) -* [PHP 5.5, 5.6, or 7.0—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) -* [PHP 5.5, 5.6, or 7.0—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) +* [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) * [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) * [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.2/install-gde/prereq/mysql_remote.md b/guides/v2.2/install-gde/prereq/mysql_remote.md index 3aa503c4aac..7b06ac17dfa 100644 --- a/guides/v2.2/install-gde/prereq/mysql_remote.md +++ b/guides/v2.2/install-gde/prereq/mysql_remote.md @@ -133,7 +133,6 @@ When you install the Magento software using either the command line or Setup Wiz * [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) * [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) -* [PHP 5.5, 5.6, or 7.0—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) -* [PHP 5.5, 5.6, or 7.0—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) +* [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) * [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) * [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.2/install-gde/prereq/nginx.md b/guides/v2.2/install-gde/prereq/nginx.md index ffd84d80bbc..bd9dc844a7b 100644 --- a/guides/v2.2/install-gde/prereq/nginx.md +++ b/guides/v2.2/install-gde/prereq/nginx.md @@ -14,17 +14,17 @@ Magento supports nginx 1.8 (or the [latest mainline version](http://nginx.org/en Installation instructions vary based on which operating system you're using: -* [Ubuntu 16]({{ page.baseurl }}/install-gde/prereq/nginx.html#ubuntu-16) -* [CentOS 7]({{ page.baseurl }}/install-gde/prereq/nginx.html#centos-7) +* [Ubuntu 16]({{ page.baseurl }}/install-gde/prereq/nginx.html#ubuntu-16) +* [CentOS 7]({{ page.baseurl }}/install-gde/prereq/nginx.html#centos-7) -## Help if you're just starting out {#apache-help-beginner} +## Help if you are just starting out {#apache-help-beginner} If you're new to all this and need some help getting started, we suggest the following: -* [Is the Magento software installed already?]({{ page.baseurl }}/install-gde/basics/basics_magento-installed.html) -* [What is the software that the Magento server needs to run?]({{ page.baseurl }}/install-gde/basics/basics_software.html) -* [What operating system is my server running?]({{ page.baseurl }}/install-gde/basics/basics_os-version.html) -* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{ page.baseurl }}/install-gde/basics/basics_login.html) +* [Is the Magento software installed already?]({{ page.baseurl }}/install-gde/basics/basics_magento-installed.html) +* [What is the software that the Magento server needs to run?]({{ page.baseurl }}/install-gde/basics/basics_software.html) +* [What operating system is my server running?]({{ page.baseurl }}/install-gde/basics/basics_os-version.html) +* [How do I log in to my Magento server using a terminal, command prompt, or SSH?]({{ page.baseurl }}/install-gde/basics/basics_login.html) ## Ubuntu 16 @@ -32,33 +32,33 @@ The following section describes how to install Magento 2.x on Ubuntu 16 using ng ### Install nginx - apt-get -y install nginx + apt-get -y install nginx After completing the following sections and [installing Magento]({{ page.baseurl }}/install-gde/prereq/nginx.html#install-magento2-ubuntu), we'll use a sample configuration file to [configure nginx]({{ page.baseurl }}/install-gde/prereq/nginx.html#configure-nginx-ubuntu). ### Install and configure php-fpm -Magento requires several [PHP extensions]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you're using nginx. +Magento requires several [PHP extensions]({{ page.baseurl }}/install-gde/prereq/php-settings.html) to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you're using nginx. To install and configure `php-fpm`: 1. Install `php-fpm` and `php-cli`: - apt-get -y install php7.0-fpm php7.0-cli + apt-get -y install php7.2-fpm php7.2-cli {:.bs-callout .bs-callout-info} - This command installs the latest available version of PHP 7.0.X. See [Magento 2.2.x technology stack requirements]({{ page.baseurl }}/install-gde/system-requirements-tech.html) for supported PHP versions. + This command installs the latest available version of PHP 7.2.X. See [Magento 2.2.x technology stack requirements]({{ page.baseurl }}/install-gde/system-requirements-tech.html) for supported PHP versions. 2. Open the `php.ini` files in an editor: - vim /etc/php/7.0/fpm/php.ini - vim /etc/php/7.0/cli/php.ini + vim /etc/php/7.2/fpm/php.ini + vim /etc/php/7.2/cli/php.ini 3. Edit both files to match the following lines: - memory_limit = 2G - max_execution_time = 1800 - zlib.output_compression = On + memory_limit = 2G + max_execution_time = 1800 + zlib.output_compression = On {:.bs-callout .bs-callout-info} We recommend setting the memory limit to 2G when testing Magento. Refer to [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html) for more information. @@ -67,7 +67,7 @@ To install and configure `php-fpm`: 5. Restart the `php-fpm` service: - systemctl restart php7.0-fpm + systemctl restart php7.2-fpm ### Install and configure MySQL @@ -77,35 +77,35 @@ Refer to [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) for more info There are several ways to download the Magento software, including: -* [Get the Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) +* [Get the Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) +* [Download an archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) +* [Clone the Git repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html) -* [Download an archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) - -* [Clone the Git repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html) - -For this example, we'll install using Composer and the command line. +For this example, we will install using Composer and the command line. {:.bs-callout .bs-callout-info} You cannot use the Web Setup Wizard when installing Magento on nginx. You must use the command line. -1. As the [Magento file system owner]({{page.baseurl}}/install-gde/prereq/file-sys-perms-over.html), log in to your Magento server. +1. As the [Magento file system owner]({{page.baseurl}}/install-gde/prereq/file-sys-perms-over.html), log in to your Magento server. -1. Change to the web server docroot directory or a directory that you have configured as a virtual host docroot. For this example, we're using the Ubuntu default `/var/www/html`. +1. Change to the web server docroot directory or a directory that you have configured as a virtual host docroot. For this example, we're using the Ubuntu default `/var/www/html`. - cd /var/www/html + cd /var/www/html -1. Install Composer globally. You'll need Composer to update dependencies before installing Magento: +1. Install Composer globally. You'll need Composer to update dependencies before installing Magento: - curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer + curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer 1. Create a new Composer project using the {{site.data.var.ce}} or {{site.data.var.ee}} metapackage. **{{site.data.var.ce}}** + ```bash composer create-project --repository=https://repo.magento.com/ magento/project-community-edition ``` **{{site.data.var.ee}}** + ```bash composer create-project --repository=https://repo.magento.com/ magento/project-enterprise-edition ``` @@ -145,8 +145,10 @@ You cannot use the Web Setup Wizard when installing Magento on nginx. You must u 1. Switch to developer mode: - cd /var/www/html/magento2/bin + ```bash + cd /var/www/html/magento2/bin ./magento deploy:mode:set developer + ``` ### Configure nginx {#configure-nginx-ubuntu} @@ -156,21 +158,21 @@ These instructions assume you're using the Ubuntu default location for the nginx 1. Create a new virtual host for your Magento site: - vim /etc/nginx/sites-available/magento + vim /etc/nginx/sites-available/magento 2. Add the following configuration: - upstream fastcgi_backend { - server unix:/run/php/php7.0-fpm.sock; - } + upstream fastcgi_backend { + server unix:/run/php/php7.0-fpm.sock; + } - server { + server { - listen 80; - server_name www.magento-dev.com; - set $MAGE_ROOT /var/www/html/magento2; - include /var/www/html/magento2/nginx.conf.sample; - } + listen 80; + server_name www.magento-dev.com; + set $MAGE_ROOT /var/www/html/magento2; + include /var/www/html/magento2/nginx.conf.sample; + } {:.bs-callout .bs-callout-info} The `include` directive must point to the sample nginx configuration file in your Magento installation directory. @@ -181,15 +183,15 @@ These instructions assume you're using the Ubuntu default location for the nginx 5. Activate the newly created virtual host by creating a symlink to it in the `/etc/nginx/sites-enabled` directory: - ln -s /etc/nginx/sites-available/magento /etc/nginx/sites-enabled + ln -s /etc/nginx/sites-available/magento /etc/nginx/sites-enabled 6. Verify that the syntax is correct: - nginx -t + nginx -t 7. Restart nginx: - systemctl restart nginx + systemctl restart nginx ### Verify the installation @@ -201,40 +203,40 @@ The following section describes how to install Magento 2.x on CentOS 7 using ngi ### Install nginx - yum -y install epel-release - yum -y install nginx + yum -y install epel-release + yum -y install nginx After installation is complete, start nginx and configure it to start at boot time: - systemctl start nginx - systemctl enable nginx + systemctl start nginx + systemctl enable nginx After completing the following sections and [installing Magento]({{ page.baseurl }}/install-gde/prereq/nginx.html#install-magento2-centos), we'll use a sample configuration file to [configure nginx]({{ page.baseurl }}/install-gde/prereq/nginx.html#configure-nginx-centos). ### Install and configure php-fpm -Magento requires several [PHP extensions]({{ page.baseurl }}/install-gde/prereq/php-centos.html) to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you're using nginx. +Magento requires several [PHP extensions]({{ page.baseurl }}/install-gde/prereq/php-settings.html) to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you're using nginx. 1. Install `php-fpm`: - yum -y install php70w-fpm + yum -y install php70w-fpm 2. Open the `/etc/php.ini` file in an editor. -3. Uncomment the `cgi.fix_pathinfo` line and change the value to `0`. +3. Uncomment the `cgi.fix_pathinfo` line and change the value to `0`. 4. Edit the file to match the following lines: - memory_limit = 2G - max_execution_time = 1800 - zlib.output_compression = On + memory_limit = 2G + max_execution_time = 1800 + zlib.output_compression = On {:.bs-callout .bs-callout-info} We recommend setting the memory limit to 2G when testing Magento. Refer to [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html) for more information. 5. Uncomment the session path directory and set the path: - session.save_path = "/var/lib/php/session" + session.save_path = "/var/lib/php/session" 6. Save and exit the editor. @@ -242,41 +244,41 @@ Magento requires several [PHP extensions]({{ page.baseurl }}/install-gde/prereq/ 8. Edit the file to match the following lines: - user = nginx - group = nginx - listen = /run/php-fpm/php-fpm.sock - listen.owner = nginx - listen.group = nginx - listen.mode = 0660 + user = nginx + group = nginx + listen = /run/php-fpm/php-fpm.sock + listen.owner = nginx + listen.group = nginx + listen.mode = 0660 9. Uncomment the environment lines: - env[HOSTNAME] = $HOSTNAME - env[PATH] = /usr/local/bin:/usr/bin:/bin - env[TMP] = /tmp - env[TMPDIR] = /tmp - env[TEMP] = /tmp + env[HOSTNAME] = $HOSTNAME + env[PATH] = /usr/local/bin:/usr/bin:/bin + env[TMP] = /tmp + env[TMPDIR] = /tmp + env[TEMP] = /tmp 10. Save and exit the editor. 11. Create a new directory for the PHP session path and change the owner to the `apache` user and group: - mkdir -p /var/lib/php/session/ - chown -R apache:apache /var/lib/php/ + mkdir -p /var/lib/php/session/ + chown -R apache:apache /var/lib/php/ 12. Create a new directory for the PHP session path and change the owner to the `apache` user and group: - mkdir -p /run/php-fpm/ - chown -R apache:apache /run/php-fpm/ + mkdir -p /run/php-fpm/ + chown -R apache:apache /run/php-fpm/ 13. Start the `php-fpm` service and configure it to start at boot time: - systemctl start php-fpm - systemctl enable php-fpm + systemctl start php-fpm + systemctl enable php-fpm 14. Verify that the `php-fpm` service is running: - netstat -pl | grep php-fpm.sock + netstat -pl | grep php-fpm.sock ### Install and configure MySQL @@ -286,51 +288,49 @@ Refer to [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) for more info There are several ways to download the Magento software, including: -* [Get the Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) - -* [Download an archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) - -* [Clone the Git repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html) +* [Get the Composer metapackage]({{ page.baseurl }}/install-gde/composer.html) +* [Download an archive]({{ page.baseurl }}/install-gde/prereq/zip_install.html) +* [Clone the Git repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html) For this example, we'll download and extract an archive. 1. Change to the web server docroot directory, or to a directory you’ve configured as a virtual host docroot. For this example, we're using the CentoOS default `/usr/share/nginx/html`. - cd /usr/share/nginx/html + cd /usr/share/nginx/html 2. Download the Magento archive, extract it, and rename the folder `magento2/`: - wget https://github.com/magento/magento2/archive/2.2.tar.gz - tar -xzvf 2.2.tar.gz - mv magento2-2.2/ magento2/ + wget https://github.com/magento/magento2/archive/2.2.tar.gz + tar -xzvf 2.2.tar.gz + mv magento2-2.2/ magento2/ 3. [Set directory ownership and file permissions]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html). - cd /usr/share/nginx/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 + cd /usr/share/nginx/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 4. Install Composer globally. You'll need Composer to update dependencies before installing Magento: - curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer + curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer 5. Update Magento dependencies: - cd /usr/share/nginx/html/magento2 - composer install + cd /usr/share/nginx/html/magento2 + composer install 6. If prompted, enter your [Magento authentication keys]({{ page.baseurl }}/install-gde/prereq/connect-auth.html). 7. Install Magento from the [command line]({{ page.baseurl }}/install-gde/install/cli/install-cli.html). - cd /usr/share/nginx/html/magento2/bin - ./magento setup:install --base-url=http://www.magento-dev.com/ \ - --db-host=localhost --db-name=magento --db-user=magento --db-password=magento \ - --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \ - --admin-user=admin --admin-password=admin123 --language=en_US \ - --currency=USD --timezone=America/Chicago --use-rewrites=1 + cd /usr/share/nginx/html/magento2/bin + ./magento setup:install --base-url=http://www.magento-dev.com/ \ + --db-host=localhost --db-name=magento --db-user=magento --db-password=magento \ + --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \ + --admin-user=admin --admin-password=admin123 --language=en_US \ + --currency=USD --timezone=America/Chicago --use-rewrites=1 Replace `http://www.magento-dev.com` with your domain name. @@ -339,8 +339,8 @@ For this example, we'll download and extract an archive. 8. Switch Magento to developer mode: - cd /usr/share/nginx/html/magento2/bin - ./magento deploy:mode:set developer + cd /usr/share/nginx/html/magento2/bin + ./magento deploy:mode:set developer ### Configure nginx {#configure-nginx-centos} @@ -350,21 +350,21 @@ These instructions assume you're using the CentOS default location for the nginx 1. Create a new virtual host for your Magento site: - vim /etc/nginx/conf.d/magento.conf + vim /etc/nginx/conf.d/magento.conf 2. Add the following configuration: - upstream fastcgi_backend { - server unix:/run/php-fpm/php-fpm.sock; - } + upstream fastcgi_backend { + server unix:/run/php-fpm/php-fpm.sock; + } - server { + server { - listen 80; - server_name www.magento-dev.com; - set $MAGE_ROOT /usr/share/nginx/html/magento2; - include /usr/share/nginx/html/magento2/nginx.conf.sample; - } + listen 80; + server_name www.magento-dev.com; + set $MAGE_ROOT /usr/share/nginx/html/magento2; + include /usr/share/nginx/html/magento2/nginx.conf.sample; + } {:.bs-callout .bs-callout-info} The `include` directive must point to the sample nginx configuration file in your Magento installation directory. @@ -375,56 +375,55 @@ These instructions assume you're using the CentOS default location for the nginx 5. Verify that the syntax is correct: - nginx -t + nginx -t 6. Restart nginx: - systemctl restart nginx + systemctl restart nginx ### Configure SELinux and Firewalld -SELinux is enabled by default on CentOS 7. Use the following command to see if it's running: +SELinux is enabled by default on CentOS 7. Use the following command to see if it is running: - sestatus + sestatus To configure SELinux and firewalld: 1. Install SELinux management tools: - yum -y install policycoreutils-python + yum -y install policycoreutils-python 2. Run the following commands to change the security context for the Magento installation directory: - semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/app/etc(/.*)?' - semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/var(/.*)?' - semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/media(/.*)?' - semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/static(/.*)?' - restorecon -Rv '/usr/share/nginx/html/magento2/' + semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/app/etc(/.*)?' + semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/var(/.*)?' + semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/media(/.*)?' + semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/static(/.*)?' + restorecon -Rv '/usr/share/nginx/html/magento2/' 3. Install the firewalld package: - yum -y install firewalld + yum -y install firewalld 4. Start the firewall service and configure it to start at boot time: - systemctl start firewalld - systemctl enable firewalld + systemctl start firewalld + systemctl enable firewalld 5. Run the following commands to open ports for HTTP and HTTPS so you can access the Magento base URL from a web browser: - firewall-cmd --permanent --add-service=http - firewall-cmd --permanent --add-service=https - firewall-cmd --reload + firewall-cmd --permanent --add-service=http + firewall-cmd --permanent --add-service=https + firewall-cmd --reload ### Verify the installation Open a web browser and navigate to your site's base URL to [verify the installation.]({{ page.baseurl }}/install-gde/install/verify.html) -#### Related topics: +#### Related topics -* [PHP 5.5, 5.6, or 7.0—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) -* [PHP 5.5, 5.6, or 7.0—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) -* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) -* [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) -* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) -* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) +* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) +* [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) +* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) +* [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.2/install-gde/prereq/optional.md b/guides/v2.2/install-gde/prereq/optional.md index 66e1fd1499d..27cb13e30b8 100644 --- a/guides/v2.2/install-gde/prereq/optional.md +++ b/guides/v2.2/install-gde/prereq/optional.md @@ -31,7 +31,7 @@ See one of the following sections: Enter the following command to install NTP: - apt-get install ntp + apt-get install ntp Continue with [Use NTP pool servers](#install-optional-ntp-servers) @@ -41,17 +41,17 @@ To install and configure NTP: 1. Enter the following command to find the appropriate NTP software: - yum search ntp + yum search ntp 2. Select a package to install. For example, `ntp.x86_64`. 2. Install the package. - yum -y install ntp.x86_64 + yum -y install ntp.x86_64 3. Enter the following command so that NTP starts when the server starts. - chkconfig ntpd on + chkconfig ntpd on 3. Continue with the next section. @@ -63,33 +63,33 @@ Selecting pool servers is up to you. If you use NTP pool servers, ntp.org recomm 2. Look for lines similar to the following: - server 0.centos.pool.ntp.org - server 1.centos.pool.ntp.org - server 2.centos.pool.ntp.org + server 0.centos.pool.ntp.org + server 1.centos.pool.ntp.org + server 2.centos.pool.ntp.org 3. Replace those lines or add additional lines that specify your NTP pool server or other NTP servers. It's a good idea to specify more than one. 4. An example of using three United States-based NTP servers follows: - server 0.us.pool.ntp.org - server 1.us.pool.ntp.org - server 2.us.pool.ntp.org + server 0.us.pool.ntp.org + server 1.us.pool.ntp.org + server 2.us.pool.ntp.org 5. Save your changes to `/etc/ntp.conf` and exit the text editor. 4. Restart the service. - Ubuntu: `service ntp restart` + Ubuntu: `service ntp restart` - CentOS: `service ntpd restart` + CentOS: `service ntpd restart` 4. Enter `date` to check the server's date. - If the date is incorrect, make sure the NTP client port (typically, UDP 123) is open in your firewall. + If the date is incorrect, make sure the NTP client port (typically, UDP 123) is open in your firewall. - Try the `ntpdate _[pool server hostname]_` command. If it fails, search for the error it returns. + Try the `ntpdate _[pool server hostname]_` command. If it fails, search for the error it returns. - If all else fails, try rebooting the server. + If all else fails, try rebooting the server. ## Create phpinfo.php {#install-optional-phpinfo} [`phpinfo.php`](http://php.net/manual/en/function.phpinfo.php){:target="_blank"} displays a large amount of information about [PHP](https://glossary.magento.com/php) and its extensions. @@ -98,25 +98,25 @@ Selecting pool servers is up to you. If you use NTP pool servers, ntp.org recomm Use `phpinfo.php` in a development system _only_. It can be a security issue in production. Add the following code anywhere in your web server's docroot: - - /phpinfo.php + http:///phpinfo.php If a 404 (Not Found) error displays, check the following: * Start the web server if necessary. * Make sure your firewall allows traffic on port 80. - [Help for Ubuntu](https://help.ubuntu.com/community/UFW){:target="_blank"} + [Help for Ubuntu](https://help.ubuntu.com/community/UFW){:target="_blank"} - [Help for CentOS](http://wiki.centos.org/HowTos/Network/IPTables){:target="_blank"} + [Help for CentOS](http://wiki.centos.org/HowTos/Network/IPTables){:target="_blank"} ## Install phpmyadmin {#install-optional-phpmyadmin} `phpmyadmin` is an easy-to-use, free database administration utility. You can use it to check and manipulate the contents of your database. You must log in to `phpmyadmin` as the MySQL database administrative user. @@ -134,13 +134,13 @@ To install phpmyadmin on Ubuntu: 1. Use the following command: - apt-get install phpmyadmin + apt-get install phpmyadmin 2. Follow the prompts on your screen to complete the installation. 3. To use phpmyadmin, enter the following URL in your browser's address or location field: - http:///phpmyadmin + http:///phpmyadmin 4. When prompted, log in using your MySQL database `root` or administrative user's username and password. @@ -150,53 +150,52 @@ To install phpmyadmin on CentOS: 1. Download the epel RPM for the version of CentOS you're using. A sample follows. - cd /tmp - wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm - rpm -ivh epel-release-6-8.noarch.rpm + cd /tmp + wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm + rpm -ivh epel-release-6-8.noarch.rpm 2. Install `phpmyadmin` as follows: - yum -y install phpmyadmin + yum -y install phpmyadmin 3. Authorize access to phpmyadmin from your machine's IP address. - Open the following file for editing: + Open the following file for editing: - vim /etc/httpd/conf.d/phpMyAdmin.conf + vim /etc/httpd/conf.d/phpMyAdmin.conf 3. Replace the following IP address with your IP address - Require ip localhost + Require ip localhost - For example, + For example, - Require ip 192.51.100.101 + Require ip 192.51.100.101 4. Replace the following IP with your IP address: - Allow from localhost + Allow from localhost - For example, + For example, - Allow from 192.51.100.101 + Allow from 192.51.100.101 5. Save your changes to `/etc/httpd/conf.d/phpMyAdmin.conf` and exit the text editor. 6. Restart Apache. - service httpd Restart + service httpd Restart 7. To use phpmyadmin, enter the following command in your browser's address or location field: - http:///phpmyadmin + http:///phpmyadmin 8. When prompted, log in using your MySQL database `root` or administrative user's username and password. -#### Related topics: +#### Related topics * [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) -* [PHP 5.5, 5.6, or 7.0—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) -* [PHP 5.5, 5.6, or 7.0—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) +* [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) * [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) * [Configuring security options]({{ page.baseurl }}/install-gde/prereq/security.html) * [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.2/install-gde/prereq/php-settings.md b/guides/v2.2/install-gde/prereq/php-settings.md index 58f5681d5f7..30fcef514f5 100644 --- a/guides/v2.2/install-gde/prereq/php-settings.md +++ b/guides/v2.2/install-gde/prereq/php-settings.md @@ -11,9 +11,9 @@ functional_areas: - System - Setup redirect_from: - - /guides/v2.2/install-gde/prereq/php-centos.html - - /guides/v2.2/install-gde/prereq/php-ubuntu.html - - /guides/v2.2/install-gde/prereq/php-centos-ubuntu.html + - /guides/v2.2/install-gde/prereq/php-settings.html + - /guides/v2.2/install-gde/prereq/php-settings.html + - /guides/v2.2/install-gde/prereq/php-settings-ubuntu.html --- This topic discusses how to set required [PHP](https://glossary.magento.com/php) options. diff --git a/guides/v2.2/install-gde/prereq/prereq-overview.md b/guides/v2.2/install-gde/prereq/prereq-overview.md index 6c6a0dd83ec..f932b928f37 100644 --- a/guides/v2.2/install-gde/prereq/prereq-overview.md +++ b/guides/v2.2/install-gde/prereq/prereq-overview.md @@ -15,9 +15,9 @@ functional_areas: Before you install Magento, you must do all of the following: -* Set up one or more hosts that meet the [Magento system requirements]({{ page.baseurl }}/install-gde/system-requirements.html). -* If you are setting up more than one web node with load balancing, set up and test that part of your system _before_ you install Magento. -* Make sure you can back up your entire system at various points during the installation so you can roll back in the [event](https://glossary.magento.com/event) of issues. +* Set up one or more hosts that meet the [Magento system requirements]({{ page.baseurl }}/install-gde/system-requirements.html). +* If you are setting up more than one web node with load balancing, set up and test that part of your system _before_ you install Magento. +* Make sure you can back up your entire system at various points during the installation so you can roll back in the [event](https://glossary.magento.com/event) of issues. {:.bs-callout .bs-callout-info} We assume you're installing the Magento 2 software in a _development environment_, which means you have [root user](http://www.linfo.org/root.html){:target="_blank"} access to the machine _and_ that the machine does not need to be highly secure. If you're setting up a more secure machine, we strongly recommend you consult a network administrator for additional assistance. @@ -30,15 +30,15 @@ Don't know what any of this means? Check out our [installation overview page]({{ Enter the following commands as a user with `root` privileges: -* Ubuntu +* Ubuntu - apt-get update - apt-get upgrade + apt-get update + apt-get upgrade -* CentOS +* CentOS - yum -y update - yum -y upgrade + yum -y update + yum -y upgrade ## Prerequisite check {#instgde-prereq-check} @@ -46,67 +46,73 @@ To check your system for prerequisites, enter the following commands: ### Apache +Magento supports Apache version 2.4 + CentOS: `httpd -v` Ubuntu: `apache2 -v` -You must run Apache version 2.2 or 2.4 as the following result indicates: +as the following result indicates: - Server version: Apache/2.2.15 (Unix) - Server built: Jul 23 2014 14:17:29 + Server version: Apache/2.4.1 (Unix) + Server built: Jul 23 2017 14:17:29 To install or upgrade Apache, see [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html). ### PHP - php -v +For Magento v2.2.10, you must run [PHP](https://glossary.magento.com/php) version 7.1.x or 7.2.x. +To check your PHP version, in the command line, enter: -You must run [PHP](https://glossary.magento.com/php) version 7.0.x or 7.1.x as the following result indicates: +```bash + php -v +``` - PHP 7.0.8-2+deb.sury.org~trusty+1 (cli) ( NTS ) - Copyright (c) 1997-2016 The PHP Group - Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies - with Zend OPcache v7.0.8-2+deb.sury.org~trusty+1, Copyright (c) 1999-2016, by Zend Technologies + The result will be similar to: -To install PHP, see: +```terminal + PHP 7.2.8-2 ( NTS ) + Copyright (c) 1997-2018 The PHP Group + Zend Engine v3.0.0, Copyright (c) 1998-2018 Zend Technologies + with Zend OPcache v7.0.8-2, Copyright (c) 1999-2018, by Zend Technologies +``` -* [PHP 7.0 or 7.1—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) -* [PHP 7.0 or 7.1—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) +To install PHP, see [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html). ### MySQL - mysql -u -p + mysql -u -p For example: - mysql -u magento -p + mysql -u magento -p You must run MySQL version 5.6 or later as the following result indicates: - Welcome to the MySQL monitor. Commands end with ; or \g. - Your MySQL connection id is 871 - Server version: 5.6.21 MySQL Community Server (GPL) + Welcome to the MySQL monitor. Commands end with ; or \g. + Your MySQL connection id is 871 + Server version: 5.6.21 MySQL Community Server (GPL) - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. - Oracle is a registered trademark of Oracle Corporation and/or its - affiliates. Other names may be trademarks of their respective - owners. + Oracle is a registered trademark of Oracle Corporation and/or its + affiliates. Other names may be trademarks of their respective + owners. - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. Enter `exit` at the `mysql>` prompt to exit. To install or upgrade MySQL, see [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html). -#### Next step +## Next step + [Choose how to install the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) -#### Related topics +## Related topics -* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) -* [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) -* [PHP 7.0 or 7.1—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) -* [PHP 7.0 or 7.1—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) -* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) -* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) +* [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) +* [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) +* [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) +* [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) +* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.2/install-gde/prereq/security.md b/guides/v2.2/install-gde/prereq/security.md index 99ed47bfe02..8b225a10f86 100644 --- a/guides/v2.2/install-gde/prereq/security.md +++ b/guides/v2.2/install-gde/prereq/security.md @@ -58,8 +58,7 @@ Depending on your security requirements, you might find it necessary to open por #### Related topics: * [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html) -* [PHP 5.5, 5.6, or 7.0—Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) -* [PHP 5.5, 5.6, or 7.0—CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) +* [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) * [MySQL]({{ page.baseurl }}/install-gde/prereq/mysql.html) * [Installing optional software]({{ page.baseurl }}/install-gde/prereq/optional.html) * [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.2/install-gde/system-requirements-tech.md b/guides/v2.2/install-gde/system-requirements-tech.md index dd2adccbc67..0fa4ac9c442 100644 --- a/guides/v2.2/install-gde/system-requirements-tech.md +++ b/guides/v2.2/install-gde/system-requirements-tech.md @@ -48,14 +48,14 @@ PHP 7.0 is no longer supported. #### Required PHP extensions {: .bs-callout-info } -The [CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) and [Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html) PHP installation instructions include a step for installing these extensions. +The [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) installation instructions include a step for installing these extensions. {% include install/php-extensions-template.md %} #### PHP OPcache -We strongly recommend you verify that [PHP OPcache](http://php.net/manual/en/intro.opcache.php) is enabled for performance reasons. The OPcache is enabled in many PHP distributions. To verify if it is installed, see our PHP documentation for [CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) or [Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html). +We strongly recommend you verify that [PHP OPcache](http://php.net/manual/en/intro.opcache.php) is enabled for performance reasons. The OPcache is enabled in many PHP distributions. To verify if it is installed, see our [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) documentation. If you must install it separately, see the [PHP OPcache documentation](http://php.net/manual/en/opcache.setup.php). @@ -117,4 +117,4 @@ For details, see [Known issues that affect installation]({{ page.baseurl }}/inst ### Documentation -[Install Magento prerequisites]({{ page.baseurl }}/install-gde/prereq/prereq-overview.html) \ No newline at end of file +[Install Magento prerequisites]({{ page.baseurl }}/install-gde/prereq/prereq-overview.html) diff --git a/guides/v2.2/install-gde/trouble/php/tshoot_pdo.md b/guides/v2.2/install-gde/trouble/php/tshoot_pdo.md index ddffe938948..61cce05bea9 100644 --- a/guides/v2.2/install-gde/trouble/php/tshoot_pdo.md +++ b/guides/v2.2/install-gde/trouble/php/tshoot_pdo.md @@ -13,9 +13,8 @@ functional_areas: ### Details - PHP Fatal error: Class 'PDO' not found in /var/www/html/magento2/setup/module/Magento/Setup/src/Module/Setup/ConnectionFactory.php on line 44 +PHP Fatal error: Class 'PDO' not found in /var/www/html/magento2/setup/module/Magento/Setup/src/Module/Setup/ConnectionFactory.php on line 44 -### Solution: - -Make sure you installed all required PHP extensions ([Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-centos.html) [CentOS]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html)). +### Solution +Make sure you installed all required [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html) extensions. diff --git a/guides/v2.2/install-gde/trouble/php/tshoot_php-date.md b/guides/v2.2/install-gde/trouble/php/tshoot_php-date.md index 8b82aaa4d3f..c1f1fa850fd 100644 --- a/guides/v2.2/install-gde/trouble/php/tshoot_php-date.md +++ b/guides/v2.2/install-gde/trouble/php/tshoot_php-date.md @@ -13,11 +13,12 @@ functional_areas: ### Details -During the installation, the following message displays: +During the installation, the following message displays: - PHP Warning: date(): It is not safe to rely on the system's timezone settings. [more] +```terminal +PHP Warning: date(): It is not safe to rely on the system's timezone settings. [more] +``` ### Solution Set the [PHP timezone]({{ page.baseurl }}/install-gde/prereq/php-settings.html) properly. - diff --git a/guides/v2.2/install-gde/trouble/php/tshoot_php-set.md b/guides/v2.2/install-gde/trouble/php/tshoot_php-set.md index 4a7df50012e..aa7007262c1 100644 --- a/guides/v2.2/install-gde/trouble/php/tshoot_php-set.md +++ b/guides/v2.2/install-gde/trouble/php/tshoot_php-set.md @@ -17,23 +17,22 @@ The readiness checks makes sure you have at least 1GB of memory set aside for [P To increase your PHP memory limit: -1. Log in to your Magento server. -2. Locate your `php.ini` file using the following command: +1. Log in to your Magento server. +1. Locate your `php.ini` file using the following command: - php --ini -3. As a user with `root` privileges, use a text editor to open the `php.ini` specified by `Loaded Configuration File`. -4. Locate `memory_limit`. -5. Change it to a value of `2GB` for normal use and debugging. -6. Save your changes to `php.ini` and exit the text editor. -7. Restart your web server. + php --ini +1. As a user with `root` privileges, use a text editor to open the `php.ini` specified by `Loaded Configuration File`. +1. Locate `memory_limit`. +1. Change it to a value of `2GB` for normal use and debugging. +1. Save your changes to `php.ini` and exit the text editor. +1. Restart your web server. + Examples: - Examples follow: - - * CentOS: `service httpd restart` - * Ubuntu: `service apache2 restart` - * nginx (both CentOS and Ubuntu): `service nginx restart` -8. Try the installation again. + * CentOS: `service httpd restart` + * Ubuntu: `service apache2 restart` + * nginx (both CentOS and Ubuntu): `service nginx restart` +1. Try the installation again. ## max-input-vars error due to large forms @@ -44,8 +43,8 @@ When this occurs, a warning appears in the PHP log: ```bash PHP message: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. ``` - There is no 'proper' value for `max-input-vars`; it depends on the size and complexity of your configuration. Modify the value in the `php.ini` file as needed. See [Required PHP settings][]. + There is no 'proper' value for `max-input-vars`; it depends on the size and complexity of your configuration. Modify the value in the `php.ini` file as needed. See [Required PHP settings][]. ## xdebug maximum function nesting level error {#trouble-php-xdebug} @@ -57,10 +56,11 @@ Error text is typically: Parse error: syntax error, unexpected 'data' (T_STRING) -### Solution: Set asp_tags = off in php.ini +### Solution: Set asp_tags = off in php.ini + Multiple templates have syntax for support abstract level on templates (use different templates engines like Twig) wrapped in `<% %>` tags, like this [template][]{:target="_blank"} for displaying a product image: -```php?start_inline=1 +```php [Adjust the FTF configuration ]: {{ page.baseurl }}/mtf/mtf_quickstart/mtf_quickstart_config.html -[CentOS]: {{ page.baseurl }}/install-gde/prereq/php-centos.html +[PHP]: {{ page.baseurl }}/install-gde/prereq/php-settings.html [Composer]: https://getcomposer.org [globally]: https://getcomposer.org/doc/00-intro.md#globally [Install Composer]: {{ page.baseurl }}/install-gde/prereq/dev_install.html#instgde-prereq-compose-install [Magento Installation Guide]: {{ page.baseurl }}/install-gde/bk-install-guide.html [Open a command prompt]: {{ page.baseurl }}/install-gde/basics/basics_login.html [the Magento file system owner]: {{ page.baseurl }}/install-gde/prereq/apache-user.html -[Ubuntu]: {{ page.baseurl }}/install-gde/prereq/php-ubuntu.html \ No newline at end of file diff --git a/guides/v2.3/install-gde/prereq/apache.md b/guides/v2.3/install-gde/prereq/apache.md index 4b85b649bd1..7a69c5f9236 100644 --- a/guides/v2.3/install-gde/prereq/apache.md +++ b/guides/v2.3/install-gde/prereq/apache.md @@ -12,7 +12,7 @@ functional_areas: ## Apache versions supported {#apache-support} -Magento requires Apache 2.2.x or 2.4.x. +Magento supports Apache 2.4.x. ## Help if you are just starting out {#apache-help-beginner} @@ -96,7 +96,7 @@ To install the default version of Apache (Ubuntu 14, 16—Apache 2.4, Ubuntu #### Next steps * [Solving 403 (Forbidden) errors](#apache-error) -* Continue with the next prerequisite ([PHP]({{page.baseurl }}/install-gde/prereq/php-settings.html)) +* Continue with the next prerequisite ([PHP][] * [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) {% endcollapsible %} @@ -138,7 +138,7 @@ If the 'apt-get install' command fails because of unmet dependencies, consult a #### Next steps * [Solving 403 (Forbidden) errors](#apache-error) -* Continue with the next prerequisite ([PHP]({{page.baseurl }}/install-gde/prereq/php-settings.html)) +* Continue with the next prerequisite [PHP] * [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) {% endcollapsible %} @@ -151,7 +151,7 @@ Installing and configuring Apache is basically a three-step process: install the ### Installing Apache {#apache-install-centos} -1. Install Apache 2 if you haven't already done so. +1. Install Apache 2.4 if you haven't already done so. yum -y install httpd @@ -161,8 +161,8 @@ Installing and configuring Apache is basically a three-step process: install the Messages similar to the following display to confirm the installation was successful: - Server version: Apache/2.2.15 (Unix) - Server built: Oct 16 2014 14:48:21 + Server version: Apache/2.4.0 (Unix) + Server built: Oct 16 2017 14:48:21 1. Continue with the next section. @@ -176,7 +176,7 @@ Even though Apache 2.4 is provided by default with CentOS 7, you configure it li #### Next steps * [Solving 403 (Forbidden) errors](#apache-error) -* Continue with the next prerequisite ([PHP]({{page.baseurl }}/install-gde/prereq/php-settings.html#)) +* Continue with the next prerequisite [PHP][] * [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) {% endcollapsible %} @@ -223,8 +223,8 @@ The preceding values for `Order` might not work in all cases. For more informati #### Related topics -* [PHP]({{page.baseurl }}/install-gde/prereq/php-settings.html) -* [MySQL]({{page.baseurl }}/install-gde/prereq/mysql.html) +* [PHP]({{page.baseurl}}/install-gde/prereq/php-settings.html) +* [MySQL]({{page.baseurl}}/install-gde/prereq/mysql.html) * [Configuring security options]({{page.baseurl }}/install-gde/prereq/security.html) * [Installing optional software]({{page.baseurl }}/install-gde/prereq/optional.html) * [Determine your installation or upgrade path]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/guides/v2.3/install-gde/prereq/nginx.md b/guides/v2.3/install-gde/prereq/nginx.md index 6d70f736834..3b3f61ec058 100644 --- a/guides/v2.3/install-gde/prereq/nginx.md +++ b/guides/v2.3/install-gde/prereq/nginx.md @@ -214,7 +214,7 @@ After completing the following sections and [installing Magento]({{page.baseurl ### Install and configure php-fpm -Magento requires several [PHP extensions](php-settings.html) to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you're using nginx. +Magento requires several [PHP](php-settings.html) extensions to function properly. In addition to these extensions, you must also install and configure the `php-fpm` extension if you're using nginx. 1. Install `php-fpm`: diff --git a/guides/v2.3/install-gde/prereq/php-settings.md b/guides/v2.3/install-gde/prereq/php-settings.md index abe53a06d97..7a676c8365f 100644 --- a/guides/v2.3/install-gde/prereq/php-settings.md +++ b/guides/v2.3/install-gde/prereq/php-settings.md @@ -6,9 +6,9 @@ functional_areas: - System - Setup redirect_from: - - /guides/v2.3/install-gde/prereq/php-centos.html - - /guides/v2.3/install-gde/prereq/php-ubuntu.html - - /guides/v2.3/install-gde/prereq/php-centos-ubuntu.html + - /guides/v2.3/install-gde/prereq/php-settings.html + - /guides/v2.3/install-gde/prereq/php-settings.html + - /guides/v2.3/install-gde/prereq/php-settings-ubuntu.html --- This topic discusses how to set required [PHP](https://glossary.magento.com/php) options. diff --git a/guides/v2.3/install-gde/prereq/prereq-overview.md b/guides/v2.3/install-gde/prereq/prereq-overview.md index 32472752f1d..099c7e4a040 100644 --- a/guides/v2.3/install-gde/prereq/prereq-overview.md +++ b/guides/v2.3/install-gde/prereq/prereq-overview.md @@ -56,11 +56,11 @@ CentOS: `httpd -v` Ubuntu: `apache2 -v` -You must run Apache version 2.2 or 2.4 as the following result indicates: +Magento supports Apache version 2.4 as the following result indicates: ```terminal -Server version: Apache/2.2.15 (Unix) -Server built: Jul 23 2014 14:17:29 +Server version: Apache/2.4.0 (Unix) +Server built: Jul 23 2017 14:17:29 ``` To install or upgrade Apache, see [Apache]({{page.baseurl}}/install-gde/prereq/apache.html). @@ -86,7 +86,7 @@ Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.6, Copyright (c) 1999-2018, by Zend Technologies ``` -See [PHP](/guides/v2.3/install-gde/prereq/php-settings.html) for info on installing PHP. +See [PHP](/guides/v2.3/install-gde/prereq/php-settings.html) for info on PHP requirements. ### MySQL diff --git a/guides/v2.3/mtf/mtf_installation.md b/guides/v2.3/mtf/mtf_installation.md index 3e13206461e..507c8e44d61 100644 --- a/guides/v2.3/mtf/mtf_installation.md +++ b/guides/v2.3/mtf/mtf_installation.md @@ -23,7 +23,7 @@ To install the Magento application, see PHP). +For more details about PHP verification, installation and configuration (PHP). {: .bs-callout .bs-callout-warning } In `php.ini` file, make sure `extension=php_openssl.dll` is not commented out. Note: The Windows environment is not officially supported. From 27b40a8c179f409d777024e6a1dbd3afe1241155 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Thu, 25 Jul 2019 14:26:47 -0500 Subject: [PATCH 03/14] Small fixes. --- guides/v2.2/contributor-guide/contributing.md | 1 - guides/v2.3/contributor-guide/contributing.md | 1 - 2 files changed, 2 deletions(-) diff --git a/guides/v2.2/contributor-guide/contributing.md b/guides/v2.2/contributor-guide/contributing.md index 174cd851ba2..446f5e93fa5 100644 --- a/guides/v2.2/contributor-guide/contributing.md +++ b/guides/v2.2/contributor-guide/contributing.md @@ -216,7 +216,6 @@ The command merges the listed related pull requests (`xxx`, `yyy`, `zzz`) into t - [Community Maintainers](https://github.com/orgs/magento/teams/open-source-maintainers/members) - [Magento EngCom Team](https://github.com/orgs/magento/teams/core-maintainers/members) - ## Porting code contributions across Magento versions {#porting} In order to keep consistency between Magento release lines (2.1, 2.2, 2.3, etc), there are two techniques of code delivery: back-port and/or up-port. Every Magento Contributor, who wants to deliver their solution across all Magento versions, faces the same problem. How do you port fixes easily? diff --git a/guides/v2.3/contributor-guide/contributing.md b/guides/v2.3/contributor-guide/contributing.md index 2972243af9c..a9bbdc16096 100644 --- a/guides/v2.3/contributor-guide/contributing.md +++ b/guides/v2.3/contributor-guide/contributing.md @@ -216,7 +216,6 @@ The command merges the listed related pull requests (`xxx`, `yyy`, `zzz`) into t - [Community Maintainers](https://github.com/orgs/magento/teams/open-source-maintainers/members) - [Magento EngCom Team](https://github.com/orgs/magento/teams/core-maintainers/members) - ## Porting code contributions across Magento versions {#porting} In order to keep consistency between Magento release lines (2.2, 2.3, etc), there are two techniques of code delivery: back-port and/or up-port. Every Magento Contributor, who wants to deliver their solution across all Magento versions, faces the same problem. How do you port fixes easily? From 6db1e2fa27d19535d4258b762a6bb1e8bc6a7992 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Tue, 30 Jul 2019 10:21:37 -0500 Subject: [PATCH 04/14] Update guides/v2.2/cloud/before/before-workspace-magento-prereqs.md Co-Authored-By: hguthrie --- guides/v2.2/cloud/before/before-workspace-magento-prereqs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md index 15dc4b1d6e3..34688f41a4e 100644 --- a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md +++ b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md @@ -46,7 +46,7 @@ Although {{ site.data.var.ee }} supports the Apache web server, {{ site.data.var ## PHP (local) {#php} -Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.2. +Install [PHP](https://glossary.magento.com/php) on your local. For information on installing PHP, see these instructions for [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). The following packages may also be helpful for your PHP installation: From 8cc884c924e094a143bd4f5ea0dcc2f431c44d3a Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Tue, 30 Jul 2019 11:33:50 -0500 Subject: [PATCH 05/14] Added innumberable codeblocks. Fixed redirect. --- .../project/project-conf-files_magento-app.md | 396 +++++++++--------- .../deployment/pipeline/build-system.md | 14 +- guides/v2.2/install-gde/install-quick-ref.md | 28 +- guides/v2.2/install-gde/prereq/apache.md | 64 ++- guides/v2.2/install-gde/prereq/nginx.md | 92 +++- guides/v2.2/install-gde/prereq/optional.md | 42 +- .../v2.2/install-gde/prereq/php-settings.md | 12 +- .../install-gde/prereq/prereq-overview.md | 28 +- guides/v2.2/install-gde/prereq/security.md | 4 + .../install-gde/trouble/php/tshoot_php-set.md | 7 +- .../before-workspace-magento-prereqs.md | 105 +++-- .../deployment/pipeline/build-system.md | 10 + guides/v2.3/install-gde/prereq/apache.md | 52 ++- .../install-gde/prereq/install-rabbitmq.md | 3 +- guides/v2.3/install-gde/prereq/mysql.md | 71 +++- .../v2.3/install-gde/prereq/mysql_remote.md | 30 +- guides/v2.3/install-gde/prereq/nginx.md | 82 +++- 17 files changed, 704 insertions(+), 336 deletions(-) diff --git a/guides/v2.2/cloud/project/project-conf-files_magento-app.md b/guides/v2.2/cloud/project/project-conf-files_magento-app.md index 7cc53c0bb92..0d6bf8f958d 100644 --- a/guides/v2.2/cloud/project/project-conf-files_magento-app.md +++ b/guides/v2.2/cloud/project/project-conf-files_magento-app.md @@ -39,33 +39,33 @@ The `build` property determines what happens by default when building the projec ```yaml build: - flavor: composer + flavor: composer ``` ### `access` The _access_ property indicates a minimum user role level that is allowed SSH access to the environments. The available user roles are: -- `admin`—Can change settings and execute actions in the environment. Also has _contributor_ and _viewer_ rights. -- `contributor`—Can push code to this environment and branch from the environment. Also has _viewer_ rights. -- `viewer`—Can view the environment only. +- `admin`—Can change settings and execute actions in the environment. Also has _contributor_ and _viewer_ rights. +- `contributor`—Can push code to this environment and branch from the environment. Also has _viewer_ rights. +- `viewer`—Can view the environment only. The default user role is `contributor`, which restricts the SSH access from users with only _viewer_ rights. You can change the user role to `viewer` to allow SSH access for users with only _viewer_ rights: ```yaml access: - ssh: viewer + ssh: viewer ``` ### `relationships` Defines the service mapping in your application. -The left-hand side is the name of the relationship as it will be exposed to the application in the `MAGENTO_CLOUD_RELATIONSHIPS` environment variable. The right-hand side is in the form `:`, where `` comes from `.magento/services.yaml` and `` should be the same as the value of `type` declared in that same file. +The left-hand side is the name of the relationship as it will be exposed to the application in the `MAGENTO_CLOUD_RELATIONSHIPS` environment variable. The right-hand side is in the form `:`, where `` comes from `.magento/services.yaml` and `` should be the same as the value of `type` declared in that same file. Example of valid options are: -```yaml +``` database: "mysql:mysql" database2: "mysql2:mysql" cache: "arediscache:redis" @@ -93,45 +93,45 @@ Contrary to standard `.htaccess` approaches that accept a _blacklist_ and allow Our default configuration allows the following: -- From the root (`/`) path, only web and media can be accessed -- From the `~/pub/static` and `~/pub/media` paths, any file can be accessed +- From the root (`/`) path, only web and media can be accessed +- From the `~/pub/static` and `~/pub/media` paths, any file can be accessed The following example shows the default configuration for a set of web-accessible locations associated with an entry in the [`mounts` property](#mounts): ```yaml # The configuration of app when it is exposed to the web. web: - locations: - "/": - # The public directory of the app, relative to its root. - root: "pub" - # The front-controller script to send non-static requests to. - passthru: "/index.php" - index: - - index.php - expires: -1 - scripts: true - allow: false - rules: - \.(css|js|map|hbs|gif|jpe?g|png|tiff|wbmp|ico|jng|bmp|svgz|midi?|mp?ga|mp2|mp3|m4a|ra|weba|3gpp?|mp4|mpe?g|mpe|ogv|mov|webm|flv|mng|asx|asf|wmv|avi|ogx|swf|jar|ttf|eot|woff|otf|html?)$: - allow: true - ^/sitemap(.*)\.xml$: - passthru: "/media/sitemap$1.xml" - "/media": - root: "pub/media" - allow: true - scripts: false - expires: 1y - passthru: "/get.php" - "/static": - root: "pub/static" - allow: true - scripts: false - expires: 1y - passthru: "/front-static.php" - rules: - ^/static/version\d+/(?.*)$: - passthru: "/static/$resource" + locations: + "/": + # The public directory of the app, relative to its root. + root: "pub" + # The front-controller script to send non-static requests to. + passthru: "/index.php" + index: + - index.php + expires: -1 + scripts: true + allow: false + rules: + \.(css|js|map|hbs|gif|jpe?g|png|tiff|wbmp|ico|jng|bmp|svgz|midi?|mp?ga|mp2|mp3|m4a|ra|weba|3gpp?|mp4|mpe?g|mpe|ogv|mov|webm|flv|mng|asx|asf|wmv|avi|ogx|swf|jar|ttf|eot|woff|otf|html?)$: + allow: true + ^/sitemap(.*)\.xml$: + passthru: "/media/sitemap$1.xml" + "/media": + root: "pub/media" + allow: true + scripts: false + expires: 1y + passthru: "/get.php" + "/static": + root: "pub/static" + allow: true + scripts: false + expires: 1y + passthru: "/front-static.php" + rules: + ^/static/version\d+/(?.*)$: + passthru: "/static/$resource" ``` @@ -153,20 +153,20 @@ An object whose keys are paths relative to the root of the application. The moun ```yaml # The mounts that will be performed when the package is deployed. mounts: - "var": "shared:files/var" - "app/etc": "shared:files/etc" - "pub/media": "shared:files/media" - "pub/static": "shared:files/static" + "var": "shared:files/var" + "app/etc": "shared:files/etc" + "pub/media": "shared:files/media" + "pub/static": "shared:files/static" ``` The format for adding your mount to this list is as follows: -```yaml +``` "/public/sites/default/files": "shared:files/files" ``` -- `shared`—Shares a volume between your applications inside an environment. -- `disk`—Defines the size available for the shared volume. +- `shared`—Shares a volume between your applications inside an environment. +- `disk`—Defines the size available for the shared volume. {:.bs-callout .bs-callout-warning} The subpath portion of the mount is the unique identifier of the files area. If changed, files at the old location will be permanently lost. Do not change this value once your site has data unless you really want to lose all existing data. @@ -180,15 +180,15 @@ Enables you to specify dependencies that your application might need during the {{site.data.var.ee}} supports dependencies on the following languages: -- PHP -- Ruby -- NodeJS +- PHP +- Ruby +- NodeJS Those dependencies are independent of the eventual dependencies of your application, and are available in the `PATH`, during the build process and in the runtime environment of your application. You can specify those dependencies as follows: -```yaml +``` ruby: sass: "~3.4" nodejs: @@ -199,42 +199,42 @@ nodejs: Use the `hooks` section to run shell commands during the build, deploy, and post-deploy phases: -- **`build`**—Execute commands _before_ packaging your application. Services, such as the database or Redis, are not available at this time since the application has not been deployed yet. You must add custom commands _before_ the default `php ./vendor/bin/ece-tools` command so that custom-generated content continues to the deployment phase. +- **`build`**—Execute commands _before_ packaging your application. Services, such as the database or Redis, are not available at this time since the application has not been deployed yet. You must add custom commands _before_ the default `php ./vendor/bin/ece-tools` command so that custom-generated content continues to the deployment phase. -- **`deploy`**—Execute commands _after_ packaging and deploying your application. You can access other services at this point. Since the default `php ./vendor/bin/ece-tools` command copies the `app/etc` directory to the correct location, you must add custom commands _after_ the deploy command to prevent custom commands from failing. +- **`deploy`**—Execute commands _after_ packaging and deploying your application. You can access other services at this point. Since the default `php ./vendor/bin/ece-tools` command copies the `app/etc` directory to the correct location, you must add custom commands _after_ the deploy command to prevent custom commands from failing. -- **`post_deploy`**—Execute commands _after_ deploying your application and _after_ the container begins accepting connections. The `post_deploy` hook clears the cache and preloads (warms) the cache. You can customize the list of pages using the `WARM_UP_PAGES` variable in the [Post-deploy stage]({{ page.baseurl }}/cloud/env/variables-post-deploy.html). It is available only for Pro projects that contain [Staging and Production environments in the Project Web UI]({{ page.baseurl }}/cloud/trouble/pro-env-management.html) and for Starter projects. Although not required, this works in tandem with the `SCD_ON_DEMAND` environment variable. +- **`post_deploy`**—Execute commands _after_ deploying your application and _after_ the container begins accepting connections. The `post_deploy` hook clears the cache and preloads (warms) the cache. You can customize the list of pages using the `WARM_UP_PAGES` variable in the [Post-deploy stage]({{ page.baseurl }}/cloud/env/variables-post-deploy.html). It is available only for Pro projects that contain [Staging and Production environments in the Project Web UI]({{ page.baseurl }}/cloud/trouble/pro-env-management.html) and for Starter projects. Although not required, this works in tandem with the `SCD_ON_DEMAND` environment variable. Add CLI commands under the `build`, `deploy`, or `post_deploy` sections _before_ the `ece-tools` command: ```yaml hooks: - # We run build hooks before your application has been packaged. - build: | - php ./vendor/bin/ece-tools build - # We run deploy hook after your application has been deployed and started. - deploy: | - php ./vendor/bin/ece-tools deploy - # We run post deploy hook to clean and warm the cache. Available with ECE-Tools 2002.0.10. - post_deploy: | - php ./vendor/bin/ece-tools post-deploy + # We run build hooks before your application has been packaged. + build: | + php ./vendor/bin/ece-tools build + # We run deploy hook after your application has been deployed and started. + deploy: | + php ./vendor/bin/ece-tools deploy + # We run post deploy hook to clean and warm the cache. Available with ECE-Tools 2002.0.10. + post_deploy: | + php ./vendor/bin/ece-tools post-deploy ``` Also, you can customize the build phase further by using the `generate` and `transfer` commands to perform additional actions when specifically building code or moving files. ```yaml hooks: - # We run build hooks before your application has been packaged. - build: | - set -e - php ./vendor/bin/ece-tools build:generate - # php /path/to/your/script - php ./vendor/bin/ece-tools build:transfer + # We run build hooks before your application has been packaged. + build: | + set -e + php ./vendor/bin/ece-tools build:generate + # php /path/to/your/script + php ./vendor/bin/ece-tools build:transfer ``` -- `set -e`—causes hooks to fail on the first failed command, instead of the final failed command. -- `build:generate`—applies patches, validates configuration, generates DI, and generates static content if SCD is enabled for build phase. -- `build:transfer`—transfers generated code and static content to the final destination. +- `set -e`—causes hooks to fail on the first failed command, instead of the final failed command. +- `build:generate`—applies patches, validates configuration, generates DI, and generates static content if SCD is enabled for build phase. +- `build:transfer`—transfers generated code and static content to the final destination. The commands run from the application (`/app`) directory. You can use the `cd` command to change the directory. The hooks fail if the final command in them fails. To cause them to fail on the first failed command, add `set -e` to the beginning of the hook. @@ -242,18 +242,18 @@ The commands run from the application (`/app`) directory. You can use the `cd` c ```yaml dependencies: - ruby: - sass: "3.4.7" - nodejs: - grunt-cli: "~0.1.13" + ruby: + sass: "3.4.7" + nodejs: + grunt-cli: "~0.1.13" hooks: - build: | - cd public/profiles/project_name/themes/custom/theme_name - npm install - grunt - cd - php ./vendor/bin/ece-tools + build: | + cd public/profiles/project_name/themes/custom/theme_name + npm install + grunt + cd + php ./vendor/bin/ece-tools ``` You must compile Sass files using `grunt` before static content deployment, which happens during the build. Place the `grunt` command before the `build` command. @@ -264,23 +264,23 @@ Describes processes that are triggered on a schedule. We recommend you run `cron `crons` support the following: -- `spec`—The cron specification. For Starter environments and Pro Integration environments, the minimum interval is once per five minutes and once per one minute in Pro Staging and Production environments. You need to complete [additional configurations]({{ page.baseurl }}/cloud/configure/setup-cron-jobs.html#add-cron) for crons in those environments. -- `cmd`—The command to execute. +- `spec`—The cron specification. For Starter environments and Pro Integration environments, the minimum interval is once per five minutes and once per one minute in Pro Staging and Production environments. You need to complete [additional configurations]({{ page.baseurl }}/cloud/configure/setup-cron-jobs.html#add-cron) for crons in those environments. +- `cmd`—The command to execute. A cron job is well suited for the following tasks: -- They need to happen on a fixed schedule, not continually. -- The task itself is not especially long, as a running cron job will block a new deployment. -- Or it is long, but can be easily divided into many small queued tasks. -- A delay between when a task is registered and when it actually happens is acceptable. +- They need to happen on a fixed schedule, not continually. +- The task itself is not especially long, as a running cron job will block a new deployment. +- Or it is long, but can be easily divided into many small queued tasks. +- A delay between when a task is registered and when it actually happens is acceptable. By default, every Cloud project has the following default crons configuration to run the default Magento cron jobs: ```yaml crons: - cronrun: - spec: "* * * * *" - cmd: "php bin/magento cron:run" + cronrun: + spec: "* * * * *" + cmd: "php bin/magento cron:run" ``` For {{site.data.var.ece}} 2.1.X, you can use only [workers](#workers) and [cron jobs](#crons). For {{site.data.var.ece}} 2.2.X, cron jobs launch consumers to process batches of messages, and do not require additional configuration. @@ -293,17 +293,17 @@ The following environment variables are included in `.magento.app.yaml`. These a ```yaml variables: - env: - CONFIG__DEFAULT__PAYPAL_ONBOARDING__MIDDLEMAN_DOMAIN: 'payment-broker.magento.com' - CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL: 'Magento_Enterprise_Cloud_BT' - CONFIG__STORES__DEFAULT__PAYPAL__NOTATION_CODE: 'Magento_Enterprise_Cloud' + env: + CONFIG__DEFAULT__PAYPAL_ONBOARDING__MIDDLEMAN_DOMAIN: 'payment-broker.magento.com' + CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL: 'Magento_Enterprise_Cloud_BT' + CONFIG__STORES__DEFAULT__PAYPAL__NOTATION_CODE: 'Magento_Enterprise_Cloud' ``` ## Configure PHP options You can choose which version of PHP to run in your `.magento.app.yaml` file: -```yaml +``` name: mymagento type: php:7.1 ``` @@ -315,19 +315,19 @@ type: php:7.1 You can enable additional PHP extensions in the `runtime:extension` section. Also, the extensions specified become available in the Docker PHP containers. -`.magento.app.yaml` +> .magento.app.yaml ```yaml runtime: - extensions: - - sockets - - sodium - - ssh2 - disabled_extensions: - - bcmath - - bz2 - - calendar - - exif + extensions: + - sockets + - sodium + - ssh2 + disabled_extensions: + - bcmath + - bz2 + - calendar + - exif ``` #### To view the current list of PHP extensions: @@ -342,93 +342,93 @@ For details about a specific PHP extension, see the [PHP Extension List](https:/ {{site.data.var.ece}} supports the following extensions: -- Default extensions: - - `bcmath` - - `bz2` - - `calendar` - - `exif` - - `gd` - - `gettext` - - `intl` - - `mysqli` - - `pcntl` - - `pdo_mysql` - - `soap` - - `sockets` - - `sysvmsg` - - `sysvsem` - - `sysvshm` - - `opcache` - - `zip` - -- Extensions that are installed and cannot be uninstalled: - - `ctype` - - `curl` - - `date` - - `dom` - - `fileinfo` - - `filter` - - `ftp` - - `hash` - - `iconv` - - `json` - - `mbstring` - - `mysqlnd` - - `openssl` - - `pcre` - - `pdo` - - `pdo_sqlite` - - `phar` - - `posix` - - `readline` - - `session` - - `sqlite3` - - `tokenizer` - - `xml` - - `xmlreader` - - `xmlwriter` - -- Extensions that can be installed and uninstalled as needed: - - `bcmath` - - `bz2` - - `calendar` - - `exif` - - `gd` - - `geoip` - - `gettext` - - `gmp` - - `igbinary` - - `imagick` - - `imap` - - `intl` - - `ldap` - - `mailparse` - - `mcrypt` - - `msgpack` - - `mysqli` - - `oauth` - - `opcache` - - `pdo_mysql` - - `propro` - - `pspell` - - `raphf` - - `recode` - - `redis` - - `shmop` - - `soap` - - `sockets` - - `sodium` - - `ssh2` - - `sysvmsg` - - `sysvsem` - - `sysvshm` - - `tidy` - - `xdebug` - - `xmlrpc` - - `xsl` - - `yaml` - - `zip` - - `pcntl` +- Default extensions: + - `bcmath` + - `bz2` + - `calendar` + - `exif` + - `gd` + - `gettext` + - `intl` + - `mysqli` + - `pcntl` + - `pdo_mysql` + - `soap` + - `sockets` + - `sysvmsg` + - `sysvsem` + - `sysvshm` + - `opcache` + - `zip` + +- Extensions that are installed and cannot be uninstalled: + - `ctype` + - `curl` + - `date` + - `dom` + - `fileinfo` + - `filter` + - `ftp` + - `hash` + - `iconv` + - `json` + - `mbstring` + - `mysqlnd` + - `openssl` + - `pcre` + - `pdo` + - `pdo_sqlite` + - `phar` + - `posix` + - `readline` + - `session` + - `sqlite3` + - `tokenizer` + - `xml` + - `xmlreader` + - `xmlwriter` + +- Extensions that can be installed and uninstalled as needed: + - `bcmath` + - `bz2` + - `calendar` + - `exif` + - `gd` + - `geoip` + - `gettext` + - `gmp` + - `igbinary` + - `imagick` + - `imap` + - `intl` + - `ldap` + - `mailparse` + - `mcrypt` + - `msgpack` + - `mysqli` + - `oauth` + - `opcache` + - `pdo_mysql` + - `propro` + - `pspell` + - `raphf` + - `recode` + - `redis` + - `shmop` + - `soap` + - `sockets` + - `sodium` + - `ssh2` + - `sysvmsg` + - `sysvsem` + - `sysvshm` + - `tidy` + - `xdebug` + - `xmlrpc` + - `xsl` + - `yaml` + - `zip` + - `pcntl` {: .bs-callout-warning} PHP compiled with debug is not supported and the Probe may conflict with XDebug or XHProf. Disable those extensions when enabling the Probe. The Probe conflicts with some PHP extensions like Pinba or IonCube. @@ -481,11 +481,11 @@ A basic, common worker configuration could look like this: ``` workers: - queue: - size: S - commands: - start: | - php worker.php + queue: + size: S + commands: + start: | + php worker.php ``` This example defines a single worker named queue, with a "small" container, and runs the command `php worker.php` on startup. If `worker.php` exits, it is automatically restarted. diff --git a/guides/v2.2/config-guide/deployment/pipeline/build-system.md b/guides/v2.2/config-guide/deployment/pipeline/build-system.md index 78c6b418464..257faf652c6 100644 --- a/guides/v2.2/config-guide/deployment/pipeline/build-system.md +++ b/guides/v2.2/config-guide/deployment/pipeline/build-system.md @@ -53,18 +53,28 @@ To set up the build system: If you use Git, use the following command: - git clone [-b ] + ```bash + git clone [-b ] + ``` + 1. Change to the Magento root directory and enter: + ```bash composer install + ``` + 1. Wait for Magento dependencies to update. 1. Set ownership: + ```bash chown -R : . + ``` For example, + ```bash chown -R magento_user:apache . + ``` 1. If you use Git, open `.gitignore` in a text editor. 1. Start each of the following lines with a `#` character to comment them out: @@ -81,7 +91,9 @@ To set up the build system: 1. Save your changes to `.gitignore` and exit the text editor. 1. If you use Git, use the following commands to commit the change: + ```bash git add .gitignore && git commit -m "Modify .gitignore for build and production" + ``` See the [`.gitignore` reference]({{ page.baseurl }}/config-guide/prod/config-reference-gitignore.html) for more information. diff --git a/guides/v2.2/install-gde/install-quick-ref.md b/guides/v2.2/install-gde/install-quick-ref.md index 873fe6886d9..dda1ff1c035 100644 --- a/guides/v2.2/install-gde/install-quick-ref.md +++ b/guides/v2.2/install-gde/install-quick-ref.md @@ -54,8 +54,10 @@ If not, see the [Installation overview]({{ page.baseurl }}/install-gde/bk-instal When all prerequisites have been met, get the Magento software using [Composer](https://glossary.magento.com/composer) as follows: - cd - composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento2 +```bash +cd +composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento2 +``` You are required to authenticate; see [Get your authentication keys]({{ page.baseurl }}/install-gde/prereq/connect-auth.html) for details. This downloads Magento code only; it doesn't install the software for you. @@ -92,16 +94,20 @@ The following example shows how to install using the command line with the follo * Default currency is U.S. dollars * Default time zone is U.S. Central (America/Chicago) - php /var/www/html/magento2/bin/magento setup:install --base-url=http://192.0.2.5/magento2/ \ - --db-host=localhost --db-name=magento --db-user=magento --db-password=magento \ - --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \ - --admin-user=admin --admin-password=admin123 --language=en_US \ - --currency=USD --timezone=America/Chicago --use-rewrites=1 + ```bash + php /var/www/html/magento2/bin/magento setup:install --base-url=http://192.0.2.5/magento2/ \ + --db-host=localhost --db-name=magento --db-user=magento --db-password=magento \ + --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \ + --admin-user=admin --admin-password=admin123 --language=en_US \ + --currency=USD --timezone=America/Chicago --use-rewrites=1 + ``` Optionally switch to [developer mode]({{ page.baseurl }}/config-guide/cli/config-cli-subcommands-mode.html). - cd /bin - php magento deploy:mode:set developer +```bash +cd /bin +php magento deploy:mode:set developer +``` {% endcollapsible %} @@ -130,7 +136,9 @@ To run the Web Setup Wizard: 1. Enter the following URL in your browser's address or location field: - http://192.0.2.5/magento2/setup + ```bash + http://192.0.2.5/magento2/setup + `` 1. At the welcome page, click **Agree and Setup Magento**. diff --git a/guides/v2.2/install-gde/prereq/apache.md b/guides/v2.2/install-gde/prereq/apache.md index b51eeebc6ff..2858a32c662 100644 --- a/guides/v2.2/install-gde/prereq/apache.md +++ b/guides/v2.2/install-gde/prereq/apache.md @@ -42,14 +42,18 @@ Failure to enable these settings typically results in no styles displaying on yo ## Verify the Apache version {#install-prereq-apache-verify} -To verify the Apache version you're currently running, enter: +To verify the Apache version you are currently running, enter: - apache2 -v +```bash +apache2 -v +``` The result displays similar to the following: - Server version: Apache/2.2.22 (Ubuntu) - Server built: Jul 22 2014 14:35:32 +```terminal +Server version: Apache/2.2.22 (Ubuntu) +Server built: Jul 22 2014 14:35:32 +``` * If Apache is *not* installed, see: * [Installing or upgrading Apache on Ubuntu](#install-prereq-apache-ubuntu) @@ -69,16 +73,22 @@ To install the default version of Apache (Ubuntu 14, 16—Apache 2.4, Ubuntu 1. Install Apache + ```bash apt-get -y install apache2 + ``` 2. Verify the installation. + ```bash apache2 -v + ``` The result displays similar to the following: + ```terminal Server version: Apache/2.4.18 (Ubuntu) Server built: 2016-04-15T18:00:57 + ``` 3. Enable rewrites and `.htaccess` as discussed in the following sections. @@ -97,31 +107,39 @@ To install the default version of Apache (Ubuntu 14, 16—Apache 2.4, Ubuntu ### Upgrading Apache on Ubuntu 12 {#install-prereq-apache-ubuntu-upgrade} {% collapsible Click to show/hide content %} -To use PHP 5.6 on Ubuntu 12, you must upgrade Apache to version 2.4. (By default, Ubuntu 12 comes with Apache 2.2.) +To use PHP 5.6 on Ubuntu 12, you must upgrade Apache to version 2.4. (By default, Ubuntu 12 comes with Apache 2.2., which is EOL) To upgrade to Apache 2.4: 1. Add the `ppa:ondrej` repository, which has Apache 2.4: + ```bash apt-get -y update apt-add-repository ppa:ondrej/apache2 apt-get -y update + ``` 2. Install Apache 2.4: + ```bash apt-get install -y apache2 + ``` {:.bs-callout .bs-callout-info} If the `apt-get install` command fails because of unmet dependencies, consult a resource like [http://askubuntu.com](http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa){:target="_blank"}. 3. Verify the installation. + ```bash apache2 -v + ``` Messages similar to the following should display: + ```terminal Server version: Apache/2.4.10 (Ubuntu) Server built: Jul 22 2014 22:46:25 + ``` 4. Continue with the next section. @@ -144,18 +162,24 @@ Installing and configuring Apache is basically a three-step process: install the ### Installing Apache {#apache-install-centos} -1. Install Apache 2 if you haven't already done so. +1. Install Apache 2.4 if you haven't already done so. + ```bash yum -y install httpd + ``` 2. Verify the installation: + ```bash httpd -v + ``` Messages similar to the following display to confirm the installation was successful: + ```terminal Server version: Apache/2.2.15 (Unix) Server built: Oct 16 2014 14:48:21 + ``` 3. Continue with the next section. @@ -186,12 +210,14 @@ To enable website visitors to access your site, use one of the [Require directiv For example: - - Options Indexes FollowSymLinks MultiViews - AllowOverride - Order allow,deny - Require all granted - +```apache + + Options Indexes FollowSymLinks MultiViews + AllowOverride + Order allow,deny + Require all granted + +``` {:.bs-callout .bs-callout-info} The preceding values for `Order` might not work in all cases. For more information, see the [Apache documentation](https://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#order){:target="_blank"}. @@ -202,12 +228,14 @@ To enable website visitors to access your site, use the [Allow directive](http:/ For example: - - Options Indexes FollowSymLinks MultiViews - AllowOverride - Order allow,deny - Allow from all - +```apache + + Options Indexes FollowSymLinks MultiViews + AllowOverride + Order allow,deny + Allow from all + +``` {:.bs-callout .bs-callout-info} The preceding values for `Order` might not work in all cases. For more information, see the [Apache documentation](https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order){:target="_blank"}. diff --git a/guides/v2.2/install-gde/prereq/nginx.md b/guides/v2.2/install-gde/prereq/nginx.md index bd9dc844a7b..7d03f7b356b 100644 --- a/guides/v2.2/install-gde/prereq/nginx.md +++ b/guides/v2.2/install-gde/prereq/nginx.md @@ -32,7 +32,9 @@ The following section describes how to install Magento 2.x on Ubuntu 16 using ng ### Install nginx - apt-get -y install nginx +```bash +apt-get -y install nginx +``` After completing the following sections and [installing Magento]({{ page.baseurl }}/install-gde/prereq/nginx.html#install-magento2-ubuntu), we'll use a sample configuration file to [configure nginx]({{ page.baseurl }}/install-gde/prereq/nginx.html#configure-nginx-ubuntu). @@ -44,21 +46,27 @@ To install and configure `php-fpm`: 1. Install `php-fpm` and `php-cli`: + ```bash apt-get -y install php7.2-fpm php7.2-cli + ``` {:.bs-callout .bs-callout-info} This command installs the latest available version of PHP 7.2.X. See [Magento 2.2.x technology stack requirements]({{ page.baseurl }}/install-gde/system-requirements-tech.html) for supported PHP versions. 2. Open the `php.ini` files in an editor: + ```bash vim /etc/php/7.2/fpm/php.ini vim /etc/php/7.2/cli/php.ini + ``` 3. Edit both files to match the following lines: + ```nginx memory_limit = 2G max_execution_time = 1800 zlib.output_compression = On + ``` {:.bs-callout .bs-callout-info} We recommend setting the memory limit to 2G when testing Magento. Refer to [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html) for more information. @@ -67,7 +75,9 @@ To install and configure `php-fpm`: 5. Restart the `php-fpm` service: + ```bash systemctl restart php7.2-fpm + ``` ### Install and configure MySQL @@ -90,11 +100,15 @@ You cannot use the Web Setup Wizard when installing Magento on nginx. You must u 1. Change to the web server docroot directory or a directory that you have configured as a virtual host docroot. For this example, we're using the Ubuntu default `/var/www/html`. + ```bash cd /var/www/html + ``` 1. Install Composer globally. You'll need Composer to update dependencies before installing Magento: + ```bash curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer + ``` 1. Create a new Composer project using the {{site.data.var.ce}} or {{site.data.var.ee}} metapackage. @@ -158,10 +172,13 @@ These instructions assume you're using the Ubuntu default location for the nginx 1. Create a new virtual host for your Magento site: + ```bash vim /etc/nginx/sites-available/magento + ``` 2. Add the following configuration: + ```nginx upstream fastcgi_backend { server unix:/run/php/php7.0-fpm.sock; } @@ -173,6 +190,7 @@ These instructions assume you're using the Ubuntu default location for the nginx set $MAGE_ROOT /var/www/html/magento2; include /var/www/html/magento2/nginx.conf.sample; } + ``` {:.bs-callout .bs-callout-info} The `include` directive must point to the sample nginx configuration file in your Magento installation directory. @@ -183,15 +201,21 @@ These instructions assume you're using the Ubuntu default location for the nginx 5. Activate the newly created virtual host by creating a symlink to it in the `/etc/nginx/sites-enabled` directory: + ```bash ln -s /etc/nginx/sites-available/magento /etc/nginx/sites-enabled + ``` 6. Verify that the syntax is correct: + ```bash nginx -t + ``` 7. Restart nginx: + ```bash systemctl restart nginx + ``` ### Verify the installation @@ -203,13 +227,17 @@ The following section describes how to install Magento 2.x on CentOS 7 using ngi ### Install nginx - yum -y install epel-release - yum -y install nginx +```bash +yum -y install epel-release +yum -y install nginx +``` After installation is complete, start nginx and configure it to start at boot time: - systemctl start nginx - systemctl enable nginx +```bash +systemctl start nginx +systemctl enable nginx +``` After completing the following sections and [installing Magento]({{ page.baseurl }}/install-gde/prereq/nginx.html#install-magento2-centos), we'll use a sample configuration file to [configure nginx]({{ page.baseurl }}/install-gde/prereq/nginx.html#configure-nginx-centos). @@ -219,7 +247,9 @@ Magento requires several [PHP extensions]({{ page.baseurl }}/install-gde/prereq/ 1. Install `php-fpm`: + ```bash yum -y install php70w-fpm + ``` 2. Open the `/etc/php.ini` file in an editor. @@ -227,16 +257,20 @@ Magento requires several [PHP extensions]({{ page.baseurl }}/install-gde/prereq/ 4. Edit the file to match the following lines: + ```nginx memory_limit = 2G max_execution_time = 1800 zlib.output_compression = On + ``` {:.bs-callout .bs-callout-info} We recommend setting the memory limit to 2G when testing Magento. Refer to [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html) for more information. 5. Uncomment the session path directory and set the path: + ```nginx session.save_path = "/var/lib/php/session" + ``` 6. Save and exit the editor. @@ -244,41 +278,53 @@ Magento requires several [PHP extensions]({{ page.baseurl }}/install-gde/prereq/ 8. Edit the file to match the following lines: + ```nginx user = nginx group = nginx listen = /run/php-fpm/php-fpm.sock listen.owner = nginx listen.group = nginx listen.mode = 0660 + ``` 9. Uncomment the environment lines: + ```nginx env[HOSTNAME] = $HOSTNAME env[PATH] = /usr/local/bin:/usr/bin:/bin env[TMP] = /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp + ``` 10. Save and exit the editor. 11. Create a new directory for the PHP session path and change the owner to the `apache` user and group: + ```bash mkdir -p /var/lib/php/session/ chown -R apache:apache /var/lib/php/ + ``` 12. Create a new directory for the PHP session path and change the owner to the `apache` user and group: + ```bash mkdir -p /run/php-fpm/ chown -R apache:apache /run/php-fpm/ + ``` 13. Start the `php-fpm` service and configure it to start at boot time: + ```bash systemctl start php-fpm systemctl enable php-fpm + ``` 14. Verify that the `php-fpm` service is running: + ```bash netstat -pl | grep php-fpm.sock + ``` ### Install and configure MySQL @@ -296,41 +342,53 @@ For this example, we'll download and extract an archive. 1. Change to the web server docroot directory, or to a directory you’ve configured as a virtual host docroot. For this example, we're using the CentoOS default `/usr/share/nginx/html`. + ```bash cd /usr/share/nginx/html + ``` 2. Download the Magento archive, extract it, and rename the folder `magento2/`: + ```bash wget https://github.com/magento/magento2/archive/2.2.tar.gz tar -xzvf 2.2.tar.gz mv magento2-2.2/ magento2/ + ``` 3. [Set directory ownership and file permissions]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html). + ```bash cd /usr/share/nginx/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 + ``` 4. Install Composer globally. You'll need Composer to update dependencies before installing Magento: + ```bash curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer + ``` 5. Update Magento dependencies: + ```bash cd /usr/share/nginx/html/magento2 composer install + ``` 6. If prompted, enter your [Magento authentication keys]({{ page.baseurl }}/install-gde/prereq/connect-auth.html). 7. Install Magento from the [command line]({{ page.baseurl }}/install-gde/install/cli/install-cli.html). + ```bash cd /usr/share/nginx/html/magento2/bin ./magento setup:install --base-url=http://www.magento-dev.com/ \ --db-host=localhost --db-name=magento --db-user=magento --db-password=magento \ --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \ --admin-user=admin --admin-password=admin123 --language=en_US \ --currency=USD --timezone=America/Chicago --use-rewrites=1 + ``` Replace `http://www.magento-dev.com` with your domain name. @@ -339,8 +397,10 @@ For this example, we'll download and extract an archive. 8. Switch Magento to developer mode: + ```bash cd /usr/share/nginx/html/magento2/bin ./magento deploy:mode:set developer + ``` ### Configure nginx {#configure-nginx-centos} @@ -350,10 +410,13 @@ These instructions assume you're using the CentOS default location for the nginx 1. Create a new virtual host for your Magento site: + ```bash vim /etc/nginx/conf.d/magento.conf + ``` 2. Add the following configuration: + ```nginx upstream fastcgi_backend { server unix:/run/php-fpm/php-fpm.sock; } @@ -365,6 +428,7 @@ These instructions assume you're using the CentOS default location for the nginx set $MAGE_ROOT /usr/share/nginx/html/magento2; include /usr/share/nginx/html/magento2/nginx.conf.sample; } + ``` {:.bs-callout .bs-callout-info} The `include` directive must point to the sample nginx configuration file in your Magento installation directory. @@ -375,46 +439,62 @@ These instructions assume you're using the CentOS default location for the nginx 5. Verify that the syntax is correct: + ```bash nginx -t + ``` 6. Restart nginx: + ```bash systemctl restart nginx + ``` ### Configure SELinux and Firewalld SELinux is enabled by default on CentOS 7. Use the following command to see if it is running: - sestatus +```bash +sestatus +``` To configure SELinux and firewalld: 1. Install SELinux management tools: + ```bash yum -y install policycoreutils-python + ``` 2. Run the following commands to change the security context for the Magento installation directory: + ```bash semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/app/etc(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/var(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/media(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/static(/.*)?' restorecon -Rv '/usr/share/nginx/html/magento2/' + ``` 3. Install the firewalld package: + ```bash yum -y install firewalld + ``` 4. Start the firewall service and configure it to start at boot time: + ```bash systemctl start firewalld systemctl enable firewalld + ``` 5. Run the following commands to open ports for HTTP and HTTPS so you can access the Magento base URL from a web browser: + ```bash firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=https firewall-cmd --reload + ``` ### Verify the installation diff --git a/guides/v2.2/install-gde/prereq/optional.md b/guides/v2.2/install-gde/prereq/optional.md index 27cb13e30b8..78426e5e11c 100644 --- a/guides/v2.2/install-gde/prereq/optional.md +++ b/guides/v2.2/install-gde/prereq/optional.md @@ -31,7 +31,9 @@ See one of the following sections: Enter the following command to install NTP: - apt-get install ntp +```bash +apt-get install ntp +``` Continue with [Use NTP pool servers](#install-optional-ntp-servers) @@ -41,17 +43,23 @@ To install and configure NTP: 1. Enter the following command to find the appropriate NTP software: + ```bash yum search ntp + ``` 2. Select a package to install. For example, `ntp.x86_64`. 2. Install the package. + ```bash yum -y install ntp.x86_64 + ``` 3. Enter the following command so that NTP starts when the server starts. + ```bash chkconfig ntpd on + ``` 3. Continue with the next section. @@ -63,17 +71,21 @@ Selecting pool servers is up to you. If you use NTP pool servers, ntp.org recomm 2. Look for lines similar to the following: + ```apache server 0.centos.pool.ntp.org server 1.centos.pool.ntp.org server 2.centos.pool.ntp.org + ``` 3. Replace those lines or add additional lines that specify your NTP pool server or other NTP servers. It's a good idea to specify more than one. 4. An example of using three United States-based NTP servers follows: + ```apache server 0.us.pool.ntp.org server 1.us.pool.ntp.org server 2.us.pool.ntp.org + ``` 5. Save your changes to `/etc/ntp.conf` and exit the text editor. @@ -98,16 +110,20 @@ Selecting pool servers is up to you. If you use NTP pool servers, ntp.org recomm Use `phpinfo.php` in a development system _only_. It can be a security issue in production. Add the following code anywhere in your web server's docroot: - - /phpinfo.php +```html +http:///phpinfo.php +``` If a 404 (Not Found) error displays, check the following: @@ -134,13 +150,17 @@ To install phpmyadmin on Ubuntu: 1. Use the following command: + ```bash apt-get install phpmyadmin + ``` 2. Follow the prompts on your screen to complete the installation. 3. To use phpmyadmin, enter the following URL in your browser's address or location field: + ````html http:///phpmyadmin + ``` 4. When prompted, log in using your MySQL database `root` or administrative user's username and password. @@ -150,19 +170,25 @@ To install phpmyadmin on CentOS: 1. Download the epel RPM for the version of CentOS you're using. A sample follows. + ```bash cd /tmp wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm + ``` 2. Install `phpmyadmin` as follows: + ```bash yum -y install phpmyadmin + ``` 3. Authorize access to phpmyadmin from your machine's IP address. Open the following file for editing: + ```bash vim /etc/httpd/conf.d/phpMyAdmin.conf + ``` 3. Replace the following IP address with your IP address @@ -184,11 +210,15 @@ To install phpmyadmin on CentOS: 6. Restart Apache. + ```bash service httpd Restart + ``` 7. To use phpmyadmin, enter the following command in your browser's address or location field: + ```html http:///phpmyadmin + ``` 8. When prompted, log in using your MySQL database `root` or administrative user's username and password. diff --git a/guides/v2.2/install-gde/prereq/php-settings.md b/guides/v2.2/install-gde/prereq/php-settings.md index 30fcef514f5..a426429f43b 100644 --- a/guides/v2.2/install-gde/prereq/php-settings.md +++ b/guides/v2.2/install-gde/prereq/php-settings.md @@ -11,8 +11,6 @@ functional_areas: - System - Setup redirect_from: - - /guides/v2.2/install-gde/prereq/php-settings.html - - /guides/v2.2/install-gde/prereq/php-settings.html - /guides/v2.2/install-gde/prereq/php-settings-ubuntu.html --- @@ -80,7 +78,9 @@ The `bcmath` extension is required for {{site.data.var.ee}} only. - Set the system time zone for PHP; otherwise, errors like the following display during the installation and time-related operations like cron might not work: + ```terminal PHP Warning: date(): It is not safe to rely on the system's timezone settings. [more messages follow] + ``` - Set [`always_populate_raw_post_data = -1`](http://php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data){:target="_blank"} @@ -91,8 +91,10 @@ The `bcmath` extension is required for {{site.data.var.ee}} only. Our detailed recommendations are: - Compiling code or deploying static assets, `756M` + - Installing and updating Magento components from Magento Marketplace, `2G` - Testing, `2G` + - Disable [`asp_tags`](http://php.net/manual/en/ini.core.php#ini.asp-tags){:target="_blank"} If `asp_tags are` enabled, errors display when accessing PHTML templates. @@ -161,7 +163,9 @@ If you have more than one `opcache.ini`, modify all of them. 1. Locate your server's time zone in the available [time zone settings](http://php.net/manual/en/timezones.php){:target="_blank"} 1. Locate the following setting and uncomment it if necessary: + ```php date.timezone = + ``` 1. Add the time zone setting you found in step 2. 1. Change the value of `memory_limit` to one of the values at the beginning of this section. @@ -170,11 +174,15 @@ If you have more than one `opcache.ini`, modify all of them. 1. _Required for PHP 5.6, recommended for PHP 5.5_. Locate `always_populate_raw_post_data`, uncomment it if necessary, and set it as follows: + ```php always_populate_raw_post_data = -1 + ``` 1. Locate the following setting: + ```php asp_tags = + ``` 1. Make sure its value is set to `Off`. 1. Save your changes and exit the text editor. diff --git a/guides/v2.2/install-gde/prereq/prereq-overview.md b/guides/v2.2/install-gde/prereq/prereq-overview.md index f932b928f37..45b651819ff 100644 --- a/guides/v2.2/install-gde/prereq/prereq-overview.md +++ b/guides/v2.2/install-gde/prereq/prereq-overview.md @@ -32,13 +32,17 @@ Enter the following commands as a user with `root` privileges: * Ubuntu + ```bash apt-get update apt-get upgrade + ``` * CentOS + ```bash yum -y update yum -y upgrade + ``` ## Prerequisite check {#instgde-prereq-check} @@ -54,8 +58,10 @@ Ubuntu: `apache2 -v` as the following result indicates: - Server version: Apache/2.4.1 (Unix) - Server built: Jul 23 2017 14:17:29 +```terminal +Server version: Apache/2.4.1 (Unix) +Server built: Jul 23 2017 14:17:29 +``` To install or upgrade Apache, see [Apache]({{ page.baseurl }}/install-gde/prereq/apache.html). @@ -71,24 +77,29 @@ To check your PHP version, in the command line, enter: The result will be similar to: ```terminal - PHP 7.2.8-2 ( NTS ) - Copyright (c) 1997-2018 The PHP Group - Zend Engine v3.0.0, Copyright (c) 1998-2018 Zend Technologies - with Zend OPcache v7.0.8-2, Copyright (c) 1999-2018, by Zend Technologies +PHP 7.2.8-2 ( NTS ) +Copyright (c) 1997-2018 The PHP Group +Zend Engine v3.0.0, Copyright (c) 1998-2018 Zend Technologies + with Zend OPcache v7.0.8-2, Copyright (c) 1999-2018, by Zend Technologies ``` To install PHP, see [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html). ### MySQL - mysql -u -p +```bash +mysql -u -p +``` For example: - mysql -u magento -p +```bash +mysql -u magento -p +``` You must run MySQL version 5.6 or later as the following result indicates: + ```terminal Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 871 Server version: 5.6.21 MySQL Community Server (GPL) @@ -100,6 +111,7 @@ You must run MySQL version 5.6 or later as the following result indicates: owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + ``` Enter `exit` at the `mysql>` prompt to exit. diff --git a/guides/v2.2/install-gde/prereq/security.md b/guides/v2.2/install-gde/prereq/security.md index 8b225a10f86..0bcac2de04b 100644 --- a/guides/v2.2/install-gde/prereq/security.md +++ b/guides/v2.2/install-gde/prereq/security.md @@ -20,10 +20,12 @@ functional_areas: If you choose to enable SELinux, you might have issues running the installer unless you change the *security context* of some directories as follows: +```bash chcon -R --type httpd_sys_rw_content_t /app/etc chcon -R --type httpd_sys_rw_content_t /var chcon -R --type httpd_sys_rw_content_t /pub/media chcon -R --type httpd_sys_rw_content_t /pub/static +``` The preceding commands work only with the Apache web server. Because of the variety of configurations and security requirements, we don't guarantee these commands work in all situations. For more information, see: @@ -38,7 +40,9 @@ To enable Apache to initiate a connection to another host with SELinux enabled: 1. To determine if SELinux is enabled, use the following command: + ```bash getenforce + ``` `Enforcing` displays to confirm that SELinux is running. diff --git a/guides/v2.2/install-gde/trouble/php/tshoot_php-set.md b/guides/v2.2/install-gde/trouble/php/tshoot_php-set.md index aa7007262c1..67d78abc2ef 100644 --- a/guides/v2.2/install-gde/trouble/php/tshoot_php-set.md +++ b/guides/v2.2/install-gde/trouble/php/tshoot_php-set.md @@ -20,7 +20,10 @@ To increase your PHP memory limit: 1. Log in to your Magento server. 1. Locate your `php.ini` file using the following command: + ```bash php --ini + ``` + 1. As a user with `root` privileges, use a text editor to open the `php.ini` specified by `Loaded Configuration File`. 1. Locate `memory_limit`. 1. Change it to a value of `2GB` for normal use and debugging. @@ -54,7 +57,9 @@ See [During installation, xdebug maximum function nesting level error]({{ page.b Error text is typically: - Parse error: syntax error, unexpected 'data' (T_STRING) +```php +Parse error: syntax error, unexpected 'data' (T_STRING) +``` ### Solution: Set asp_tags = off in php.ini diff --git a/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md b/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md index 6337d8e5a81..085405640fa 100644 --- a/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md +++ b/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md @@ -10,8 +10,7 @@ functional_areas: - Configuration --- -## Previous step: - +#### Previous step: [Prepare for local environment setup]({{ page.baseurl }}/cloud/before/before-workspace.html) Install the following software packages and tools on your local to prepare for Magento code development. If you already have these packages installed, check for any recommendations or notes and continue to the next step. @@ -37,9 +36,9 @@ When using Vagrant, we also recommend the package [hostmanager](https://github.c ## Development tools {#devtools} * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Provides code branching and management for accessing {{site.data.var.ee}} and your code repositories. Use Git command-line commands or applications of your choice to work with Git. You can install this on your local VM or on your host. - For more information, see [How Cloud uses Git]({{ page.baseurl }}/cloud/reference/git-integration.html). + For more information, see [How Cloud uses Git]({{ page.baseurl }}/cloud/reference/git-integration.html). * [Composer](https://getcomposer.org/download/) - Used for dependency management. Composer enables us to manage the Magento components and their dependencies. Install on your local VM. - For more information, see [How Cloud uses Composer]({{ page.baseurl }}/cloud/reference/cloud-composer.html). + For more information, see [How Cloud uses Composer]({{ page.baseurl }}/cloud/reference/cloud-composer.html). ## Web server (local) {#webserver} @@ -47,7 +46,7 @@ We strongly recommend installing [Nginx]({{ page.baseurl }}/install-gde/prereq/n ## PHP (local) {#php} -Install [PHP](https://glossary.magento.com/php) on your local machine. For information on installing PHP, see [PHP](../../../v2.3/install-gde/prereq/php-settings.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). +Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.1.3+ or 7.2. For information on installing PHP on CentOS and Ubuntu see [PHP](../../../v2.3/install-gde/prereq/php-centos-ubuntu.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). The following packages may also be helpful for your PHP installation: @@ -72,20 +71,20 @@ To set `memory_limit`: Before working with your {{site.data.var.ece}} project, make sure you set the PHP `memory_limit` to at least `1G` for normal use or at least `2G` for debugging. -1. Find your `php.ini` file using the following command: +1. Find your `php.ini` file using the following command: - php --ini + php --ini - Use the value of `Loaded Configuration File`. -1. As a user with `root` privileges, open `php.ini` in a text editor. -1. Change the value of `memory_limit` to at least `1G` for normal use or at least `2G` for debugging. -1. Save your changes to `php.ini` and exit the text editor. -1. Restart your web server: + Use the value of `Loaded Configuration File`. +2. As a user with `root` privileges, open `php.ini` in a text editor. +3. Change the value of `memory_limit` to at least `1G` for normal use or at least `2G` for debugging. +4. Save your changes to `php.ini` and exit the text editor. +5. Restart your web server: - * Apache: - * CentOS: `service httpd restart` - * Ubuntu: `service apache2 restart` - * Nginx: `service nginx restart` + * Apache: + * CentOS: `service httpd restart` + * Ubuntu: `service apache2 restart` + * Nginx: `service nginx restart` ## Database (local) {#database} @@ -100,28 +99,27 @@ These example instructions detail how to install and create a MariaDB database f 1. Use this command to create the database: - apt-get install mariadb-server - -1. Secure the database with the following command and completing all prompts: + apt-get install mariadb-server +2. Secure the database with the following command and completing all prompts: - mysql_secure_installation -1. Access the MariaDB database. -1. Grant all privileges to the Magento account you created for the local: + mysql_secure_installation +3. Access the MariaDB database. +4. Grant all privileges to the Magento account you created for the local: - grant all privileges on to ''@'localhost' identified by ''; -1. Finally create the database: + grant all privileges on to ''@'localhost' identified by ''; +5. Finally create the database: - create database magento; - use magento; -1. Exit when done. + create database magento; + use magento; +6. Exit when done. ### Pro: Set up the auto-increment for MariaDB {#cloud-mysql} You need to set an auto-increment value for the MariaDB installation. -1. As a user with `root` privileges, open `/etc/mysql/mariadb.conf.d/50-server.cnf` in a text editor. -1. In the Basic Settings section, add `auto_increment_increment = 3`. -1. Restart the service: `service mysql restart`. +1. As a user with `root` privileges, open `/etc/mysql/mariadb.conf.d/50-server.cnf` in a text editor. +2. In the Basic Settings section, add `auto_increment_increment = 3`. +3. Restart the service: `service mysql restart`. ### Pro: Set up the auto-increment for MySQL {#cloud-mysql} @@ -131,24 +129,24 @@ To avoid issues, we recommend you set `auto_increment_increment=3`. First, view the current value and verify if it is set to 3: - mysqladmin variables -u -p | grep 'auto_increment' + mysqladmin variables -u -p | grep 'auto_increment' If necessary, set `auto_increment_increment` to 3: -1. As a user with `root` privileges, open `/etc/my.cnf` in a text editor. +1. As a user with `root` privileges, open `/etc/my.cnf` in a text editor. - {:.bs-callout .bs-callout-info } - On Ubuntu 16, the path is typically `/etc/mysql/mysql.conf.d/mysqld.cnf`. + {:.bs-callout .bs-callout-info } + On Ubuntu 16, the path is typically `/etc/mysql/mysql.conf.d/mysqld.cnf`. -1. Add or edit the following line in the `[mysqld]` section: +2. Add or edit the following line in the `[mysqld]` section: - auto_increment_increment=3 + auto_increment_increment=3 - {{site.data.var.ece}} supports a High Availability configuration. This setting increments the database IDs in increments of three to ensure row uniqueness for Galera databases on each of the three HA nodes in production. + {{site.data.var.ece}} supports a High Availability configuration. This setting increments the database IDs in increments of three to ensure row uniqueness for Galera databases on each of the three HA nodes in production. -1. Restart MySQL: +3. Restart MySQL: - service mysqld restart + service mysqld restart ## Magento Cloud CLI (local) {#cloud-ssh-cli-cli-install} @@ -158,31 +156,31 @@ These instructions discuss installation using commands for a Unix environment. F To install the Magento Cloud CLI: -1. Log in to your local development machine or switch to the [Magento file system owner]({{ page.baseurl }}/cloud/before/before-workspace-file-sys-owner.html). +1. Log in to your local development machine or switch to the [Magento file system owner]({{ page.baseurl }}/cloud/before/before-workspace-file-sys-owner.html). -1. Change to a directory to which the [Magento file system owner](https://glossary.magento.com/magento-file-system-owner) has write access, such as the home directory. +2. Change to a directory to which the [Magento file system owner](https://glossary.magento.com/magento-file-system-owner) has write access, such as the home directory. -1. Enter the following command: +3. Enter the following command: - curl -sS https://accounts.magento.cloud/cli/installer | php + curl -sS https://accounts.magento.cloud/cli/installer | php -1. After the CLI downloads, an operating system-specific command displays. +4. After the CLI downloads, an operating system-specific command displays. - For example, on Ubuntu and CentOS, the command is similar to: + For example, on Ubuntu and CentOS, the command is similar to: - source $HOME/.bashrc + source $HOME/.bashrc - For more information about the user shell profile, see [.bash_profile vs .bashrc](https://apple.stackexchange.com/questions/51036/what-is-the-difference-between-bash-profile-and-bashrc) + For more information about the user shell profile, see [.bash_profile vs .bashrc](https://apple.stackexchange.com/questions/51036/what-is-the-difference-between-bash-profile-and-bashrc) - You can also add the `$HOME/.magento-cloud/bin` to the Magento user's `PATH`: + You can also add the `$HOME/.magento-cloud/bin` to the Magento user's `PATH`: - export PATH=$PATH:$HOME/.magento-cloud/bin + export PATH=$PATH:$HOME/.magento-cloud/bin - Consult operating system documentation for details. + Consult operating system documentation for details. -1. Verify the `magento-cloud` command is in your path by entering the following command: +5. Verify the `magento-cloud` command is in your path by entering the following command: - magento-cloud list + magento-cloud list ## Additional requirements for Magento Commerce {#commerce} @@ -195,6 +193,5 @@ The requirements listed in this topic are specific to {{site.data.var.ece}} envi You can also install additional [optional software]({{ page.baseurl }}/install-gde/prereq/optional.html). These packages should be installed on the local VM. -## Next step - +#### Next step: [Enable SSH keys]({{ page.baseurl }}/cloud/before/before-workspace-ssh.html) diff --git a/guides/v2.3/config-guide/deployment/pipeline/build-system.md b/guides/v2.3/config-guide/deployment/pipeline/build-system.md index 18e695ea4e1..552c90111ea 100644 --- a/guides/v2.3/config-guide/deployment/pipeline/build-system.md +++ b/guides/v2.3/config-guide/deployment/pipeline/build-system.md @@ -52,20 +52,28 @@ To set up the build system: If you use Git, use the following command: + ```bash git clone [-b ] + ``` 1. Change to the Magento root directory and enter: + ```bash composer install + ``` 1. Wait for Magento dependencies to update. 1. Set ownership: + ```bash chown -R : . + ``` For example, + ```bash chown -R magento_user:apache . + ``` 1. If you use Git, open `.gitignore` in a text editor. 1. Start each of the following lines with a `#` character to comment them out: @@ -82,7 +90,9 @@ To set up the build system: 1. Save your changes to `.gitignore` and exit the text editor. 1. If you use Git, use the following commands to commit the change: + ```bash git add .gitignore && git commit -m "Modify .gitignore for build and production" + ``` See the [`.gitignore` reference][] for more information. diff --git a/guides/v2.3/install-gde/prereq/apache.md b/guides/v2.3/install-gde/prereq/apache.md index 7a69c5f9236..29e4d3ed11e 100644 --- a/guides/v2.3/install-gde/prereq/apache.md +++ b/guides/v2.3/install-gde/prereq/apache.md @@ -44,7 +44,9 @@ Failure to enable these settings typically results in no styles displaying on yo To verify the Apache version you're currently running, enter: - apache2 -v +```bash +apache2 -v +``` The result displays similar to the following: @@ -72,16 +74,22 @@ To install the default version of Apache (Ubuntu 14, 16—Apache 2.4, Ubuntu 1. Install Apache + ```bash apt-get -y install apache2 + ``` 1. Verify the installation. + ```bash apache2 -v + ``` The result displays similar to the following: + ```terminal Server version: Apache/2.4.18 (Ubuntu) Server built: 2016-04-15T18:00:57 + ``` 1. Enable rewrites and `.htaccess` as discussed in the following sections. @@ -109,25 +117,33 @@ To upgrade to Apache 2.4: 1. Add the `ppa:ondrej` repository, which has Apache 2.4: + ```bash apt-get -y update apt-add-repository ppa:ondrej/apache2 apt-get -y update + ``` 1. Install Apache 2.4: + ```bash apt-get install -y apache2 + ``` {:.bs-callout .bs-callout-info} If the 'apt-get install' command fails because of unmet dependencies, consult a resource like [http://askubuntu.com](http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa){:target="_blank"}. 1. Verify the installation. + ```bash apache2 -v + ``` Messages similar to the following should display: + ```terminal Server version: Apache/2.4.10 (Ubuntu) Server built: Jul 22 2014 22:46:25 + ``` 1. Continue with the next section. @@ -153,16 +169,22 @@ Installing and configuring Apache is basically a three-step process: install the 1. Install Apache 2.4 if you haven't already done so. + ```bash yum -y install httpd + ``` 1. Verify the installation: + ```bash httpd -v + ``` Messages similar to the following display to confirm the installation was successful: + ```terminal Server version: Apache/2.4.0 (Unix) Server built: Oct 16 2017 14:48:21 + ``` 1. Continue with the next section. @@ -194,12 +216,14 @@ To enable website visitors to access your site, use one of the [Require directiv For example: - - Options Indexes FollowSymLinks MultiViews - AllowOverride - Order allow,deny - Require all granted - +```apache + + Options Indexes FollowSymLinks MultiViews + AllowOverride + Order allow,deny + Require all granted + +``` {:.bs-callout .bs-callout-info} The preceding values for `Order` might not work in all cases. For more information, see the [Apache documentation](https://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#order){:target="_blank"}. @@ -210,12 +234,14 @@ To enable website visitors to access your site, use the [Allow directive](http:/ For example: - - Options Indexes FollowSymLinks MultiViews - AllowOverride - Order allow,deny - Allow from all - +```apache + + Options Indexes FollowSymLinks MultiViews + AllowOverride + Order allow,deny + Allow from all + +``` {:.bs-callout .bs-callout-info} The preceding values for `Order` might not work in all cases. For more information, see the [Apache documentation](https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order){:target="_blank"}. diff --git a/guides/v2.3/install-gde/prereq/install-rabbitmq.md b/guides/v2.3/install-gde/prereq/install-rabbitmq.md index 6b8c9e8e773..726336be4d0 100644 --- a/guides/v2.3/install-gde/prereq/install-rabbitmq.md +++ b/guides/v2.3/install-gde/prereq/install-rabbitmq.md @@ -52,6 +52,7 @@ RabbitMQ was written using the Erlang programming language, which must be instal See [Manual installation](https://www.erlang-solutions.com/resources/download.html){:target="_blank"} for more information. Run the following commands to install this feature. + ```bash wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm ``` @@ -108,7 +109,7 @@ where: To configure support for SSL, edit the `ssl` and `ssl_options` parameters in the `/app/etc/env.php` file so that they are similar to the following: -```php?start_inline=1 +```php 'queue' => array ( diff --git a/guides/v2.3/install-gde/prereq/mysql.md b/guides/v2.3/install-gde/prereq/mysql.md index 4d92dafdb00..8bb5b4158f4 100644 --- a/guides/v2.3/install-gde/prereq/mysql.md +++ b/guides/v2.3/install-gde/prereq/mysql.md @@ -51,22 +51,31 @@ To install MySQL 5.7 on Ubuntu 16: 1. Enter this command: + ```bash sudo apt install -y mysql-server mysql-client + ``` 2. Start MySQL: + ```bash sudo service mysql start + ``` 3. Secure the installation: + ```bash sudo mysql_secure_installation + ``` 4. Test the installation: + ```bash mysql -u root -p + ``` Sample output: + ```terminal Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 45 Server version: 5.6.19-0ubuntu0.14.04.1 (Ubuntu) @@ -80,6 +89,7 @@ To install MySQL 5.7 on Ubuntu 16: Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> + ``` 1. If you expect to import large numbers of products into Magento, you can increase the value for [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} that is larger than the default, 16MB. @@ -93,22 +103,31 @@ To install MySQL 5.6 on Ubuntu 14: 1. Enter this command: + ```bash apt-get -y install mysql-server-5.6 mysql-client-5.6 + ``` 2. Start MySQL: + ```bash sudo service mysql start + ``` 3. Secure the installation: + ```bash mysql_secure_installation + ``` 4. Test the installation by entering the following command: + ```bash mysql -u root -p + ``` Sample output: + ```terminal Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 45 Server version: 5.6.19-0ubuntu0.14.04.1 (Ubuntu) @@ -122,6 +141,7 @@ To install MySQL 5.6 on Ubuntu 14: Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> + ``` 1. If you expect to import large numbers of products into Magento, you can increase the value for [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} that is larger than the default, 16MB. @@ -135,25 +155,34 @@ To install MySQL 5.6 on Ubuntu 12, use the following instructions from [askubunt 1. Enter the following commands in the order shown: + ```bash apt-get -y update apt-add-repository ppa:ondrej/mysql-5.6 apt-get -y update apt-get -y install mysql-server + ``` 2. Start MySQL: + ```bash sudo service mysql start + ``` 3. Secure the installation: + ```bash mysql_secure_installation + ``` 4. Test the installation: + ```bash mysql -u root -p + ``` Messages similar to the following display: + ```terminal Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 43 Server version: 5.6.21-1+deb.sury.org~precise+1 (Ubuntu) @@ -167,6 +196,7 @@ To install MySQL 5.6 on Ubuntu 12, use the following instructions from [askubunt Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> + ``` 1. If you expect to import large numbers of products into Magento, you can increase the value for [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} that is larger than the default, 16MB. @@ -187,8 +217,10 @@ The following procedure is based on [How to Install Latest MySQL 5.7.9 on RHEL/C As a user with `root` privileges, enter the following commands in the order shown: - wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm - yum -y localinstall mysql57-community-release-el7-7.noarch.rpm +```bash +wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm +yum -y localinstall mysql57-community-release-el7-7.noarch.rpm +``` Continue with [Install and configure MySQL 5.7 on CentOS 6 or 7](#mysql57-centos-config). @@ -198,8 +230,10 @@ The following procedure is based on [How to Install Latest MySQL 5.7.9 on RHEL/C As a user with `root` privileges, enter the following commands in the order shown: - wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm - yum -y localinstall mysql57-community-release-el6-7.noarch.rpm +```bash +wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm +yum -y localinstall mysql57-community-release-el6-7.noarch.rpm +``` Continue with the next section. @@ -207,23 +241,34 @@ Continue with the next section. 1. Enter the following commands in the order shown: + ```bash yum -y install mysql-community-server service mysqld start + ``` 2. Verify the version: + ```bash mysql --version + ``` Sample output follows: + ```terminal mysql Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using EditLine wrapper + ``` 1. Get the temporary database `root` user password: + ```bash grep 'temporary password' /var/log/mysqld.log + ``` + 1. Secure the installation: + ```bash mysql_secure_installation + ``` Follow the prompts on your screen to set a new password and configure other options. 5. Configure MySQL 5.7 as discussed in [Configuring the Magento database instance](#instgde-prereq-mysql-config). @@ -234,30 +279,41 @@ The following procedure is based on [Install MySQL Server 5.6 in CentOS 6.x and 1. *CentOS 6* Install the MySQL database: + ```bash yum -y update sudo wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm && sudo rpm -ivh mysql-community-release-el6-5.noarch.rpm sudo yum -y install mysql-server + ``` 1. *CentOS 7* Install the MySQL database: + ```bash yum -y update sudo wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm sudo yum -y install mysql-server + ``` 1.Start MySQL: + ```bash service mysqld start + ``` 1. Set a password for the root user and set other security-related options. Enter the following command and follow the prompts on your screen to complete the configuration: + ```bash mysql_secure_installation + ``` 1. Verify the MySQL server version: + ```bash mysql -u root -p + ``` Messages similar to the following display: + ```terminal Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 Server version: 5.6.23 MySQL Community Server (GPL) @@ -269,6 +325,7 @@ The following procedure is based on [Install MySQL Server 5.6 in CentOS 6.x and owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + ``` 1. If you expect to import large numbers of products into Magento, you can configure MySQL to use the [`max_allowed_packet`](http://dev.mysql.com/doc/refman/5.6/en/program-variables.html){:target="_blank"} parameter. We recommend a value of at least 16MB. @@ -285,21 +342,27 @@ To configure a MySQL database instance: 1. Log in to your database server as any user. 1. Get to a MySQL command prompt: + ```bash mysql -u root -p + ``` 1. Enter the MySQL `root` user's password when prompted. 1. Enter the following commands in the order shown to create a database instance named `magento` with username `magento`: + ```sql create database magento; create user magento IDENTIFIED BY 'magento'; GRANT ALL ON magento.* TO magento@localhost IDENTIFIED BY 'magento'; flush privileges; + ``` 1. Enter `exit` to quit the command prompt. 1. Verify the database: + ```bash mysql -u magento -p + ``` If the MySQL monitor displays, you created the database properly. If an error displays, repeat the preceding commands. diff --git a/guides/v2.3/install-gde/prereq/mysql_remote.md b/guides/v2.3/install-gde/prereq/mysql_remote.md index 8887d00306b..b21f9be09cc 100644 --- a/guides/v2.3/install-gde/prereq/mysql_remote.md +++ b/guides/v2.3/install-gde/prereq/mysql_remote.md @@ -46,12 +46,16 @@ To create a remote connection: To locate it, enter the following command: + ```bash mysql --help + ``` The location displays similar to the following: + ```terminal Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf + ``` {:.bs-callout .bs-callout-info} On Ubuntu 16, the path is typically `/etc/mysql/mysql.conf.d/mysqld.cnf`. @@ -88,11 +92,15 @@ To grant access to a database user: 1. Connect to the MySQL database as the `root` user. 1. Enter the following command: + ```sql GRANT ALL ON .* TO @ IDENTIFIED BY ''; + ``` For example, + ```sql GRANT ALL ON magento_remote.* TO dbuser@192.0.2.50 IDENTIFIED BY 'dbuserpassword'; + ``` {:.bs-callout .bs-callout-info} If your web server is clustered, enter the same command on every web server. You must use the same username for every web server. @@ -101,21 +109,25 @@ If your web server is clustered, enter the same command on every web server. You On your web node host, enter the following command to verify the connection works: - mysql -u -h -p +```bash +mysql -u -h -p +``` If the MySQL monitor displays as follows, the database is ready for the Magento software: - Welcome to the MySQL monitor. Commands end with ; or \g. - Your MySQL connection id is 213 - Server version: 5.6.26 MySQL Community Server (GPL) +```terminal +Welcome to the MySQL monitor. Commands end with ; or \g. +Your MySQL connection id is 213 +Server version: 5.6.26 MySQL Community Server (GPL) - Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. - Oracle is a registered trademark of Oracle Corporation and/or its - affiliates. Other names may be trademarks of their respective - owners. +Oracle is a registered trademark of Oracle Corporation and/or its +affiliates. Other names may be trademarks of their respective +owners. - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. +``` If your web server is clustered, enter the command on each web server host. diff --git a/guides/v2.3/install-gde/prereq/nginx.md b/guides/v2.3/install-gde/prereq/nginx.md index 3b3f61ec058..1e83a38d19b 100644 --- a/guides/v2.3/install-gde/prereq/nginx.md +++ b/guides/v2.3/install-gde/prereq/nginx.md @@ -43,21 +43,27 @@ To install and configure `php-fpm`: 1. Install `php-fpm` and `php-cli`: + ```bash apt-get -y install php7.2-fpm php7.2-cli + ``` {:.bs-callout .bs-callout-info} This command installs the latest available version of PHP 7.2.X. See [Magento 2.3.x technology stack requirements]({{ page.baseurl }}/install-gde/system-requirements-tech.html) for supported PHP versions. 1. Open the `php.ini` files in an editor: + ```bash vim /etc/php/7.2/fpm/php.ini vim /etc/php/7.2/cli/php.ini + ``` 1. Edit both files to match the following lines: + ```nginx memory_limit = 2G max_execution_time = 1800 zlib.output_compression = On + ``` {:.bs-callout .bs-callout-info} We recommend setting the memory limit to 2G when testing Magento. Refer to [Required PHP settings]({{page.baseurl }}/install-gde/prereq/php-settings.html) for more information. @@ -66,7 +72,9 @@ We recommend setting the memory limit to 2G when testing Magento. Refer to [Requ 1. Restart the `php-fpm` service: + ```bash systemctl restart php7.2-fpm + ``` ### Install and configure MySQL @@ -91,11 +99,15 @@ You cannot use the Web Setup Wizard when installing Magento on nginx. You must u 1. Change to the web server docroot directory or a directory that you have configured as a virtual host docroot. For this example, we're using the Ubuntu default `/var/www/html`. + ```bash cd /var/www/html + ``` 1. Install Composer globally. You'll need Composer to update dependencies before installing Magento: + ```bash curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer + ``` 1. Create a new Composer project using the {{site.data.var.ce}} or {{site.data.var.ee}} metapackage. @@ -146,8 +158,10 @@ You cannot use the Web Setup Wizard when installing Magento on nginx. You must u 1. Switch to developer mode: + ```bash cd /var/www/html/magento2/bin ./magento deploy:mode:set developer + ``` ### Configure nginx {#configure-nginx-ubuntu} @@ -157,10 +171,13 @@ These instructions assume you're using the Ubuntu default location for the nginx 1. Create a new virtual host for your Magento site: + ```bash vim /etc/nginx/sites-available/magento + ``` 2. Add the following configuration: + ```nginx upstream fastcgi_backend { server unix:/run/php/php7.2-fpm.sock; } @@ -172,6 +189,7 @@ These instructions assume you're using the Ubuntu default location for the nginx set $MAGE_ROOT /var/www/html/magento2; include /var/www/html/magento2/nginx.conf.sample; } + ``` {:.bs-callout .bs-callout-info} The `include` directive must point to the sample nginx configuration file in your Magento installation directory. @@ -182,15 +200,21 @@ The `include` directive must point to the sample nginx configuration file in you 1. Activate the newly created virtual host by creating a symlink to it in the `/etc/nginx/sites-enabled` directory: + ```bash ln -s /etc/nginx/sites-available/magento /etc/nginx/sites-enabled + ``` 1. Verify that the syntax is correct: + ```bash nginx -t + ``` 1. Restart nginx: + ```bash systemctl restart nginx + ``` ### Verify the installation @@ -202,13 +226,17 @@ The following section describes how to install Magento 2.x on CentOS 7 using ngi ### Install nginx - yum -y install epel-release - yum -y install nginx +```bash +yum -y install epel-release +yum -y install nginx +``` After installation is complete, start nginx and configure it to start at boot time: - systemctl start nginx - systemctl enable nginx +```bash +systemctl start nginx +systemctl enable nginx +``` After completing the following sections and [installing Magento]({{page.baseurl }}/install-gde/prereq/nginx.html#install-magento2-centos), we'll use a sample configuration file to [configure nginx]({{page.baseurl }}/install-gde/prereq/nginx.html#configure-nginx-centos). @@ -218,7 +246,9 @@ Magento requires several [PHP](php-settings.html) extensions to function properl 1. Install `php-fpm`: + ```bash yum -y install php70w-fpm + ``` 1. Open the `/etc/php.ini` file in an editor. @@ -226,16 +256,20 @@ Magento requires several [PHP](php-settings.html) extensions to function properl 1. Edit the file to match the following lines: + ```nginx memory_limit = 2G max_execution_time = 1800 zlib.output_compression = On + ``` {:.bs-callout .bs-callout-info} We recommend setting the memory limit to 2G when testing Magento. Refer to [Required PHP settings]({{page.baseurl }}/install-gde/prereq/php-settings.html) for more information. 1. Uncomment the session path directory and set the path: + ```nginx session.save_path = "/var/lib/php/session" + ``` 1. Save and exit the editor. @@ -243,41 +277,53 @@ We recommend setting the memory limit to 2G when testing Magento. Refer to [Requ 1. Edit the file to match the following lines: + ```nginx user = nginx group = nginx listen = /run/php-fpm/php-fpm.sock listen.owner = nginx listen.group = nginx listen.mode = 0660 + ``` 1. Uncomment the environment lines: + ```nginx env[HOSTNAME] = $HOSTNAME env[PATH] = /usr/local/bin:/usr/bin:/bin env[TMP] = /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp + ``` 1. Save and exit the editor. 1. Create a new directory for the PHP session path and change the owner to the `apache` user and group: + ```bash mkdir -p /var/lib/php/session/ chown -R apache:apache /var/lib/php/ + ``` 1. Create a new directory for the PHP session path and change the owner to the `apache` user and group: + ```bash mkdir -p /run/php-fpm/ chown -R apache:apache /run/php-fpm/ + ``` 1. Start the `php-fpm` service and configure it to start at boot time: + ```bash systemctl start php-fpm systemctl enable php-fpm + ``` 1. Verify that the `php-fpm` service is running: + ```bash netstat -pl | grep php-fpm.sock + ``` ### Install and configure MySQL @@ -302,11 +348,15 @@ You cannot use the Web Setup Wizard when installing Magento on nginx. You must u 1. Change to the web server docroot directory or a directory that you have configured as a virtual host docroot. For this example, we're using the Ubuntu default `/var/www/html`. + ```bash cd /var/www/html + ``` 1. Install Composer globally. You'll need Composer to update dependencies before installing Magento: + ```bash curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer + ``` 1. Create a new Composer project using the {{site.data.var.ce}} or {{site.data.var.ee}} metapackage. @@ -357,8 +407,10 @@ You cannot use the Web Setup Wizard when installing Magento on nginx. You must u 1. Switch to developer mode: + ```bash cd /var/www/html/magento2/bin ./magento deploy:mode:set developer + ``` ### Configure nginx {#configure-nginx-centos} @@ -368,10 +420,13 @@ These instructions assume you're using the CentOS default location for the nginx 1. Create a new virtual host for your Magento site: + ```bash vim /etc/nginx/conf.d/magento.conf + ``` 1. Add the following configuration: + ```nginx upstream fastcgi_backend { server unix:/run/php-fpm/php-fpm.sock; } @@ -383,6 +438,7 @@ These instructions assume you're using the CentOS default location for the nginx set $MAGE_ROOT /usr/share/nginx/html/magento2; include /usr/share/nginx/html/magento2/nginx.conf.sample; } + ``` {:.bs-callout .bs-callout-info} The `include` directive must point to the sample nginx configuration file in your Magento installation directory. @@ -393,46 +449,62 @@ The `include` directive must point to the sample nginx configuration file in you 1. Verify that the syntax is correct: + ```bash nginx -t + ``` 1. Restart nginx: + ```bash systemctl restart nginx + ``` ### Configure SELinux and Firewalld SELinux is enabled by default on CentOS 7. Use the following command to see if it's running: - sestatus +```bash +sestatus +``` To configure SELinux and firewalld: 1. Install SELinux management tools: + ```bash yum -y install policycoreutils-python + ``` 1. Run the following commands to change the security context for the Magento installation directory: + ```bash semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/app/etc(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/var(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/media(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/magento2/pub/static(/.*)?' restorecon -Rv '/usr/share/nginx/html/magento2/' + ``` 1. Install the firewalld package: + ```bash yum -y install firewalld + ``` 1. Start the firewall service and configure it to start at boot time: + ```bash systemctl start firewalld systemctl enable firewalld + ``` 1. Run the following commands to open ports for HTTP and HTTPS so you can access the Magento base URL from a web browser: + ```bash firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=https firewall-cmd --reload + ``` ### Verify the installation From 4ae4c5850057a39afa43268f1f1f7ede159dc312 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Tue, 30 Jul 2019 11:34:28 -0500 Subject: [PATCH 06/14] Update guides/v2.2/install-gde/prereq/php-settings.md Co-Authored-By: Jeff Matthews --- guides/v2.2/install-gde/prereq/php-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/v2.2/install-gde/prereq/php-settings.md b/guides/v2.2/install-gde/prereq/php-settings.md index a426429f43b..5549bd88a06 100644 --- a/guides/v2.2/install-gde/prereq/php-settings.md +++ b/guides/v2.2/install-gde/prereq/php-settings.md @@ -17,7 +17,7 @@ redirect_from: This topic discusses how to set required [PHP](https://glossary.magento.com/php) options. {:.bs-callout .bs-callout-info} -All 3rd party libraries now support PHP 7.2. +All third-party libraries now support PHP 7.2. If you are interested in participating in Magento Community projects we welcome your help! See our [ZenHub board](https://app.zenhub.com/workspace/o/magento-engcom/php-7.2-support/boards?repos=116423356,116426364,115111902) for a full list of outstanding issues. {% include install/php-versions-template.md %} From bac1cc55f792ff9b505a4011cc6917caf72374de Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Tue, 30 Jul 2019 11:39:59 -0500 Subject: [PATCH 07/14] Code block --- guides/v2.2/comp-mgr/trouble/cman/out-of-memory.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/guides/v2.2/comp-mgr/trouble/cman/out-of-memory.md b/guides/v2.2/comp-mgr/trouble/cman/out-of-memory.md index e51c70ed83c..29b309942cd 100644 --- a/guides/v2.2/comp-mgr/trouble/cman/out-of-memory.md +++ b/guides/v2.2/comp-mgr/trouble/cman/out-of-memory.md @@ -15,9 +15,11 @@ You may encounter an error, caused by your system running out of physical memory When installing or updating the Magento application or components like extensions, themes, or language packages, an error similar to the following displays: - Could not complete update {"components":[ - {"name":"magento/module-bundle-sample-data","version":"100.1.0"} - ]} successfully: proc_open(): fork failed - Cannot allocate memory +```terminal +Could not complete update {"components":[ +{"name":"magento/module-bundle-sample-data","version":"100.1.0"} +]} successfully: proc_open(): fork failed - Cannot allocate memory +``` The error `proc_open(): fork failed - Cannot allocate memory` can also display on the command line. @@ -29,7 +31,7 @@ We recommend you allocate 2GB of memory to [PHP](https://glossary.magento.com/ph First, make sure you allocated [2GB of memory to PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html); otherwise, your installation or upgrade might still run out of memory. -If you've already done that, create a swap file on your machine. A Linux machine uses *swap space* if it needs more memory resources and the RAM is full. The swap space is used for inactive pages in memory. +If you have already done that, create a swap file on your machine. A Linux machine uses *swap space* if it needs more memory resources and the RAM is full. The swap space is used for inactive pages in memory. The following are suggestions only; other options might be available. Consult a network administrator or another knowledgeable resource before you continue. You must run the commands to create a swap file as a user with `root` privileges. From 709fbda60266b01a42c6efa85c4360d26778518b Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Tue, 30 Jul 2019 11:42:41 -0500 Subject: [PATCH 08/14] Code fence --- guides/v2.3/install-gde/prereq/security.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/guides/v2.3/install-gde/prereq/security.md b/guides/v2.3/install-gde/prereq/security.md index 3781008601b..26138fcda38 100644 --- a/guides/v2.3/install-gde/prereq/security.md +++ b/guides/v2.3/install-gde/prereq/security.md @@ -21,10 +21,12 @@ Magento has no recommendation about using SELinux; you can use it for enhanced s If you choose to enable SELinux, you might have issues running the installer unless you change the *security context* of some directories as follows: - chcon -R --type httpd_sys_rw_content_t /app/etc - chcon -R --type httpd_sys_rw_content_t /var - chcon -R --type httpd_sys_rw_content_t /pub/media - chcon -R --type httpd_sys_rw_content_t /pub/static +```bash +chcon -R --type httpd_sys_rw_content_t /app/etc +chcon -R --type httpd_sys_rw_content_t /var +chcon -R --type httpd_sys_rw_content_t /pub/media +chcon -R --type httpd_sys_rw_content_t /pub/static +``` The preceding commands work only with the Apache web server. Because of the variety of configurations and security requirements, we do not guarantee these commands work in all situations. For more information, see: @@ -39,7 +41,9 @@ To enable Apache to initiate a connection to another host with SELinux enabled: 1. To determine if SELinux is enabled, use the following command: + ```bash getenforce + ``` `Enforcing` displays to confirm that SELinux is running. From ce855def3d3f05e5b0141b93baf3f3a1501d6d24 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Tue, 30 Jul 2019 11:45:00 -0500 Subject: [PATCH 09/14] remove cloud topic --- guides/v2.2/cloud/before/before-workspace-magento-prereqs.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md index 34688f41a4e..ad1b0db56dd 100644 --- a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md +++ b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md @@ -46,8 +46,7 @@ Although {{ site.data.var.ee }} supports the Apache web server, {{ site.data.var ## PHP (local) {#php} -Install [PHP](https://glossary.magento.com/php) on your local. -For information on installing PHP, see these instructions for [PHP]({{ page.baseurl }}/install-gde/prereq/php-settings.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). +Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.0. For information on installing PHP, see these instructions for [CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) and [Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). The following packages may also be helpful for your PHP installation: From 17a6bb294ee07a8548bf6910640e99eca3ede4ab Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Wed, 31 Jul 2019 11:15:01 -0500 Subject: [PATCH 10/14] Removed recursive redirects. --- guides/v2.3/install-gde/prereq/php-settings.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/guides/v2.3/install-gde/prereq/php-settings.md b/guides/v2.3/install-gde/prereq/php-settings.md index 7a676c8365f..1f4da8beec5 100644 --- a/guides/v2.3/install-gde/prereq/php-settings.md +++ b/guides/v2.3/install-gde/prereq/php-settings.md @@ -6,8 +6,6 @@ functional_areas: - System - Setup redirect_from: - - /guides/v2.3/install-gde/prereq/php-settings.html - - /guides/v2.3/install-gde/prereq/php-settings.html - /guides/v2.3/install-gde/prereq/php-settings-ubuntu.html --- From 64fb3e1f9ee8e58cce43dd338f0dbecb06e22ab2 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Wed, 31 Jul 2019 11:36:11 -0500 Subject: [PATCH 11/14] Fixed broken data links. --- guides/v2.2/install-gde/prereq/php-settings.md | 1 + guides/v2.3/install-gde/prereq/php-settings.md | 1 + 2 files changed, 2 insertions(+) diff --git a/guides/v2.2/install-gde/prereq/php-settings.md b/guides/v2.2/install-gde/prereq/php-settings.md index 5549bd88a06..c94b73bbdb7 100644 --- a/guides/v2.2/install-gde/prereq/php-settings.md +++ b/guides/v2.2/install-gde/prereq/php-settings.md @@ -20,6 +20,7 @@ This topic discusses how to set required [PHP](https://glossary.magento.com/php) All third-party libraries now support PHP 7.2. If you are interested in participating in Magento Community projects we welcome your help! See our [ZenHub board](https://app.zenhub.com/workspace/o/magento-engcom/php-7.2-support/boards?repos=116423356,116426364,115111902) for a full list of outstanding issues. + {% include install/php-versions-template.md %} Magento 2.2.10 supports PHP 7.2. diff --git a/guides/v2.3/install-gde/prereq/php-settings.md b/guides/v2.3/install-gde/prereq/php-settings.md index 1f4da8beec5..7a689ea5f04 100644 --- a/guides/v2.3/install-gde/prereq/php-settings.md +++ b/guides/v2.3/install-gde/prereq/php-settings.md @@ -15,6 +15,7 @@ This topic discusses how to set required [PHP](https://glossary.magento.com/php) All 3rd party libraries now support PHP 7.2. If you are interested in participating in Magento Community projects we welcome your help! See our [ZenHub board](https://app.zenhub.com/workspace/o/magento-engcom/php-7.2-support/boards?repos=116423356,116426364,115111902) for a full list of outstanding issues. + {% include install/php-versions-template.md %} Magento 2.3.3 supports PHP 7.3. From c7b660af676c0a7d32243d2dfa2abc2a53daf947 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Wed, 31 Jul 2019 16:00:53 -0500 Subject: [PATCH 12/14] Fixed up broken links. --- guides/v2.2/cloud/before/before-workspace-magento-prereqs.md | 2 +- guides/v2.3/cloud/before/before-workspace-magento-prereqs.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md index ad1b0db56dd..5b3b793fdad 100644 --- a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md +++ b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md @@ -46,7 +46,7 @@ Although {{ site.data.var.ee }} supports the Apache web server, {{ site.data.var ## PHP (local) {#php} -Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.0. For information on installing PHP, see these instructions for [CentOS]({{ page.baseurl }}/install-gde/prereq/php-centos.html) and [Ubuntu]({{ page.baseurl }}/install-gde/prereq/php-ubuntu.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). +Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.0. For information on installing PHP, see [PHP Settings]({{ page.baseurl }}/install-gde/prereq/php-settings.md). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). The following packages may also be helpful for your PHP installation: diff --git a/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md b/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md index 085405640fa..67f9226e095 100644 --- a/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md +++ b/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md @@ -46,7 +46,7 @@ We strongly recommend installing [Nginx]({{ page.baseurl }}/install-gde/prereq/n ## PHP (local) {#php} -Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.1.3+ or 7.2. For information on installing PHP on CentOS and Ubuntu see [PHP](../../../v2.3/install-gde/prereq/php-centos-ubuntu.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). +Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.1.3+ or 7.2. For information on installing PHP see [PHP Settings]({{ page.baseurl }}/install-gde/prereq/php-settings.md). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). The following packages may also be helpful for your PHP installation: From 33dade4aff0b0fa1cb38b8ce0f0041c1e48f79cf Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Thu, 1 Aug 2019 09:01:49 -0500 Subject: [PATCH 13/14] Update guides/v2.3/cloud/before/before-workspace-magento-prereqs.md Co-Authored-By: hguthrie --- guides/v2.3/cloud/before/before-workspace-magento-prereqs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md b/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md index 67f9226e095..457ebcff367 100644 --- a/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md +++ b/guides/v2.3/cloud/before/before-workspace-magento-prereqs.md @@ -46,7 +46,7 @@ We strongly recommend installing [Nginx]({{ page.baseurl }}/install-gde/prereq/n ## PHP (local) {#php} -Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.1.3+ or 7.2. For information on installing PHP see [PHP Settings]({{ page.baseurl }}/install-gde/prereq/php-settings.md). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). +Install [PHP](https://glossary.magento.com/php) on your local. For information on installing PHP see [PHP Settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). The following packages may also be helpful for your PHP installation: From 45bd7a5203eef26b509ef6a4fd334400d7a21a57 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Thu, 1 Aug 2019 09:01:58 -0500 Subject: [PATCH 14/14] Update guides/v2.2/cloud/before/before-workspace-magento-prereqs.md Co-Authored-By: hguthrie --- guides/v2.2/cloud/before/before-workspace-magento-prereqs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md index 5b3b793fdad..28086a4dd2a 100644 --- a/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md +++ b/guides/v2.2/cloud/before/before-workspace-magento-prereqs.md @@ -46,7 +46,7 @@ Although {{ site.data.var.ee }} supports the Apache web server, {{ site.data.var ## PHP (local) {#php} -Install [PHP](https://glossary.magento.com/php) on your local. We recommend PHP 7.0. For information on installing PHP, see [PHP Settings]({{ page.baseurl }}/install-gde/prereq/php-settings.md). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). +Install [PHP](https://glossary.magento.com/php) on your local workstation. For information on installing PHP, see [PHP Settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). For instructions for another OS, see the [PHP documentation](http://php.net/manual/en/install.php). The following packages may also be helpful for your PHP installation: