Live Chat Software by NetForChoice
Knowledgebase
CentOS: Installing Required Prerequisite Software for Magento CE 1.8 Magento EE 1.13 (or Later)
Posted by on 29 March 2016 06:25 PM

CentOS: Installing Required Prerequisite Software for Magento CE 1.8 Magento EE 1.13 (or Later)

Contents

  • Overview
  • Updating System Software
  • Apache
  • Nginx
  • PHP
  • MySQL
  • Next Steps

Overview

This article discusses how to install required prerequisite software for CentOS. You must complete these tasks before you install Magento CE 1.8 or later or Magento EE 1.13 or later.

Before you continue, make sure you familiarize yourself with the installation process discussed in Prerequisites.

Note: You must install system software on CentOS as a user with root privileges.

Updating System Software

It's a good practice to update your repositories and optionally update system software.

Update repositories:

yum -y update

Optionally upgrade software. This might cause a system reboot.

yum -y upgrade

Apache

Magento requires Apache use server rewrites. You must also specify the type of directives that can be used in .htaccess, which Magento uses to specify rewrite rules.

Installing and configuring Apache is basically a three-step process: install the software, enable rewrites, and specify .htaccess directives.

Installing Apache

Install Apache 2 if you haven't already done so.

yum -y install httpd

Enabling Apache Rewrites

  1. Open httpd.conf for editing.

vim /etc/httpd/conf/httpd.conf

  1. Locate the block that starts with:

<Directory /var/www/html>

  1. In that block, change the value of AllowOverride to All.
  2. Save your changes to httpd.conf and exit the text editor.
  3. Restart Apache.

service httpd restart

PHP

Magento CE and EE support the following PHP versions:

  • Magento CE 1.6.0.0–1.8.1.0 and Magento EE 1.11.0.0–1.13.1.0 support PHP 5.3 natively. They can be used with PHP 5.4 if you apply the PHP 5.4 patch.
  • Magento CE 1.9.0.x and EE 1.14.0.x support PHP 5.4 natively. They are backward-compatible with PHP 5.3
  • Magento CE 1.9.1 and EE 1.14.1 support PHP 5.5 natively. They are backward-compatible with PHP 5.4

We recommend you use the most recent PHP version supported by your version of Magento. For example, you should use PHP 5.5 with CE 1.9.1 or EE 1.14.1.

For more information about PHP, see:

  • PHP 5.4 changelog
  • PHP 5.5 changelog

Check with a system administrator or reference for your version of CentOS to see what PHP versions are available.

If you're installing Magento CE 1.9.1 or Magento EE 1.14.1, you can use PHP 5.5; otherwise, we recommend PHP 5.4. For certain versions of CE and EE, a patch is required to use PHP 5.4.

Enter the following command to see what version of PHP is currently running:

php -v

See one of the following sections for more information:

  • Upgrading PHP
  • Installing Required PHP Extensions
  • Increasing the PHP memory Limit

Upgrading PHP

CentOS 6.x repositories have PHP 5.3. This section assumes you use either PHP 5.4 or 5.5. Make sure you understand which version of Magento CE or EE supports the PHP version to which you upgrade.

Before you start, verify you have PHP 5.3 installed:

php -v

If you already have the desired PHP version installed, you don't have to do anything.

If PHP is not installed, install PHP 5.3 using the following command:

yum -y install php php-xml

Continue with one of the following sections.

Important: The following sections discuss suggested PHP upgrade paths. Because you're choosing a non-CentOS repository to upgrade PHP, make your choice carefully. Not all repositories work equally well. We don't recommend any particular repository. Consult a system administrator or CentOS reference for more information.

Upgrading to PHP 5.5

There is more than one way to upgrade CentOS 6.5 to PHP 5.5; the following is a suggestion only. Consult a reference for additional options.

Enter the following commands in the order shown.

cd /tmp

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

yum -y remove php-common-5.3.3-40.el6_6.x86_64

yum -y install php55w php55w-opcache

