Install Apache/PHP 5.5.7, MariaDB 5.5.34 on CentOS 6.5

This howto guide explains you’ll how to install Apache Server with latest MariaDB 5.5.34 and PHP 5.5.7 versions on CentOS 6.5 systems using Remi repository via Yum tool.

We are going to install all these following PHP modules in this installation.

  • APC (php-pecl-apc) – APC caches and optimizes PHP intermediate code
  • CLI (php-cli) – Command-line interface for PHP
  • PEAR (php-pear) – PHP Extension and Application Repository framework
  • PDO (php-pdo) – A database access abstraction module for PHP applications
  • MySQL (php-mysqlnd) – A module for PHP applications that use MySQL databases
  • PostgreSQL (php-pgsql) – A PostgreSQL database module for PHP
  • MongoDB (php-pecl-mongo) – PHP MongoDB database driver
  • SQLite (php-sqlite) – Extension for the SQLite V2 Embeddable SQL Database Engine
  • Memcache (php-pecl-memcache) – Extension to work with the Memcached caching daemon
  • Memcached (php-pecl-memcached) – Extension to work with the Memcached caching daemon
  • GD (php-gd) – A module for PHP applications for using the gd graphics library
  • XML (php-xml) – A module for PHP applications which use XML
  • MBString (php-mbstring) – A module for PHP applications which need multi-byte string handling
  • MCrypt (php-mcrypt) – Standard PHP module provides mcrypt library support

Install REMI repository

First enable remi repository

## Install Remi on CentOS 6.5 - 32 Bit ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 

## Install Remi on CentOS 6.5 - 64 Bit ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Installing MariaDB 5.5.34

We highly recommended to use custom MariaDB YUM repository to install. Create a repo file under/etc/yum.repos.d/MariaDB.repo, Copy and paste following line under MariaDB repo:

Add repository on Centos 6 32-bit

# vi /etc/yum.repos.d/MariaDB.repo

and paste following line:

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Add repository on Centos 6 64-bit

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Once you’ve placed MariaDB.repo file under /etc/yum.repos.d/. Let’s install with following YUM command:

# yum install MariaDB-server MariaDB-client -y

After complite installation process, start MariaDB width following command:

# service mysql start

Set MariaDB to start on boot:

# chkconfig mysql on

Read also: How to install MariaDB 5.5.33a Database on RHEL/CentOS/Fedora and Debian/Ubuntu linux

Install Apache HTTP Server (httpd) and PHP 5.5.7

# yum --enablerepo=remi,remi-php55 install httpd php php-common

Install PHP 5.5.7 modules

Select what you need: APC, CLI, PEAR, PDO, MySQL, PostgreSQL, MongoDB, SQLite, Memcache, Memcached, GD, MBString, MCrypt, XML

# yum --enablerepo=remi,remi-php55 install php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml

Start Apache server (httpd) and autostart Apache server (httpd) on boot

# service httpd start
# chkconfig httpd on

Create test PHP page to check that Apache, PHP and PHP modules are working

# vi /var/www/html/info.php

and paste following code:

 

Check created page with browser

Access following address, with your browser. http://ip.add.re.ss/info.php

PHP 5.5.7 Preview
PHP 5.5.7 Preview

That’s it!. If you are having any trouble installing, let me know via our comment section.

8 thoughts on “Install Apache/PHP 5.5.7, MariaDB 5.5.34 on CentOS 6.5”

  1. My info.php does not show up.

    Not Found

    The requested URL /info.php was not found on this server.

    Apache/2.2.15 (CentOS) Server at 10.62.85.140 Port 80

    Reply

Leave a Comment