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.
Updating System Software
It's a good practice to update your repositories and optionally update system software.
yum -y update
Optionally upgrade software. This might cause a system reboot.
yum -y upgrade
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
Install Apache 2 if you haven't already done so.
yum -y install httpd
Enabling Apache Rewrites
- Locate the block that starts with:
- In that block, change the value of
- Save your changes to
httpd.confand exit the text editor.
- Restart Apache.
service httpd restart
Magento CE and EE support the following PHP versions:
- Magento CE 18.104.22.168–22.214.171.124 and Magento EE 126.96.36.199–188.8.131.52 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:
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:
See one of the following sections for more information:
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:
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.
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:
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:
yum -y install php55w-xml php55w-mcrypt php55w-gd php55w-devel php55w-mysql php55w-mbstring
yum -y install --enablerepo=remi php-mcrypt gd gd-devel php-gd php-mysql php54w-mbstring
Increasing the PHP Memory Limit
php.ini to at least 512MB.
/etc/php.iniin a text editor.
memory_limit = 512M
- Save your changes and exit the text editor.
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.
The following procedure is based on Install MySQL Server 5.6 in CentOS 6.x and Red Hat 6.x Linux.
- Install the MySQL database:
cd /tmp wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm rpm -ivh mysql-community-release-el6-5.noarch.rpm yum -y install mysql-server
- Start MySQL.
service mysqld start
- Set a password for the
rootuser and set other security-related options. Enter the following command and follow the prompts on your screen to complete the configuration.
After installing the required prerequisite software, continue your installation with Preparing Your Server for Magento CE or EE.