Skip to content
Home » Linux » How to Install LAMP on CentOS 6.4 - By Example

How to Install LAMP on CentOS 6.4 - By Example

As a developer, you may choose WAMP for development. But for testing purpose, you may want a similar environment to the production. LAMP could be a closer solution to you. In this example, we use alternative yum repositories, like CentALT, remi. You may refer to this post for more information about install alternative yum repositories: How to Get the Newest Release of Packages on CentOS.

Here are the steps to install LAMP.

Install Apache httpd server 2.2.25

[root@localhost ~]# yum info httpd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.hust.edu.cn
 * extras: mirrors.stuhome.net
 * updates: mirror.neu.edu.cn
Installed Packages
Name        : httpd
Arch        : x86_64
Version     : 2.2.15
Release     : 26.el6.centos
Size        : 2.9 M
Repo        : installed
From repo   : anaconda-CentOS-201303020151.x86_64
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.

Available Packages
Name        : httpd
Arch        : x86_64
Version     : 2.2.25
Release     : 1.el6
Size        : 886 k
Repo        : CentALT
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.

[root@localhost ~]# yum install httpd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.hust.edu.cn
 * extras: mirrors.neusoft.edu.cn
 * updates: mirror.neu.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.15-26.el6.centos will be updated
---> Package httpd.x86_64 0:2.2.25-1.el6 will be an update
--> Processing Dependency: httpd-tools = 2.2.25-1.el6 for package: httpd-2.2.25-1.el6.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.2.15-26.el6.centos will be updated
---> Package httpd-tools.x86_64 0:2.2.25-1.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
 Package                      Arch                    Version                       Repository                Size
===================================================================================================================
Updating:
 httpd                        x86_64                  2.2.25-1.el6                  CentALT                  886 k
Updating for dependencies:
 httpd-tools                  x86_64                  2.2.25-1.el6                  CentALT                   62 k

Transaction Summary
===================================================================================================================
Upgrade       2 Package(s)

Total download size: 947 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): httpd-2.2.25-1.el6.x86_64.rpm                                                        | 886 kB     00:12
(2/2): httpd-tools-2.2.25-1.el6.x86_64.rpm                                                  |  62 kB     00:00
-------------------------------------------------------------------------------------------------------------------
Total                                                                               61 kB/s | 947 kB     00:15
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Updating   : httpd-tools-2.2.25-1.el6.x86_64                                                                 1/4
  Updating   : httpd-2.2.25-1.el6.x86_64                                                                       2/4
  Cleanup    : httpd-2.2.15-26.el6.centos.x86_64                                                               3/4
  Cleanup    : httpd-tools-2.2.15-26.el6.centos.x86_64                                                         4/4
  Verifying  : httpd-2.2.25-1.el6.x86_64                                                                       1/4
  Verifying  : httpd-tools-2.2.25-1.el6.x86_64                                                                 2/4
  Verifying  : httpd-2.2.15-26.el6.centos.x86_64                                                               3/4
  Verifying  : httpd-tools-2.2.15-26.el6.centos.x86_64                                                         4/4

Updated:
  httpd.x86_64 0:2.2.25-1.el6

Dependency Updated:
  httpd-tools.x86_64 0:2.2.25-1.el6

Complete!

Install MySQL 5.5

[root@localhost ~]# yum info mysql mysql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.yun-idc.com
 * extras: mirrors.neusoft.edu.cn
 * updates: mirror.neu.edu.cn
Available Packages
Name        : mysql
Arch        : x86_64
Version     : 5.5.29
Release     : 1.el6
Size        : 5.6 M
Repo        : CentALT
Summary     : MySQL client programs and shared libraries
URL         : http://www.mysql.com
License     : GPLv2 with exceptions
Description : MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
            : client/server implementation consisting of a server daemon (mysqld)
            : and many different client programs and libraries. The base package
            : contains the standard MySQL client programs and generic MySQL files.

Name        : mysql-server
Arch        : x86_64
Version     : 5.5.29
Release     : 1.el6
Size        : 10 M
Repo        : CentALT
Summary     : The MySQL server and related files
URL         : http://www.mysql.com
License     : GPLv2 with exceptions
Description : MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
            : client/server implementation consisting of a server daemon (mysqld)
            : and many different client programs and libraries. This package contains
            : the MySQL server and some accompanying files and directories.

