LinTut

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.

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

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

Exit mobile version