Skip the next section and continue with Installing Required PHP Extensions.

Upgrading to PHP 5.4

Enter the following commands to upgrade to PHP 5.4:

cd /tmp

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

yum --enablerepo=remi install httpd php php-common

The following resources are also available:

  • kb.parallels
  • stackoverflow
  • remi repository

Installing Required PHP Extensions

The names of the PHP extensions you must install depend on the repository from which you installed PHP. Use one of the following commands:

PHP 5.5:

yum -y install php55w-xml php55w-mcrypt php55w-gd php55w-devel php55w-mysql php55w-mbstring

PHP 5.4:

yum -y install --enablerepo=remi php-mcrypt gd gd-devel php-gd php-mysql php54w-mbstring

Increasing the PHP Memory Limit

Increase memory_limit in php.ini to at least 512MB.

  1. Open /etc/php.ini in a text editor.
  2. Change memory_limit to:

memory_limit = 512M

  1. Save your changes and exit the text editor.

MySQL

This section discusses how to install and configure MySQL 5.6. CentOS 6.x repositories have MySQL 5.1; to install a different version of MySQL, see the MySQL documentation.

Note: Use the tasks that follow only on a new MySQL database. Some of the tasks require you to delete users and should not be performed on a database that has already been set up.

The following procedure is based on Install MySQL Server 5.6 in CentOS 6.x and Red Hat 6.x Linux.

  1. Install the MySQL database:
  2. cd /tmp
  3. wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
  4. rpm -ivh mysql-community-release-el6-5.noarch.rpm

yum -y install mysql-server

  1. Start MySQL.

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.

mysql_secure_installation

Next Steps

After installing the required prerequisite software, continue your installation with Preparing Your Server for Magento CE or EE.

 

 

Installing and Verifying Magento Community Edition (CE) and Enterprise Edition (EE)

 

Contents

  • Overview
  • Prerequisites
  • Preparing Your Server for Magento CE or EE
  • Installing Magento CE or EE
  • Verifying that Magento CE or Magento EE Installed Successfully
  • Setting Up Cron Jobs
  • Setting Magento File System Permissions and Ownership After Installation
  • Troubleshooting

Overview

This article discusses how to install:

  • Magento Community Edition (CE) 1.8.x or 1.9.x
  • Magento Enterprise Edition (EE) 1.13.x or 1.14.x

To install Magento CE or Magento EE, use the following high-level guidelines:

  1. Set up a system that meets the Magento system requirements.
  2. Install prerequisite software (web server, PHP, and required PHP extensions).
  3. Set up a MySQL Magento database instance.
  4. Run the Magento installer to complete the installation.
  5. Verify that Magento installed correctly.

Important: Perform all installations to Magento the latest version of CE 1.9 or Magento EE 1.14 to get the latest fixes, features, and security updates.

Prerequisites

Before starting your installation:

  • Get the Magento installation archive as discussed in Getting Magento CE or EE.
  • Set up one or more hosts that meet the Magento system requirements.
  • 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.
  • If your database server and web server are located on different hosts, get help before proceeding.
  • Make sure you can back up your entire system at various points during the installation so you can roll back in the event of issues.

Magento strongly recommends you observe the following guidelines when you set up your Magento database:

  • Magento for the first time uses MySQL database triggers 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 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.

More information, including software prerequisites, can be found in the next section.

Preparing Your Server for Magento CE or EE

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

Notes:

  • Discussing how to configure Secure Sockets Layer (SSL) is beyond the scope of this guide. You can consult some general resources such as Apache, zytrax.com, or the OpenSSL documentation page.
  • Discussing how to install and configure nginx is beyond the scope of this article.
  • Review the MySQL developer site's recommendations for MySQL password security.
  • Before you continue, make sure the system on which you install Magento meets the Magento system requirements.