[root@localhost ~]# yum install mysql mysql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.hust.edu.cn
 * extras: mirrors.neusoft.edu.cn
 * updates: mirror.neu.edu.cn
Setting up Install Process
Package mysql is obsoleted by mariadb, trying to install mariadb-5.5.32-1.el6.x86_64 instead
Package mysql-server is obsoleted by mariadb-server, trying to install mariadb-server-5.5.32-1.el6.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 0:5.5.32-1.el6 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 5.5.32-1.el6 for package: mariadb-5.5.32-1.el6.x86_64
--> Processing Dependency: perl(DBI) for package: mariadb-5.5.32-1.el6.x86_64
---> Package mariadb-server.x86_64 0:5.5.32-1.el6 will be installed
--> Processing Dependency: perl-DBD-MySQL for package: mariadb-server-5.5.32-1.el6.x86_64
--> Processing Dependency: libJudy.so.1()(64bit) for package: mariadb-server-5.5.32-1.el6.x86_64
--> Processing Dependency: libevent-1.4.so.2()(64bit) for package: mariadb-server-5.5.32-1.el6.x86_64
--> Processing Dependency: libprotobuf-lite.so.6()(64bit) for package: mariadb-server-5.5.32-1.el6.x86_64
--> Running transaction check
---> Package Judy.x86_64 0:1.0.5-1.el6 will be installed
---> Package libevent.x86_64 0:1.4.13-4.el6 will be installed
---> Package mariadb-libs.x86_64 0:5.5.32-1.el6 will be obsoleting
---> Package mysql-libs.x86_64 0:5.1.66-2.el6_3 will be obsoleted
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
---> Package perl-DBD-MySQL.x86_64 0:4.020-1.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
---> Package protobuf-lite.x86_64 0:2.3.0-7.el6 will be installed
--> Running transaction check
---> Package postfix.x86_64 2:2.6.6-2.2.el6_1 will be updated
---> Package postfix.x86_64 2:2.10.0-1.el6 will be an update
--> Processing Dependency: postgresql-libs for package: 2:postfix-2.10.0-1.el6.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: 2:postfix-2.10.0-1.el6.x86_64
--> Running transaction check
---> Package postgresql-libs.x86_64 0:8.4.13-1.el6_3 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
 Package                        Arch                  Version                         Repository              Size
===================================================================================================================
Installing:
 mariadb                        x86_64                5.5.32-1.el6                    CentALT                 10 M
 mariadb-libs                   x86_64                5.5.32-1.el6                    CentALT                822 k
     replacing  mysql-libs.x86_64 5.1.66-2.el6_3
 mariadb-server                 x86_64                5.5.32-1.el6                    CentALT                 13 M
Installing for dependencies:
 Judy                           x86_64                1.0.5-1.el6                     epel                   114 k
 libevent                       x86_64                1.4.13-4.el6                    base                    66 k
 perl-DBD-MySQL                 x86_64                4.020-1.el6                     CentALT                142 k
 perl-DBI                       x86_64                1.609-4.el6                     base                   705 k
 postgresql-libs                x86_64                8.4.13-1.el6_3                  base                   200 k
 protobuf-lite                  x86_64                2.3.0-7.el6                     epel                    56 k
Updating for dependencies:
 postfix                        x86_64                2:2.10.0-1.el6                  CentALT                2.6 M

Transaction Summary
===================================================================================================================
Install       9 Package(s)
Upgrade       1 Package(s)

