{"id":100,"date":"2015-12-27T18:52:51","date_gmt":"2015-12-27T23:52:51","guid":{"rendered":"http:\/\/216.162.77.24\/wordpress\/?p=100"},"modified":"2024-03-28T10:17:48","modified_gmt":"2024-03-28T14:17:48","slug":"installing-magento-on-centos-7","status":"publish","type":"post","link":"https:\/\/easy-admin.ca\/index.php\/2015\/12\/27\/installing-magento-on-centos-7\/","title":{"rendered":"Installing Magento on CentOS 7"},"content":{"rendered":"<h2 id=\"prepare\">Preparing Your Server for Magento<\/h2>\n<p><em><strong>Have fun!!!!!<\/strong><\/em><\/p>\n<p>The following sections discuss how to download and install prerequisite software and install Magento CE or EE on a system running:<\/p>\n<ul>\n<li>Ubuntu 10 or later, or CentOS 6<\/li>\n<li>Apache 2.x<\/li>\n<li>nginx 1.7.x<\/li>\n<li>PHP 5.4 and required extensions<\/li>\n<li>MySQL database<\/li>\n<\/ul>\n<h3 id=\"install-prereq-selinux\">SELinux Prerequisite<\/h3>\n<p><a href=\"http:\/\/selinuxproject.org\/page\/Main_Page\" target=\"_blank\" rel=\"noopener\">Security Enhanced Linux (SELinux)<\/a> enables CentOS and Ubuntu administrators greater access control over their servers. If you&#8217;re using SELinux <em>and<\/em> Apache must initiate a connection to another host, you must run the commands discussed in this section.<\/p>\n<p>If Apache and the database server are on the same host, you can skip this section and continue with <a href=\"http:\/\/devdocs.magento.com\/guides\/m1x\/install\/installing_install.html#install-iptables\">Opening Ports In Your Firewall<\/a>.<\/p>\n<p>To enable Apache to initiate a connection to another host with SELinux enabled:<\/p>\n<ol>\n<li>To determine if SELinux is enabled, use the following command:\n<pre>getenforce<\/pre>\n<p><code>Enforcing<\/code> displays to confirm that SELinux is running.<\/li>\n<li>Enter one of the following commands:\n<ul>\n<li>CentOS\n<pre>setsebool -P httpd_can_network_connect=1<\/pre>\n<\/li>\n<li>Ubuntu\n<pre>setsebool -P apache2_can_network_connect=1<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3 id=\"install-iptables\">Opening Ports In Your Firewall<\/h3>\n<p>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:<\/p>\n<h4 id=\"install-optional-phpinfo\">Creating phpinfo.php<\/h4>\n<p><a href=\"http:\/\/php.net\/manual\/en\/function.phpinfo.php\" target=\"_blank\" rel=\"noopener\"><code>phpinfo.php<\/code><\/a> displays a large amount of information about PHP and its extensions. Add the following code anywhere in your web server&#8217;s docroot:<\/p>\n<pre>&lt;?php\n\/\/ Show all information, defaults to INFO_ALL\nphpinfo();<\/pre>\n<p>To view the results, enter the following URL in your browser&#8217;s location or address field:<\/p>\n<pre>http:\/\/<em>web-server-ip-or-host<\/em>\/phpinfo.php<\/pre>\n<h4 id=\"install-optional-phpmyadmin\">Installing phpmyadmin<\/h4>\n<p><code>phpmyadmin<\/code> 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 <code>phpmyadmin<\/code> as the MySQL database administrative user.<\/p>\n<p>For more information about <code>phpmyadmin<\/code>, see the <a href=\"http:\/\/www.phpmyadmin.net\/home_page\/index.php\" target=\"_blank\" rel=\"noopener\">phpmyadmin home page<\/a>.<\/p>\n<p>For more detailed information about installation, see the <a href=\"http:\/\/docs.phpmyadmin.net\/en\/latest\/setup.html#quick-install\" target=\"_blank\" rel=\"noopener\">phpmyadmin installation documentation<\/a>.<\/p>\n<p>To install phpmyadmin on CentOS:<\/p>\n<ol>\n<li>Download the epel RPM for the version of CentOS you&#8217;re using. A sample follows.\n<pre>cd \/tmp\nwget http:\/\/download.fedoraproject.org\/pub\/epel\/6\/i386\/epel-release-6-8.noarch.rpm\nrpm -ivh epel-release-6-8.noarch.rpm<\/pre>\n<\/li>\n<li>Install <code>phpmyadmin<\/code> as follows:\n<pre>yum -y install phpmyadmin<\/pre>\n<\/li>\n<li>Authorize access to phpmyadmin from your machine&#8217;s IP address.\n<ol>\n<li>Open the following file for editing:\n<pre>vim \/etc\/httpd\/conf.d\/phpMyAdmin.conf<\/pre>\n<\/li>\n<li>Replace the following IP address with your IP address\n<pre>#Require ip 127.0.0.1<\/pre>\n<p>For example,<\/p>\n<pre>Require ip 192.51.100.101<\/pre>\n<\/li>\n<li>Replace the following IP with your IP address\n<pre>#Allow from 127.0.0.1<\/pre>\n<p>For example,<\/p>\n<pre>Allow from 192.51.100.101<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<li>Save your changes to <code>\/etc\/httpd\/conf.d\/phpMyAdmin.conf<\/code> and exit the text editor.<\/li>\n<li>Restart Apache.\n<pre>service httpd restart<\/pre>\n<\/li>\n<li>To use phpmyadmin, enter the following command in your browser&#8217;s address or location field:\n<pre>http:\/\/<em>host-or-ip-address<\/em>\/phpmyadmin<\/pre>\n<\/li>\n<li>When prompted, log in using your MySQL database <code>root<\/code> or administrative user&#8217;s user name and password.<\/li>\n<\/ol>\n<h3 id=\"install-create-db\">Creating a Magento Database Instance<\/h3>\n<p>This section discusses how to create a new database instance for Magento. Although a new database instance is recommended, you can optionally install Magento into an existing database instance. If you choose to do that, skip this section and continue with <a href=\"http:\/\/devdocs.magento.com\/guides\/m1x\/install\/installing_install.html#install-sample\">Installing Optional Sample Data<\/a>.<\/p>\n<div class=\"msg-box important\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1271 size-full\" src=\"https:\/\/easy-admin.ca\/my_uploads\/2015\/12\/magento-009.png\" alt=\"\" width=\"45\" height=\"45\" \/><strong>Note<\/strong>: Before you continue, review the information about MySQL discussed in <a href=\"http:\/\/devdocs.magento.com\/guides\/m1x\/install\/installing_install.html#prereq\">Prerequisites<\/a>.<\/div>\n<p>To create a new database instance:<\/p>\n<ol>\n<li>Log in to your database server as any user.<\/li>\n<li>Enter the following commands in the order shown to create a database instance named <code>magento<\/code>:\n<pre>mysql -u root -p \n#Enter the remaining commands at the mysql&gt; prompt.\n\ncreate database magento;\nGRANT ALL ON magento.* TO magento@localhost IDENTIFIED BY 'magento';<\/pre>\n<\/li>\n<li>For MySQL versions between 5.0.2 and 5.1.6, you must enter this command:\n<pre>GRANT SUPER ON *.* TO 'magento'@'localhost';<\/pre>\n<\/li>\n<li>After you&#8217;re done, enter <code><code>exit<\/code><\/code><\/li>\n<li>Test the database instance.\n<pre>mysql -u magento -p<\/pre>\n<p>Messages similar to the following display to confirm you successfully created the database instance. If errors display, repeat the preceding commands.<\/p>\n<pre>Welcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 20\nServer version: 5.1.67 Source distribution\n\nCopyright (c) 2000, 2012, Oracle and\/or its affiliates. All rights reserved.\n\nOracle is a registered trademark of Oracle Corporation and\/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.<\/pre>\n<\/li>\n<\/ol>\n<h3 id=\"install-extract-archive\">Extracting the Magento Installation Archive<\/h3>\n<p>Extract the Magento installation archive on your web server&#8217;s docroot.<\/p>\n<p>The path on Ubuntu is typically <code>\/var\/www<\/code><\/p>\n<p>The path on CentOS is typically <code>\/var\/www\/html<\/code><\/p>\n<p>Examples follow:<\/p>\n<ul>\n<li>Ubuntu\n<pre>cd \/var\/www\ncp \/<em>path<\/em>\/<em>magento-install-archive<\/em> .\ntar -zxf <em>magento-install-archive-name<\/em><\/pre>\n<\/li>\n<li>CentOS\n<pre>cd \/var\/www\/html\ncp \/<em>path<\/em>\/<em>magento-install-archive-name<\/em> .\ntar -zxf <em>magento-install-archive<\/em><\/pre>\n<\/li>\n<\/ul>\n<p>To optionally install Magento sample data, continue with the next section.<\/p>\n<p>To install Magento without sample data, continue with <a href=\"http:\/\/devdocs.magento.com\/guides\/m1x\/install\/installing_install.html#install-privs\">Setting File and Directory Ownership and Privileges<\/a>.<\/p>\n<h3 id=\"install-sample\">Installing Optional Sample Data<\/h3>\n<p>Magento provides sample data you can optionally install to give you an idea of what products look like in the Admin Panel and in your web store. You can use this sample data to learn how Magento works and to experiment with custom themes.<\/p>\n<p>You must install sample data on the file system and in the database <em>before<\/em> you install Magento.<\/p>\n<div class=\"msg-box important\"><strong>Note<\/strong>: <em>Only if your database is shared between more than one Magento installation<\/em>. Database table names used by the sample data are not configurable. To use sample data with a new Magento installation, you must manually add a prefix to all sample data tables and use the same prefix when you install Magento.<\/div>\n<p>To skip sample data installation, continue with <a href=\"http:\/\/devdocs.magento.com\/guides\/m1x\/install\/installing_install.html#install-privs\">Setting File and Directory Ownership and Privileges<\/a>.<\/p>\n<p>To install Magento sample data:<\/p>\n<ol>\n<li>Download the sample data from one of the locations discussed in <a href=\"http:\/\/devdocs.magento.com\/guides\/m1x\/install\/installing.html#get\">Getting Magento CE or EE<\/a>.<\/li>\n<li>If necessary, transfer the sample data to your Magento server.<\/li>\n<li>On your Magento server, extract the sample data archive to a directory other than your Magento installation directory.<\/li>\n<li>Make note of the path to the sample data&#8217;s <code>media<\/code> subdirectory.<\/li>\n<li>Change to the <code>[your Magento install dir]\/media<\/code> directory.\n<pre>#Ubuntu example\ncd \/var\/www\/magento\/media\n\n#CentOS example\ncd \/var\/www\/html\/magento\/media<\/pre>\n<\/li>\n<li>As a user with privileges to write to the Magento installation directories (typically the web server user), copy the sample data&#8217;s <code>media<\/code> directory and subdirectories to your Magento installation directory.<br \/>\nFor example, to copy Magento sample data from <code>\/home\/username<\/code> to <code>\/var\/www\/magento<\/code>, enter<\/p>\n<pre>cp -R \/home\/username\/media\/* .<\/pre>\n<\/li>\n<li><em>Magento CE 1.9 and Magento EE 1.14 only<\/em>. You must also copy the sample data&#8217;s <code>skin<\/code> directory to <code>[your Magento install dir]\/skin<\/code> as follows:<br \/>\nFor example, to copy Magento skin files from <code>\/home\/username\/skin<\/code> to <code>\/var\/www\/magento\/skin<\/code>, enter<\/p>\n<pre>cd [your Magento install dir]\/skin\ncp -R \/home\/username\/skin\/* .<\/pre>\n<\/li>\n<li>Import the CE or EE sample data into your MySQL database as follows:\n<pre>mysql -u root -p <em>magento-db-instance-name<\/em> &lt; <em>path-to-sample-data-extract-dir<\/em>\/<em>sample-data-filename<\/em>.sql<\/pre>\n<p>EE 1.14 example<\/p>\n<pre>mysql -u root -p magento &lt; \/home\/username\/magento_sample_data_for_1.14.0.0.sql<\/pre>\n<\/li>\n<\/ol>\n<h3 id=\"install-privs\">Setting File and Directory Ownership and Privileges<\/h3>\n<p>Magento recommends the following ownership and privilege settings for files and directories in the Magento installation directory:<\/p>\n<ul>\n<li>The Magento installation directory and all subdirectories are owned by the web server user.<br \/>\nThis enables the web server to change files in these subdirectories but other users cannot access them (except a higher-level user such as <code>root<\/code>).<\/li>\n<li>All directories have 700 permissions (<code>drwx------<\/code>).<br \/>\n700 permissions give full control (that is, read\/write\/execute) to the owner and no permissions to anyone else.<\/li>\n<li>All files have 600 permissions (<code>-rw-------<\/code>).<br \/>\n600 permissions mean the owner can read and write but other users have no permissions.<\/li>\n<\/ul>\n<p><strong>Note<\/strong>: The way you set permissions and ownership depends on whether Magento is running on a dedicated or hosted system:<\/p>\n<ul>\n<li><em>Hosted<\/em>: A Magento server located on a hosting provider. A <em>hosted<\/em> system typically does not enable you to elevate to <code>root<\/code>. The web server typically runs as an ordinary user. Magento assumes you log in as this user to start and stop the web server and that you already own all the files and directories in the Magento installation directory. You can use <code>chmod<\/code> to change permissions on files and directories.<\/li>\n<li><em>Dedicated<\/em>: A Magento server you control and operate. Unlike a hosted system, you can elevate to <code>root<\/code> and, as <code>root<\/code>, you can use the <code>chown<\/code> and <code>chmod<\/code> commands to set ownership and privileges in the Magento installation directory.<\/li>\n<\/ul>\n<p>To set privileges and ownership:<\/p>\n<ol>\n<li>Log in to your Magento server.<\/li>\n<li>Change to your Magento installation directory:\n<pre>#Ubuntu example\ncd \/var\/www\/magento\n\n#CentOS example\ncd \/var\/www\/html\/magento<\/pre>\n<\/li>\n<li><em>Dedicated Magento server only<\/em>. Enter the following command to set ownership of the Magento installation directory and all its subdirectories:\n<pre>chown -R <em>web-server-user-name<\/em> .<\/pre>\n<p>For example, on Ubuntu where Apache usually runs as <code>www-data<\/code>, enter<\/p>\n<pre>chown -R www-data .<\/pre>\n<\/li>\n<li>Enter the following commands to set directory permissions to 700 and file permissions to 600:\n<pre>find . -type d -exec chmod 700 {} \\;\nfind . -type f -exec chmod 600 {} \\;<\/pre>\n<\/li>\n<\/ol>\n<h2 id=\"install-magento\">Installing Magento CE or EE<\/h2>\n<p>This section discusses how to run the Magento installer, using Magento EE as an example. The Magento CE installer has exactly the same options; only the appearance is different.<\/p>\n<div class=\"msg-box important\"><strong>Important<\/strong>: The procedure that follows assumes that your web server and database server are on the same host. If they are installed on different hosts, additional tasks are required. <a href=\"http:\/\/devdocs.magento.com\/guides\/m1x\/install\/installing.html#help\" target=\"_blank\" rel=\"noopener\">Get help<\/a> before you continue your installation.<\/div>\n<p>To install Magento CE or EE:<\/p>\n<ol>\n<li>Complete all of the tasks discussed earlier in this article.<\/li>\n<li>Enter the following URL in your web browser&#8217;s address or location field:\n<pre><em>web-server-ip-or-host<\/em>:<em>port<\/em>\/<em>magento-path<\/em>\/magento<\/pre>\n<p>For example, if your web server is <code>http:\/\/www.example.com<\/code>, listens on port 80, and Magento is installed in the web server docroot&#8217;s <code>magento<\/code> subdirectory, enter<\/p>\n<pre>http:\/\/www.example.com\/magento<\/pre>\n<p>Select the check box that indicates you agree to the terms and conditions, and click <strong>Continue<\/strong>.<\/li>\n<li>On the Localization page, enter the following information.<br \/>\n<table>\n<tbody>\n<tr>\n<th>Option<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<tr>\n<td>Locale<\/td>\n<td>From the list, click the option that best matches the locale in which your Magento server resides.<\/td>\n<\/tr>\n<tr>\n<td>Time Zone<\/td>\n<td>From the list, click the option that best matches the time zone in which your Magento server resides.<\/td>\n<\/tr>\n<tr>\n<td>Default currency<\/td>\n<td>From the list, click the default currency to use on your Magento web store.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The following figure shows an example of configuring Magento for US English in the US Central time zone and using the US Dollar as the default currency.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1264\" src=\"https:\/\/easy-admin.ca\/my_uploads\/2015\/12\/magento-002.png\" alt=\"\" width=\"951\" height=\"487\" srcset=\"https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-002.png 951w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-002-300x154.png 300w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-002-768x393.png 768w\" sizes=\"auto, (max-width: 951px) 100vw, 951px\" \/><\/li>\n<li>Click <strong>Continue<\/strong>.<br \/>\nThe Configuration page displays. Each of its three sections is discussed in the following step.<\/li>\n<li>In the Configuration page, enter the following information:\n<ol>\n<li>In the Database Configuration section, enter the following information.<br \/>\n<table>\n<tbody>\n<tr>\n<th>Option<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<tr>\n<td>Database Type<\/td>\n<td>From the list, click <strong>MySQL<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td>Host<\/td>\n<td>Enter the database server&#8217;s fully qualified host name or IP address. Use the default setting of <strong>localhost<\/strong> if your database server is on the same host as your web server.<\/td>\n<\/tr>\n<tr>\n<td>Database Name<\/td>\n<td>Enter the name of the Magento database instance in which you want to install the Magento database tables.<\/td>\n<\/tr>\n<tr>\n<td>User Name<\/td>\n<td>Enter the user name of the Magento database instance owner.<\/td>\n<\/tr>\n<tr>\n<td>User Password<\/td>\n<td>Enter the Magento database owner&#8217;s password.<\/td>\n<\/tr>\n<tr>\n<td>Tables Prefix<\/td>\n<td><em>(Optional.)<\/em> Use only if you&#8217;re installing the Magento database tables in a database instance that has Magento tables in it already. In that case, enter a prefix to identify the Magento tables for this installation.Some customers have more than one Magento instance running on a server with all tables in the same database. This option enables those customers to share the database server with more than one Magento installation.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A sample follows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1265\" src=\"https:\/\/easy-admin.ca\/my_uploads\/2015\/12\/magento-003.png\" alt=\"\" width=\"725\" height=\"331\" srcset=\"https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-003.png 725w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-003-300x137.png 300w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><\/p>\n<ol>\n<li>In the Web Access Options section, enter the following information.<br \/>\n<table>\n<tbody>\n<tr>\n<th>Option<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<tr>\n<td>Base URL<\/td>\n<td>Enter the base URL to use to access the Magento Admin Panel and your Magento web store.<\/td>\n<\/tr>\n<tr>\n<td>Admin Path<\/td>\n<td>Enter the path to access the Admin Panel. This path is appended to <strong>Base URL<\/strong>.<br \/>\nFor example, if <strong>Base URL<\/strong> is <code>http:\/\/www.example.com<\/code> and <strong>Admin Path<\/strong> is <code>admin<\/code>, the Admin Panel&#8217;s URL is <code>http:\/\/www.example.com\/admin<\/code>\u2014provided you configured your web server for server rewrites.<\/td>\n<\/tr>\n<tr>\n<td>Enable Charts<\/td>\n<td>Select the check box to display charts on the Admin Panel.<\/td>\n<\/tr>\n<tr>\n<td>Skip Base URL Validation Before the Next Step<\/td>\n<td>Clearing this check box validates your server&#8217;s base URL by performing an HTTP GET. Clear this check box unless your web server&#8217;s base URL is not verifiable; for example, in a development or test environment.<\/td>\n<\/tr>\n<tr>\n<td>Use Web Server (Apache) Rewrites<\/td>\n<td>Select this check box to enable the use of the Apache <a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/rewrite\/\" target=\"_blank\" rel=\"noopener\"><code>mod_rewrite<\/code><\/a> module. You can select this check box only if you configured Apache to use server rewrites.<\/td>\n<\/tr>\n<tr>\n<td>Use Secure URLs (SSL)<\/td>\n<td>Select this check box only if your web server supports SSL.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A sample follows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1266\" src=\"https:\/\/easy-admin.ca\/my_uploads\/2015\/12\/magento-004.png\" alt=\"\" width=\"728\" height=\"417\" srcset=\"https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-004.png 728w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-004-300x172.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/li>\n<li>In the Session Storage Options section, click one of the following options:\n<ul>\n<li><strong>File<\/strong> to store user session data on the file system in the <code>[your Magento install dir]\/var\/session<\/code> directory.<br \/>\nFile-based session storage is appropriate unless the Magento file system access is slow or you have a clustered database.<\/li>\n<li><strong>Database<\/strong> to store user session data in the database.<br \/>\nChoose database storage if you have a clustered database; otherwise, there might not be much benefit over file-based storage.<\/li>\n<\/ul>\n<\/li>\n<li>Click <strong>Continue<\/strong>.\n<div class=\"msg-box important\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1267\" src=\"https:\/\/easy-admin.ca\/my_uploads\/2015\/12\/magento-005.png\" alt=\"\" width=\"45\" height=\"45\" \/><strong>Important<\/strong>: If errors display, you must resolve them before continuing.<\/div>\n<\/li>\n<li>In the Create Admin Account page, enter the following information.<br \/>\n<table>\n<tbody>\n<tr>\n<th>Option<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<tr>\n<td>First Name<\/td>\n<td>Enter the first name of the user you want to identify as the Magento web store owner.<\/td>\n<\/tr>\n<tr>\n<td>Last Name<\/td>\n<td>Enter the user&#8217;s last name.<\/td>\n<\/tr>\n<tr>\n<td>Email<\/td>\n<td>Enter the user&#8217;s email address.<\/td>\n<\/tr>\n<tr>\n<td>Username<\/td>\n<td>Enter the Magento Admin Panel administrator&#8217;s user name. (You can create additional Magento administrators later.)<\/td>\n<\/tr>\n<tr>\n<td>Password<\/td>\n<td>Enter the user&#8217;s password.<\/td>\n<\/tr>\n<tr>\n<td>Confirm Password<\/td>\n<td>Enter the user&#8217;s password again for verification.<\/td>\n<\/tr>\n<tr>\n<td>Encryption Key<\/td>\n<td>If you have one, enter a key to encrypt sensitive data (such as passwords and personally identifiable customer information) in the Magento database. If you don&#8217;t have one, Magento generates one for you.<br \/>\nThe encryption key is stored in <code>[your Magento install dir]\/app\/etc\/local.xml<\/code>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A sample follows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1268\" src=\"https:\/\/easy-admin.ca\/my_uploads\/2015\/12\/magento-006.png\" alt=\"\" width=\"740\" height=\"630\" srcset=\"https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-006.png 740w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-006-300x255.png 300w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><\/li>\n<li>Click <strong>Continue<\/strong>.<br \/>\nThe following page displays to indicate a successful installation.<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1269\" src=\"https:\/\/easy-admin.ca\/my_uploads\/2015\/12\/magento-007.png\" alt=\"\" width=\"953\" height=\"489\" srcset=\"https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-007.png 953w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-007-300x154.png 300w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-007-768x394.png 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" \/><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2 id=\"verify\">Verifying that Magento CE or Magento EE Installed Successfully<\/h2>\n<p>To make sure Magento installed properly, you should log in to the Admin Panel to verify the Magento version.<\/p>\n<p>You can also import products into Magento or perform other tasks that verify you can write to the database.<\/p>\n<ol>\n<li>In a web browser&#8217;s location or address field, enter the URL to the Admin Panel. An example follows:\n<pre>http:\/\/www.example.com\/magento\/admin<\/pre>\n<p>(The Admin Panel URL is a combination of the <strong>Base URL<\/strong> and <strong>Admin Path<\/strong> fields you entered when you installed Magento.<\/li>\n<li>Log in to the Admin Panel as an administrator.<\/li>\n<li>Scroll to the bottom of the page; the version should display as 1.14 (Magento EE) or 1.9.0.0 (Magento CE).<br \/>\nThe following figure shows an example.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1270\" src=\"https:\/\/easy-admin.ca\/my_uploads\/2015\/12\/magento-008.png\" alt=\"\" width=\"1243\" height=\"75\" srcset=\"https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-008.png 1243w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-008-300x18.png 300w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-008-768x46.png 768w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2015\/12\/magento-008-1024x62.png 1024w\" sizes=\"auto, (max-width: 1243px) 100vw, 1243px\" \/><\/li>\n<\/ol>\n<p>Congratulations! You successfully installed Magento!<\/p>\n<h2 id=\"install-cron\">Setting Up Cron Jobs<\/h2>\n<p>Several Magento features require at least one cron job, which schedules activities to occur in the future. A partial list of these activities follows:<\/p>\n<ul>\n<li>Catalog price rules<\/li>\n<li>Newsletters<\/li>\n<li>Generating Google sitemaps<\/li>\n<li>Customer Alerts\/Notifications (product price change, product back in stock)<\/li>\n<li>Reindexing <em>(Magento EE 1.13 only)<\/em><\/li>\n<li>Private sales <em>(Magento EE only)<\/em><\/li>\n<li>Automatic updating of currency rates<\/li>\n<li><em>Magento EE 1.14.1 and later, Magento CE 1.9.1 and later<\/em> All Magento e-mails (including order confirmation and transactional)<\/li>\n<\/ul>\n<div class=\"msg-box important\"><strong>Note<\/strong>: Magento depends on proper cron job configuration for many important system functions, including indexing. Failure to set it up properly means Magento won&#8217;t function as expected.<\/div>\n<p>Magento recommends running cron every minute for EE and every five minutes for CE.<\/p>\n<p>UNIX systems schedule tasks to be performed by particular users using a <em>crontab<\/em>, which is a file that contains instructions to the cron daemon that tell the daemon in effect to &#8220;run this command at this time on this date&#8221;. Each user has its own crontab, and commands in any given crontab are executed as the user who owns the crontab.<\/p>\n<p>For Magento, this user is the web server. To determine your web server&#8217;s user, enter the following command:<\/p>\n<pre>ps -o \"user group command\" -C httpd,apache2<\/pre>\n<p>In CentOS, the Apache user is typically <code>apache<\/code>; in Ubuntu, it&#8217;s typically <code>www-data<\/code>.<\/p>\n<p>To create a cron job as the user who runs Apache, the following commands in the order shown:<\/p>\n<ol>\n<li>Create or edit a crontab for the Apache user:\n<pre>crontab -u <em>apache-user-name<\/em> -e<\/pre>\n<\/li>\n<li>A text editor displays. (You might need to choose a text editor first.)<br \/>\nIn the editor, enter the following:<\/p>\n<pre>* * * * * \/bin\/sh \/[your Magento install dir]\/cron.sh<\/pre>\n<p>For example, for CentOS,<\/p>\n<pre>* * * * *  \/bin\/sh \/var\/www\/html\/magento\/cron.sh<\/pre>\n<\/li>\n<li>Save your changes to the crontab and exit the editor.<\/li>\n<\/ol>\n<h2 id=\"install-privs-after\">Setting Magento File System Permissions and Ownership After Installation<\/h2>\n<h2 id=\"privs-after\">Setting Privileges and Ownership After You Install Magento<\/h2>\n<p>If you have installed Magento, you can set file system privileges and ownership as follows:<\/p>\n<ul>\n<li>For a dedicated Magento server, you set ownership of files and directory as the web server user. You set privileges as 500 (directories) and 400 (files).<\/li>\n<li>For a hosted Magento server on which the web server runs as the logged-in user name, you set privileges as as 500 (directories) and 400 (files).<\/li>\n<\/ul>\n<div class=\"msg-box important\"><strong>Note<\/strong>: In both hosted and dedicated systems, you set the privileges for the <code>media\/<\/code> and <code>var\/<\/code> directories at 700\/600 because they must be writable.<\/div>\n<p>Following is an explanation of the privileges:<\/p>\n<ul>\n<li>500 permissions for directories (<code>dr-x------<\/code>) gives the web server user read and execute privileges to prevent the accidental deletion or modification of files in the directory. Other users have no access to Magento directories.<\/li>\n<li>400 permissions for files (<code>-r--------<\/code>) prevent any user (even the web server user) from overwriting files.<br \/>\nThis prevents attacks that depend on overwriting existing files with malicious content.<\/li>\n<li>700 permissions (<code>drwx------<\/code>) for the <code>media\/<\/code> and <code>var\/<\/code> directories give full control (that is, read\/write\/execute) to the owner and no permissions to anyone else.<\/li>\n<li>600 permissions (<code>-rw-------<\/code>) for files in the <code>media\/<\/code> and <code>var\/<\/code> directories enable the web server user to write to them and to overwrite them.<\/li>\n<\/ul>\n<div class=\"msg-box important\"><strong>Note<\/strong>: On a dedicated system, all commands discussed in this article must be entered as a user with <code>root<\/code> privileges. On a hosted system, commands must be entered as the web server user.<\/div>\n<p>To set up ownership and permissions on a dedicated Magento server:<\/p>\n<ol>\n<li><em>Dedicated Magento server only<\/em>. As a user with <code>root<\/code> privileges, find the web server user:\n<ul>\n<li>Apache:\n<ul class=\"level3\">\n<li>Ubuntu: <code>grep User \/etc\/apache2\/apache2.conf<\/code><\/li>\n<li>CentOS: <code>grep User \/etc\/httpd\/conf\/httpd.conf<\/code>\n<div class=\"msg-box important\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1271 size-full\" src=\"https:\/\/easy-admin.ca\/my_uploads\/2015\/12\/magento-009.png\" alt=\"\" width=\"45\" height=\"45\" \/><strong>Note<\/strong>: The preceding paths are samples only. The paths to these <code>.conf<\/code> files on your system might be different. You can use the command <code>whereis nginx<\/code> to find the location of the configuration files.<\/div>\n<\/li>\n<\/ul>\n<p>Typically, the Apache web server user on CentOS is <code>apache<\/code> and the Apache web server user on Ubuntu is <code>www-data<\/code>.<\/li>\n<li>nginx: Open the nginx configuration file, typically <code>\/etc\/nginx\/nginx.conf<\/code>. The <code>user<\/code> directive specifies the user name. It might run as the Apache user if Apache is installed on the same system.<\/li>\n<\/ul>\n<\/li>\n<li>Change to the Magento installation directory.<br \/>\nOn CentOS, this is typically <code>\/var\/www\/html\/magento<\/code>. On Ubuntu, it is typically <code>\/var\/www\/magento<\/code>.<\/li>\n<li><em>Dedicated Magento server only<\/em>. As a user with <code>root<\/code> privileges, enter the following command to set ownership of the Magento installation directory and all its subdirectories:\n<pre>chown -R <em>web-server-user-name<\/em> .<\/pre>\n<p>For example, on Ubuntu where Apache usually runs as <code>www-data<\/code>, enter<\/p>\n<pre>chown -R www-data .<\/pre>\n<\/li>\n<li>Enter the following commands to set permissions:\n<pre>find . -type f -exec chmod 400 {} \\;\nfind . -type d -exec chmod 500 {} \\; \nfind var\/ -type f -exec chmod 600 {} \\; \nfind media\/ -type f -exec chmod 600 {} \\;\nfind var\/ -type d -exec chmod 700 {} \\; \nfind media\/ -type d -exec chmod 700 {} \\;\nchmod 700 includes\nchmod 600 includes\/config.php<\/pre>\n<\/li>\n<\/ol>\n<h2 id=\"extensions\">Securing Magento Extensions<\/h2>\n<p>If you set permissions and ownership as discussed in this article, you must change permissions temporarily to be able to use the Magento Connect Manager in the Admin Panel. (<strong>System<\/strong> &gt; <strong>Magento Connect<\/strong> &gt; <strong>Magento Connect Manager<\/strong>). You can still install extensions manually, however; that is beyond the scope of this article.<\/p>\n<p>You can confirm the issue when you access Magento Connect Manager in the Admin Panel. The following error displays on the <strong>Extensions<\/strong> tab page:<\/p>\n<pre>Warning: Your Magento folder does not have sufficient write permissions.<\/pre>\n<p><strong>To use Magento Connect Manager, you must:<\/strong><\/p>\n<ol>\n<li>Temporarily set 700\/600 permissions on your Magento installation directory and subdirectories.<\/li>\n<li>Install the extension.<br \/>\nMagento Connect Manager typically installs extensions with 777 (world-writable) permissions.<\/li>\n<li>Set permissions back to their recommended values.<\/li>\n<\/ol>\n<p>In addition, if you have a dedicated Magento server, you should check ownership of files and directories and reset them if necessary. Often, Magento Connect Manager installs extensions with user and group ownership both set to the web server user.<\/p>\n<h3 id=\"extensions-before\">Temporarily Resetting Permissions on Your Magento Installation Directory<\/h3>\n<p>To temporarily set file and directory permissions so you can use Magento Connect Manager:<\/p>\n<ol>\n<li>Change to the Magento installation directory.<br \/>\nOn CentOS, this is typically <code>\/var\/www\/html\/magento<\/code>. On Ubuntu, it is typically <code>\/var\/www\/magento<\/code>.<\/li>\n<li>Enter the following commands:\n<pre>find . -type d -exec chmod 700 {} \\;\nfind . -type f -exec chmod 600 {} \\;<\/pre>\n<\/li>\n<li>Install your extension using the Magento Connect Manager.<\/li>\n<\/ol>\n<h3 id=\"extensions-after\">Restoring the Recommended Permissions<\/h3>\n<p>Enter the commands discussed in this section to return permissions and ownership to their recommended values after you have installed extensions.<\/p>\n<p>To restore Magento installation directory permissions:<\/p>\n<ol>\n<li>Change to the Magento installation directory.<br \/>\nOn CentOS, this is typically <code>\/var\/www\/html\/magento<\/code>. On Ubuntu, it is typically <code>\/var\/www\/magento<\/code>.<\/li>\n<li><em>Dedicated Magento server only<\/em>. As a user with <code>root<\/code> privileges, enter the following command to set ownership of the Magento installation directory and all its subdirectories:\n<pre>chown -R <em>web-server-user-name<\/em> .<\/pre>\n<p>For example, on Ubuntu where Apache usually runs as <code>www-data<\/code>, enter<\/p>\n<pre>chown -R www-data .<\/pre>\n<\/li>\n<li>Enter the following commands to set permissions:\n<pre>find . -type f -exec chmod 400 {} \\;\nfind . -type d -exec chmod 500 {} \\; \nfind var\/ -type f -exec chmod 600 {} \\; \nfind media\/ -type f -exec chmod 600 {} \\;\nfind var\/ -type d -exec chmod 700 {} \\; \nfind media\/ -type d -exec chmod 700 {} \\;<\/pre>\n<\/li>\n<\/ol>\n<h2 id=\"privs-patches\">Applying Magento Support Patches<\/h2>\n<p>Magento Support typically provides a shell script to patch various Magento issues. When you run the shell script, file and directory permissions are typically not changed; however, the files provided with the patch are owned by the user who applied the patch. If you have a dedicated Magento server, this is typically <code>root<\/code>; therefore, after applying the patch, you must change file ownership.<\/p>\n<p>If you are required to apply a patch provided by Magento Support, use the following process:<\/p>\n<ol>\n<li>Get the patch from Magento Support.<\/li>\n<li>Follow the instructions provided with the patch.<br \/>\nTypically, you run a shell script as either a user with <code>root<\/code> privileges or as the owner of the Magento installation directory.<\/li>\n<li>If you ran the patch as the owner of the Magento installation directory, you&#8217;re done. File permissions aren&#8217;t usually changed; however, you should check and reapply file and directory privileges if necessary.<\/li>\n<li>If you ran the patch as a user with <code>root<\/code> privileges, use the following steps to reset file ownership:<\/li>\n<li><em>Dedicated Magento server only<\/em>. Find the web server user:\n<ul>\n<li>Apache:\n<ul class=\"level3\">\n<li>Ubuntu: <code>grep User \/etc\/apache2\/apache2.conf<\/code><\/li>\n<li>CentOS: <code>grep User \/etc\/httpd\/conf\/httpd.conf<\/code><\/li>\n<\/ul>\n<p>Typically, the Apache web server user on CentOS is <code>apache<\/code> and the Apache web server user on Ubuntu is <code>www-data<\/code>.<\/li>\n<li>nginx: Open the nginx configuration file, typically <code>\/etc\/nginx\/nginx.conf<\/code>. The <code>user<\/code> directive specifies the user name. It might run as the Apache user if Apache is installed on the same system.<\/li>\n<\/ul>\n<\/li>\n<li>As a user with <code>root<\/code> privileges, enter the following command from the Magento installation directory:<br \/>\n<code>chown -R <em>web-server-user-name<\/em> .<\/code> For example, on Ubuntu where Apache usually runs as <code>www-data<\/code>, enter <code>chown -R www-data.<\/code><\/li>\n<\/ol>\n<p><strong>During the installation, errors like the following display:<\/strong><br \/>\n<code>Path \"\/var\/www\/html\/magento\/app\/etc\" must be writable.<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Preparing Your Server for Magento Have fun!!!!! The following sections discuss how to download and install prerequisite software and install Magento CE or EE on a system running: Ubuntu 10 or later, or CentOS 6 Apache 2.x nginx 1.7.x PHP 5.4 and required extensions MySQL database SELinux Prerequisite Security Enhanced Linux (SELinux) enables CentOS and &hellip; <a href=\"https:\/\/easy-admin.ca\/index.php\/2015\/12\/27\/installing-magento-on-centos-7\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Installing Magento on CentOS 7<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":3452,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-100","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":0,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/media\/3452"}],"wp:attachment":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}