Complete the tasks discussed in the following sections in the order shown:

  1. Installing and configuring required prerequisite Software for Ubuntu or CentOS
  2. SELinux Prerequisite
  3. Opening Ports In Your Firewall
  4. Installing Optional Software
  5. Creating a Magento Database Instance
  6. Extracting the Magento Installation Archive
  7. Installing Optional Sample Data

Note: Unless otherwise noted, all tasks discussed in this article must be performed by a user with root privileges.

SELinux Prerequisite

Security Enhanced Linux (SELinux) 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.

If Apache and the database server are on the same host, you can skip this section and continue with Opening Ports In Your Firewall.

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

Enforcing displays to confirm that SELinux is running.

  1. Enter one of the following commands:
    • CentOS

setsebool -P httpd_can_network_connect=1

  • Ubuntu

setsebool -P apache2_can_network_connect=1

Opening Ports In Your Firewall

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.
  • CentOS: CentOS how-to and CentOS reference page.

Installing Optional Software

This section discusses how to create or install the following:

  • Install and configure Network Time Protocol (NTP) which enables you to synchronize the system clock with pool servers located around the world. NTP is particularly useful for synchronizing the clocks of multiple hosts.
  • Create a phpinfo.php file
  • Install and configure the phpmyadmin database administration utility.

These optional utilities might assist you with your installation; however, they are not required to install or use Magento.

To skip installing these utilities, go directly to Creating a Magento Database Instance.

See the following sections:

  • Installing and Configuring Network Time Protocol (NTP)
  • Creating phpinfo.php
  • Installing phpmyadmin

Installing and Configuring Network Time Protocol (NTP)

NTP enables servers to synchronize their system clocks using globally available pool servers. 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.

To install and configure NTP:

  1. CentOS only.
    1. Enter the following command to find the appropriate NTP software: yum search ntp
    2. Select a package to install. For example, ntp.x86_64.
    3. Install the package. yum -y install ntp.x86_64
  2. Ubuntu only. Enter the following command to install NTP: apt-get install ntp
  3. Select the NTP pool servers you wish to use. Selecting pool servers is up to you. If you use NTP pool servers, ntp.org recommends you use pool servers that are close to your servers' time zone as discussed on the NTP pool project help page. If you have a private NTP server that is available to all hosts in your Magento deployment, you can use that server instead.
  4. Open /etc/ntp.conf in a text editor.
  5. Look for lines similar to the following:
  6. server 0.centos.pool.ntp.org
  7. server 1.centos.pool.ntp.org

server 2.centos.pool.ntp.org

  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. An example of using three United States-based NTP servers follows:
  2. server 0.us.pool.ntp.org
  3. server 1.us.pool.ntp.org

server 2.us.pool.ntp.org

  1. Save your changes to /etc/ntp.conf and exit the text editor.
  2. CentOS only. Enter the following command so that NTP starts when the server starts.

chkconfig ntpd on

  1. Restart the service.
    • CentOS

service ntpd restart

  • Ubuntu

service ntp restart

  1. Enter the date command 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. Try the ntpdate pool-server-host-name command. If it fails, search for the error it returns. If all else fails, try restarting the server.

Creating phpinfo.php

  1.  displays a large amount of information about PHP and its extensions. Add the following code anywhere in your web server's docroot:

<?php

// Show all information, defaults to INFO_ALL

phpinfo();

For more information, see the phpinfo manual page.

To view the results, enter the following URL in your browser's location or address field:

http://web-server-ip-or-host/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 Help for CentOS

Installing 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.

For more detailed information about installation, see the phpmyadmin installation documentation.

To install phpmyadmin on CentOS:

  1. Download the epel RPM for the version of CentOS you're using. A sample follows.
  2. cd /tmp
  3. wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

rpm -ivh epel-release-6-8.noarch.rpm

  1. Install phpmyadmin as follows:

yum -y install phpmyadmin

  1. Authorize access to phpmyadmin from your machine's IP address.
    1. Open the following file for editing:

vim /etc/httpd/conf.d/phpMyAdmin.conf

  1. Replace the following IP address with your IP address

#Require ip 127.0.0.1

For example,