Total download size: 28 M
Is this ok [y/N]: y
Downloading Packages:
(1/10): Judy-1.0.5-1.el6.x86_64.rpm                                                         | 114 kB     00:00
(2/10): libevent-1.4.13-4.el6.x86_64.rpm                                                    |  66 kB     00:00
(3/10): mariadb-5.5.32-1.el6.x86_64.rpm                                                     |  10 MB     00:24
(4/10): mariadb-libs-5.5.32-1.el6.x86_64.rpm                                                | 822 kB     00:02
(5/10): mariadb-server-5.5.32-1.el6.x86_64.rpm                                              |  13 MB     00:32
(6/10): perl-DBD-MySQL-4.020-1.el6.x86_64.rpm                                               | 142 kB     00:00
(7/10): perl-DBI-1.609-4.el6.x86_64.rpm                                                     | 705 kB     00:01
(8/10): postfix-2.10.0-1.el6.x86_64.rpm                                                     | 2.6 MB     00:13
(9/10): postgresql-libs-8.4.13-1.el6_3.x86_64.rpm                                           | 200 kB     00:00
(10/10): protobuf-lite-2.3.0-7.el6.x86_64.rpm                                               |  56 kB     00:00
-------------------------------------------------------------------------------------------------------------------
Total                                                                              336 kB/s |  28 MB     01:24
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <[email protected]>
 Package: centos-release-6-4.el6.centos.10.x86_64 (@anaconda-CentOS-201303020151.x86_64/6.4)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid : EPEL (6) <[email protected]>
 Package: epel-release-6-8.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : mariadb-libs-5.5.32-1.el6.x86_64                                                               1/12
  Installing : perl-DBI-1.609-4.el6.x86_64                                                                    2/12
  Installing : mariadb-5.5.32-1.el6.x86_64                                                                    3/12
  Installing : perl-DBD-MySQL-4.020-1.el6.x86_64                                                              4/12
  Installing : Judy-1.0.5-1.el6.x86_64                                                                        5/12
  Installing : libevent-1.4.13-4.el6.x86_64                                                                   6/12
  Installing : protobuf-lite-2.3.0-7.el6.x86_64                                                               7/12
  Installing : postgresql-libs-8.4.13-1.el6_3.x86_64                                                          8/12
  Updating   : 2:postfix-2.10.0-1.el6.x86_64                                                                  9/12
  Installing : mariadb-server-5.5.32-1.el6.x86_64                                                            10/12
  Cleanup    : 2:postfix-2.6.6-2.2.el6_1.x86_64                                                              11/12
  Erasing    : mysql-libs-5.1.66-2.el6_3.x86_64                                                              12/12
  Verifying  : perl-DBD-MySQL-4.020-1.el6.x86_64                                                              1/12
  Verifying  : postgresql-libs-8.4.13-1.el6_3.x86_64                                                          2/12
  Verifying  : protobuf-lite-2.3.0-7.el6.x86_64                                                               3/12
  Verifying  : 2:postfix-2.10.0-1.el6.x86_64                                                                  4/12
  Verifying  : libevent-1.4.13-4.el6.x86_64                                                                   5/12
  Verifying  : perl-DBI-1.609-4.el6.x86_64                                                                    6/12
  Verifying  : mariadb-libs-5.5.32-1.el6.x86_64                                                               7/12
  Verifying  : Judy-1.0.5-1.el6.x86_64                                                                        8/12
  Verifying  : mariadb-server-5.5.32-1.el6.x86_64                                                             9/12
  Verifying  : mariadb-5.5.32-1.el6.x86_64                                                                   10/12
  Verifying  : 2:postfix-2.6.6-2.2.el6_1.x86_64                                                              11/12
  Verifying  : mysql-libs-5.1.66-2.el6_3.x86_64                                                              12/12

Installed:
  mariadb.x86_64 0:5.5.32-1.el6     mariadb-libs.x86_64 0:5.5.32-1.el6     mariadb-server.x86_64 0:5.5.32-1.el6

Dependency Installed:
  Judy.x86_64 0:1.0.5-1.el6       libevent.x86_64 0:1.4.13-4.el6            perl-DBD-MySQL.x86_64 0:4.020-1.el6
  perl-DBI.x86_64 0:1.609-4.el6   postgresql-libs.x86_64 0:8.4.13-1.el6_3   protobuf-lite.x86_64 0:2.3.0-7.el6

Dependency Updated:
  postfix.x86_64 2:2.10.0-1.el6

Replaced:
  mysql-libs.x86_64 0:5.1.66-2.el6_3

Complete!

Install PHP 5.4

But this time, we indicate another yum repository remi instead of CentALT or the default one.

[root@localhost ~]# yum --enablerepo=remi info php
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.hust.edu.cn
 * extras: mirrors.neusoft.edu.cn
 * remi: mirror.smartmedia.net.id
 * updates: mirror.neu.edu.cn