Require ip 192.51.100.101

  1. Replace the following IP with your IP address

#Allow from 127.0.0.1

For example,

Allow from 192.51.100.101

  1. Save your changes to /etc/httpd/conf.d/phpMyAdmin.conf and exit the text editor.
  2. Restart Apache.

service httpd restart

  1. To use phpmyadmin, enter the following command in your browser's address or location field:

http://host-or-ip-address/phpmyadmin

  1. When prompted, log in using your MySQL database root or administrative user's user name and password.

To install phpmyadmin on Ubuntu:

  1. Use the following command: 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://host-or-ip-address/phpmyadmin
  4. When prompted, log in using your MySQL database root or administrative user's user name and password.

Creating a Magento Database Instance

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 Installing Optional Sample Data.

Note: Before you continue, review the information about MySQL discussed in Prerequisites.

To create a new database instance:

  1. Log in to your database server as any user.
  2. Enter the following commands in the order shown to create a database instance named magento:
  3. mysql -u root -p
  4. #Enter the remaining commands at the mysql> prompt.
  5.  
  6. create database magento;

GRANT ALL ON magento.* TO magento@localhost IDENTIFIED BY 'magento';

  1. For MySQL versions between 5.0.2 and 5.1.6, you must enter this command:

GRANT SUPER ON *.* TO 'magento'@'localhost';

  1. After you're done, enter exit
  2. Test the database instance.

mysql -u magento -p

Messages similar to the following display to confirm you successfully created the database instance. If errors display, repeat the preceding commands.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 20

Server version: 5.1.67 Source distribution

 

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

 

Oracle is a registered trademark of Oracle Corporation and/or its

 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Extracting the Magento Installation Archive

Extract the Magento installation archive on your web server's docroot.

The path on Ubuntu is typically /var/www

The path on CentOS is typically /var/www/html

Examples follow:

  • Ubuntu
  • cd /var/www
  • cp /path/magento-install-archive .

tar -zxf magento-install-archive-name

  • CentOS
  • cd /var/www/html
  • cp /path/magento-install-archive-name .

tar -zxf magento-install-archive

To optionally install Magento sample data, continue with the next section.

To install Magento without sample data, continue with Setting File and Directory Ownership and Privileges.

Installing Optional Sample Data

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.

You must install sample data on the file system and in the database before you install Magento.

Note: Only if your database is shared between more than one Magento installation. 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.

To skip sample data installation, continue with Setting File and Directory Ownership and Privileges.

To install Magento sample data:

  1. Download the sample data from one of the locations discussed in Getting Magento CE or EE.
  2. If necessary, transfer the sample data to your Magento server.
  3. On your Magento server, extract the sample data archive to a directory other than your Magento installation directory.
  4. Make note of the path to the sample data's media subdirectory.
  5. Change to the [your Magento install dir]/media directory.
  6. #Ubuntu example
  7. cd /var/www/magento/media
  8.  
  9. #CentOS example

cd /var/www/html/magento/media

  1. As a user with privileges to write to the Magento installation directories (typically the web server user), copy the sample data's mediadirectory and subdirectories to your Magento installation directory. For example, to copy Magento sample data from /home/username to /var/www/magento, enter