Available Packages
Name        : php
Arch        : x86_64
Version     : 5.4.17
Release     : 2.el6.remi
Size        : 2.7 M
Repo        : remi
Summary     : PHP scripting language for creating dynamic web sites
URL         : http://www.php.net/
License     : PHP and Zend and BSD
Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
            : easy for developers to write dynamically generated web pages. PHP also
            : offers built-in database integration for several commercial and
            : non-commercial database management systems, so writing a
            : database-enabled webpage with PHP is fairly simple. The most common
            : use of PHP coding is probably as a replacement for CGI scripts.
            :
            : The php package contains the module which adds support for the PHP
            : language to Apache HTTP Server.

[root@localhost ~]# yum --enablerepo=remi install php
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.yun-idc.com
 * extras: mirrors.neusoft.edu.cn
 * remi: mirror.smartmedia.net.id
 * updates: mirror.neu.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.17-2.el6.remi will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.17-2.el6.remi for package: php-5.4.17-2.el6.remi.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.4.17-2.el6.remi for package: php-5.4.17-2.el6.remi.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:5.4.17-2.el6.remi will be installed
---> Package php-common.x86_64 0:5.4.17-2.el6.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
 Package                    Arch                   Version                              Repository            Size
===================================================================================================================
Installing:
 php                        x86_64                 5.4.17-2.el6.remi                    remi                 2.7 M
Installing for dependencies:
 php-cli                    x86_64                 5.4.17-2.el6.remi                    remi                 2.6 M
 php-common                 x86_64                 5.4.17-2.el6.remi                    remi                 922 k

Transaction Summary
===================================================================================================================
Install       3 Package(s)

Total download size: 6.2 M
Installed size: 24 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): php-5.4.17-2.el6.remi.x86_64.rpm                                                     | 2.7 MB     00:11
(2/3): php-cli-5.4.17-2.el6.remi.x86_64.rpm                                                 | 2.6 MB     00:10
(3/3): php-common-5.4.17-2.el6.remi.x86_64.rpm                                              | 922 kB     00:03
-------------------------------------------------------------------------------------------------------------------
Total                                                                              251 kB/s | 6.2 MB     00:25
warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Importing GPG key 0x00F97F56:
 Userid : Remi Collet <[email protected]>
 Package: remi-release-6-2.el6.remi.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-common-5.4.17-2.el6.remi.x86_64                                                             1/3

WARNING : These php-* RPM are not official Fedora / Red Hat build and
overrides the official ones. Don't file bugs on Fedora Project nor Red Hat.

Use dedicated forums http://forums.famillecollet.com/

  Installing : php-cli-5.4.17-2.el6.remi.x86_64                                                                2/3
  Installing : php-5.4.17-2.el6.remi.x86_64                                                                    3/3
  Verifying  : php-5.4.17-2.el6.remi.x86_64                                                                    1/3
  Verifying  : php-common-5.4.17-2.el6.remi.x86_64                                                             2/3
  Verifying  : php-cli-5.4.17-2.el6.remi.x86_64                                                                3/3

Installed:
  php.x86_64 0:5.4.17-2.el6.remi

Dependency Installed:
  php-cli.x86_64 0:5.4.17-2.el6.remi                     php-common.x86_64 0:5.4.17-2.el6.remi

Complete!

Install PHP modules

[root@localhost ~]# yum --enablerepo=remi info php-mysql php-pdo php-pecl-geoip php-gd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.hust.edu.cn
 * extras: mirrors.neusoft.edu.cn
 * remi: mirror.smartmedia.net.id
 * updates: mirror.neu.edu.cn
Available Packages
Name        : php-gd
Arch        : x86_64
Version     : 5.4.17
Release     : 2.el6.remi
Size        : 141 k
Repo        : remi
Summary     : A module for PHP applications for using the gd graphics library
URL         : http://www.php.net/
License     : PHP and BSD
Description : The php-gd package contains a dynamic shared object that will add
            : support for using the gd graphics library to PHP.

Name        : php-mysql
Arch        : x86_64
Version     : 5.4.17
Release     : 2.el6.remi
Size        : 134 k
Repo        : remi
Summary     : A module for PHP applications that use MySQL databases
URL         : http://www.php.net/
License     : PHP
Description : The php-mysql package contains a dynamic shared object that will add
            : MySQL database support to PHP. MySQL is an object-relational database
            : management system. PHP is an HTML-embeddable scripting language. If
            : you need MySQL support for PHP applications, you will need to install
            : this package and the php package.

Name        : php-pdo
Arch        : x86_64
Version     : 5.4.17
Release     : 2.el6.remi
Size        : 118 k
Repo        : remi
Summary     : A database access abstraction module for PHP applications
URL         : http://www.php.net/
License     : PHP
Description : The php-pdo package contains a dynamic shared object that will add
            : a database access abstraction layer to PHP.  This module provides
            : a common interface for accessing MySQL, PostgreSQL or other
            : databases.

Name        : php-pecl-geoip
Arch        : x86_64
Version     : 1.0.8
Release     : 3.el6.remi.1
Size        : 16 k
Repo        : remi
Summary     : Extension to map IP addresses to geographic places
URL         : http://pecl.php.net/package/geoip
License     : PHP
Description : This PHP extension allows you to find the location of an IP address
            : City, State, Country, Longitude, Latitude, and other information as
            : all, such as ISP and connection type. It makes use of Maxminds geoip
            : database

[root@localhost ~]# yum --enablerepo=remi install php-mysql php-pdo php-pecl-geoip php-gd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.yun-idc.com
 * extras: mirrors.neusoft.edu.cn
 * remi: mirror.smartmedia.net.id
 * updates: mirror.neu.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.4.17-2.el6.remi will be installed
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.4.17-2.el6.remi.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-5.4.17-2.el6.remi.x86_64
---> Package php-mysql.x86_64 0:5.4.17-2.el6.remi will be installed
---> Package php-pdo.x86_64 0:5.4.17-2.el6.remi will be installed
---> Package php-pecl-geoip.x86_64 0:1.0.8-3.el6.remi.1 will be installed
--> Processing Dependency: /usr/bin/pecl for package: php-pecl-geoip-1.0.8-3.el6.remi.1.x86_64
--> Processing Dependency: /usr/bin/pecl for package: php-pecl-geoip-1.0.8-3.el6.remi.1.x86_64
--> Processing Dependency: libGeoIP.so.1()(64bit) for package: php-pecl-geoip-1.0.8-3.el6.remi.1.x86_64
--> Running transaction check
---> Package GeoIP.x86_64 0:1.4.8-1.el6 will be installed
---> Package libXpm.x86_64 0:3.5.10-2.el6 will be installed
---> Package php-pear.noarch 1:1.9.4-12.el6.remi.1 will be installed
---> Package t1lib.x86_64 0:5.1.2-6.el6_2.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
 Package                      Arch                 Version                                Repository          Size
===================================================================================================================
Installing:
 php-gd                       x86_64               5.4.17-2.el6.remi                      remi               141 k
 php-mysql                    x86_64               5.4.17-2.el6.remi                      remi               134 k
 php-pdo                      x86_64               5.4.17-2.el6.remi                      remi               118 k
 php-pecl-geoip               x86_64               1.0.8-3.el6.remi.1                     remi                16 k
Installing for dependencies:
 GeoIP                        x86_64               1.4.8-1.el6                            epel               620 k
 libXpm                       x86_64               3.5.10-2.el6                           base                51 k
 php-pear                     noarch               1:1.9.4-12.el6.remi.1                  remi               376 k
 t1lib                        x86_64               5.1.2-6.el6_2.1                        base               160 k

Transaction Summary
===================================================================================================================
Install       8 Package(s)