cp -R /home/username/media/* .

  1. Magento CE 1.9 and Magento EE 1.14 only. You must also copy the sample data's skin directory to [your Magento install dir]/skin as follows: For example, to copy Magento skin files from /home/username/skin to /var/www/magento/skin, enter
  2. cd [your Magento install dir]/skin

cp -R /home/username/skin/* .

  1. Import the CE or EE sample data into your MySQL database as follows:

mysql -u root -p magento-db-instance-name < path-to-sample-data-extract-dir/sample-data-filename.sql

EE 1.14 example

mysql -u root -p magento < /home/username/magento_sample_data_for_1.14.0.0.sql

Setting File and Directory Ownership and Privileges

Magento recommends the following ownership and privilege settings for files and directories in the Magento installation directory:

  • The Magento installation directory and all subdirectories are owned by the web server user. This enables the web server to change files in these subdirectories but other users cannot access them (except a higher-level user such as root).
  • All directories have 700 permissions (drwx------). 700 permissions give full control (that is, read/write/execute) to the owner and no permissions to anyone else.
  • All files have 600 permissions (-rw-------). 600 permissions mean the owner can read and write but other users have no permissions.

Note: The way you set permissions and ownership depends on whether Magento is running on a dedicated or hosted system:

  • Hosted: A Magento server located on a hosting provider. A hosted system typically does not enable you to elevate to root. 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 chmod to change permissions on files and directories.
  • Dedicated: A Magento server you control and operate. Unlike a hosted system, you can elevate to root and, as root, you can use thechown and chmod commands to set ownership and privileges in the Magento installation directory.

To set privileges and ownership:

  1. Log in to your Magento server.
  2. Change to your Magento installation directory:
  3. #Ubuntu example
  4. cd /var/www/magento
  5.  
  6. #CentOS example

cd /var/www/html/magento

  1. Dedicated Magento server only. Enter the following command to set ownership of the Magento installation directory and all its subdirectories:

chown -R web-server-user-name .

For example, on Ubuntu where Apache usually runs as www-data, enter

chown -R www-data .

  1. Enter the following commands to set directory permissions to 700 and file permissions to 600:
  2. find . -type d -exec chmod 700 {} \;

find . -type f -exec chmod 600 {} \;

Installing Magento CE or EE

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.

Important: 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. Get help before you continue your installation.

To install Magento CE or EE:

  1. Complete all of the tasks discussed earlier in this article.
  2. Enter the following URL in your web browser's address or location field:

web-server-ip-or-host:port/magento-path/magento

For example, if your web server is http://www.example.com, listens on port 80, and Magento is installed in the web server docroot'smagento subdirectory, enter

http://www.example.com/magento

The following page displays.

 

  1. Select the check box that indicates you agree to the terms and conditions, and click Continue.
  2. On the Localization page, enter the following information.

Option

Meaning

Locale

From the list, click the option that best matches the locale in which your Magento server resides.

Time Zone

From the list, click the option that best matches the time zone in which your Magento server resides.

Default currency

From the list, click the default currency to use on your Magento web store.


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.

 

 

 

  1. Click Continue. The Configuration page displays. Each of its three sections is discussed in the following step.
  2. In the Configuration page, enter the following information:
    1. In the Database Configuration section, enter the following information.

Option

Meaning

Database Type

From the list, click MySQL.

Host

Enter the database server's fully qualified host name or IP address. Use the default setting of localhost if your database server is on the same host as your web server.

Database Name

Enter the name of the Magento database instance in which you want to install the Magento database tables.

User Name

Enter the user name of the Magento database instance owner.

User Password

Enter the Magento database owner's password.

Tables Prefix

(Optional.) Use only if you'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.

  1. A sample follows.

  1. In the Web Access Options section, enter the following information.

Option

Meaning

Base URL

Enter the base URL to use to access the Magento Admin Panel and your Magento web store.

Admin Path

Enter the path to access the Admin Panel. This path is appended to Base URL. For example, if Base URL is http://www.example.com and Admin Path is admin, the Admin Panel's URL ishttp://www.example.com/admin—provided you configured your web server for server rewrites.

Enable Charts

Select the check box to display charts on the Admin Panel.

Skip Base URL Validation Before the Next Step

Clearing this check box validates your server's base URL by performing an HTTP GET. Clear this check box unless your web server's base URL is not verifiable; for example, in a development or test environment.

Use Web Server (Apache) Rewrites

Select this check box to enable the use of the Apache mod_rewrite module. You can select this check box only if you configured Apache to use server rewrites.

Use Secure URLs (SSL)

Select this check box only if your web server supports SSL.

  1. A sample follows.

  1. In the Session Storage Options section, click one of the following options:
    1. File to store user session data on the file system in the [your Magento install dir]/var/session directory. File-based session storage is appropriate unless the Magento file system access is slow or you have a clustered database.
    2. Database to store user session data in the database. Choose database storage if you have a clustered database; otherwise, there might not be much benefit over file-based storage.
  2. Click Continue.

Important: If errors display, you must resolve them before continuing.

  1. In the Create Admin Account page, enter the following information.

Option

Meaning

First Name

Enter the first name of the user you want to identify as the Magento web store owner.

Last Name

Enter the user's last name.

Email

Enter the user's email address.

Username

Enter the Magento Admin Panel administrator's user name. (You can create additional Magento administrators later.)

Password

Enter the user's password.

Confirm Password

Enter the user's password again for verification.

Encryption Key

If you have one, enter a key to encrypt sensitive data in the Magento database. If you don't have one, Magento generates one for you. The encryption key is stored in [your Magento install dir]/app/etc/local.xml.

  1. A sample follows.

 

  1. Click Continue. The following page displays to indicate a successful installation.

 

Verifying that Magento CE or Magento EE Installed Successfully

To make sure Magento installed properly, you should log in to the Admin Panel to verify the Magento version.

You can also import products into Magento or perform other tasks that verify you can write to the database.

  1. In a web browser's location or address field, enter the URL to the Admin Panel. An example follows:

http://www.example.com/magento/admin

(The Admin Panel URL is a combination of the Base URL and Admin Path fields you entered when you installed Magento.

  1. Log in to the Admin Panel as an administrator.
  2. Scroll to the bottom of the page; the version should display as 1.14 (Magento EE) or 1.9.0.0 (Magento CE). The following figure shows an example.

Congratulations! You successfully installed Magento!

Setting Up Cron Jobs

Several Magento features require at least one cron job, which schedules activities to occur in the future. A partial list of these activities follows:

  • Catalog price rules
  • Newsletters
  • Generating Google sitemaps
  • Customer Alerts/Notifications (product price change, product back in stock)
  • Reindexing (Magento EE 1.13 only)
  • Private sales (Magento EE only)
  • Automatic updating of currency rates
  • Magento EE 1.14.1 and later, Magento CE 1.9.1 and later All Magento e-mails (including order confirmation and transactional)

Note: Magento depends on proper cron job configuration for many important system functions, including indexing. Failure to set it up properly means Magento won't function as expected.

Magento recommends running cron every minute for EE and every five minutes for CE.

UNIX systems schedule tasks to be performed by particular users using a crontab, which is a file that contains instructions to the cron daemon that tell the daemon in effect to "run this command at this time on this date". Each user has its own crontab, and commands in any given crontab are executed as the user who owns the crontab.

For Magento, this user is the web server. To determine your web server's user, enter the following command:

ps -o "user group command" -C httpd,apache2

In CentOS, the Apache user is typically apache; in Ubuntu, it's typically www-data.

To create a cron job as the user who runs Apache, the following commands in the order shown:

  1. Create or edit a crontab for the Apache user:

crontab -u apache-user-name -e

  1. A text editor displays. (You might need to choose a text editor first.) In the editor, enter the following:

* * * * * /bin/sh /[your Magento install dir]/cron.sh

For example, for CentOS,

* * * * *  /bin/sh /var/www/html/magento/cron.sh

  1. Save your changes to the crontab and exit the editor.

Setting Magento File System Permissions and Ownership After Installation

To secure your Magento installation after the installation, see After You Install Magento: Recommended File System Ownership and Privileges.

Troubleshooting

This section discusses some suggestions for issues you might encounter when installing Magento.

Issue

Suggested solution

During the installation, errors like the following display: Path "/var/www/html/magento/app/etc" must be writable.

Set privileges and ownership on the Magento installation directory and subdirectories as discussed in Setting File and Directory Ownership and Privileges.

You never advance past the installer's Configuration page.

Try selecting the Skip Base URL Validation Before the Next Step check box. If problems persist, get help.

 

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Support from NetForChoice