Total download size: 1.6 M
Installed size: 5.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): GeoIP-1.4.8-1.el6.x86_64.rpm                                                         | 620 kB     00:00
(2/8): libXpm-3.5.10-2.el6.x86_64.rpm                                                       |  51 kB     00:00
(3/8): php-gd-5.4.17-2.el6.remi.x86_64.rpm                                                  | 141 kB     00:00
(4/8): php-mysql-5.4.17-2.el6.remi.x86_64.rpm                                               | 134 kB     00:00
(5/8): php-pdo-5.4.17-2.el6.remi.x86_64.rpm                                                 | 118 kB     00:00
(6/8): php-pear-1.9.4-12.el6.remi.1.noarch.rpm                                              | 376 kB     00:01
(7/8): php-pecl-geoip-1.0.8-3.el6.remi.1.x86_64.rpm                                         |  16 kB     00:00
(8/8): t1lib-5.1.2-6.el6_2.1.x86_64.rpm                                                     | 160 kB     00:00
-------------------------------------------------------------------------------------------------------------------
Total                                                                              293 kB/s | 1.6 MB     00:05
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : GeoIP-1.4.8-1.el6.x86_64                                                                        1/8
  Installing : 1:php-pear-1.9.4-12.el6.remi.1.noarch                                                           2/8
  Installing : libXpm-3.5.10-2.el6.x86_64                                                                      3/8
  Installing : t1lib-5.1.2-6.el6_2.1.x86_64                                                                    4/8
  Installing : php-pdo-5.4.17-2.el6.remi.x86_64                                                                5/8
  Installing : php-mysql-5.4.17-2.el6.remi.x86_64                                                              6/8
  Installing : php-gd-5.4.17-2.el6.remi.x86_64                                                                 7/8
  Installing : php-pecl-geoip-1.0.8-3.el6.remi.1.x86_64                                                        8/8
  Verifying  : php-pdo-5.4.17-2.el6.remi.x86_64                                                                1/8
  Verifying  : php-mysql-5.4.17-2.el6.remi.x86_64                                                              2/8
  Verifying  : php-gd-5.4.17-2.el6.remi.x86_64                                                                 3/8
  Verifying  : t1lib-5.1.2-6.el6_2.1.x86_64                                                                    4/8
  Verifying  : libXpm-3.5.10-2.el6.x86_64                                                                      5/8
  Verifying  : 1:php-pear-1.9.4-12.el6.remi.1.noarch                                                           6/8
  Verifying  : php-pecl-geoip-1.0.8-3.el6.remi.1.x86_64                                                        7/8
  Verifying  : GeoIP-1.4.8-1.el6.x86_64                                                                        8/8

Installed:
  php-gd.x86_64 0:5.4.17-2.el6.remi                    php-mysql.x86_64 0:5.4.17-2.el6.remi
  php-pdo.x86_64 0:5.4.17-2.el6.remi                   php-pecl-geoip.x86_64 0:1.0.8-3.el6.remi.1

Dependency Installed:
  GeoIP.x86_64 0:1.4.8-1.el6          libXpm.x86_64 0:3.5.10-2.el6      php-pear.noarch 1:1.9.4-12.el6.remi.1
  t1lib.x86_64 0:5.1.2-6.el6_2.1

Complete!

Startup httpd and mysqld service

[root@localhost ~]# service httpd status
httpd is stopped
[root@localhost ~]# service mysqld status
mysqld is stopped
[root@localhost ~]# service httpd start
Starting httpd:                                            [  OK  ]
[root@localhost ~]# service mysqld start
Initializing MySQL database:  Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://kb.askmonty.org or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl

Please report any problems with the '/usr/bin/mysqlbug' script!

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from
Monty Program Ab. You can contact us about this at [email protected].
Alternatively consider joining our community based development effort:
http://kb.askmonty.org/en/contributing-to-the-mariadb-project/

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@localhost ~]# service httpd status
httpd (pid  2035) is running...
[root@localhost ~]# service mysqld status
mysqld (pid 1883) is running...

Set the run level of httpd and mysql

[root@localhost ~]# chkconfig --list httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@localhost ~]# chkconfig httpd on
[root@localhost ~]# chkconfig --list httpd
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@localhost ~]# chkconfig --list mysqld
mysqld          0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@localhost ~]# chkconfig mysqld on
[root@localhost ~]# chkconfig --list mysqld
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off

Open www (http) port on firewall

[root@localhost ~]# system-config-firewall
...

See the result in browser from a remote client

http://10.12.92.34/

Setup mysql root password at the first time

[root@localhost ~]# mysqladmin -u root password
New password:
Confirm new password:

LAMP is installed.

Leave a Reply

Your email address will not be published. Required fields are marked *