How to Fix “Could not reliably determine the server’s fully qualified domain name”

apache-http-serverQuestion :
How to fix “Could not reliably determine the server’s fully qualified domain name” when starting apache httpd service ?

[root@centos64 ~]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for centos64.ehowstuff.local
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]

Answer :

Step 1:

Update /etc/hosts and do server’s ip address resolvable to the fully qualified domain name(fqdn) or hostname.

[root@centos64 ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.2.62 centos64.ehowstuff.local

Step 2:

Restart apache httpd service :

[root@centos64 ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

How to Enable mod_perl on Linux CentOS 6.3

The default apache configuration installed without mod_perl. This can be a good idea in order to minimize the number of things that can go wrong. This post will covers the steps to enable mod_perl on linux CentOS 6.3. This will make Perl script be fast and increase the performance.

Prerequisites:
How to Install Httpd on CentOS 6.3

1. To Enable mod_perl, simply run the following command :

[root@centos63 ~]# yum install mod_perl -y
Loaded plugins: fastestmirror, presto, priorities
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * extras: centos.ipserverone.com
 * updates: centos.ipserverone.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mod_perl.i686 0:2.0.4-10.el6 will be installed
--> Processing Dependency: perl(BSD::Resource) for package: mod_perl-2.0.4-10.el6.i686
--> Running transaction check
---> Package perl-BSD-Resource.i686 0:1.29.03-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                       Arch             Version                      Repository        Size
====================================================================================================
Installing:
 mod_perl                      i686             2.0.4-10.el6                 base             3.2 M
Installing for dependencies:
 perl-BSD-Resource             i686             1.29.03-3.el6                base              35 k

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

Total download size: 3.2 M
Installed size: 6.0 M
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 3.2 M
(1/2): mod_perl-2.0.4-10.el6.i686.rpm                                        | 3.2 MB     00:27
(2/2): perl-BSD-Resource-1.29.03-3.el6.i686.rpm                              |  35 kB     00:00
----------------------------------------------------------------------------------------------------
Total                                                               117 kB/s | 3.2 MB     00:27
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : perl-BSD-Resource-1.29.03-3.el6.i686                                             1/2
  Installing : mod_perl-2.0.4-10.el6.i686                                                       2/2
  Verifying  : mod_perl-2.0.4-10.el6.i686                                                       1/2
  Verifying  : perl-BSD-Resource-1.29.03-3.el6.i686                                             2/2

Installed:
  mod_perl.i686 0:2.0.4-10.el6

Dependency Installed:
  perl-BSD-Resource.i686 0:1.29.03-3.el6

Complete!

2. Configure PerlRun mode :

[root@centos63 ~]# vi /etc/httpd/conf.d/perl.conf

a) Original :

#PerlSwitches -w

Uncomment or change to :

PerlSwitches -w

b) Original :

#PerlSwitches -T

Uncomment or change to :

PerlSwitches -T

c) Original :

#Alias /perl /var/www/perl
#<Directory /var/www/perl>
#    SetHandler perl-script
#    PerlResponseHandler ModPerl::Registry
#    PerlOptions +ParseHeaders
#    Options +ExecCGI
#</Directory>

Uncomment or change to :

Alias /perl /var/www/perl
<Directory /var/www/perl>
    SetHandler perl-script
#   AddHandler perl-script .cgi
#   PerlResponseHandler ModPerl::Registry
    PerlResponseHandler ModPerl::PerlRun
    PerlOptions +ParseHeaders
    Options +ExecCGI
</Directory>

d) Original :

#<Location /perl-status>
#    SetHandler perl-script
#    PerlResponseHandler Apache2::Status
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>

Uncomment or change to :

<Location /perl-status>
    SetHandler perl-script
    PerlResponseHandler Apache2::Status
    Order deny,allow
    Deny from all
    Allow from 192.168.2.0/24
</Location>

3. Restart Apache :

[root@centos63 ~]# /etc/rc.d/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

4. Make sure if it works normally :

Browse to http://192.168.2.54/perl-status

mod_perl

5. Configure Registry mode :

Alias /perl /var/www/perl
<Directory /var/www/perl>
    SetHandler perl-script
# AddHandler perl-script .cgi
    PerlResponseHandler ModPerl::Registry
#  PerlResponseHandler ModPerl::PerlRun
    PerlOptions +ParseHeaders
    Options +ExecCGI
</Directory>

6. Restart Apache :

[root@centos63 ~]# /etc/rc.d/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

How to Install Httpd on CentOS 6.3

This post will show you the quick steps to install apache httpd on linux CentOS 6.3 server. Apache httpd is one of the most popular web servers and has a lot of features that make it very extensible and useful for many different types of websites.

1. Install httpd using yum command :

[root@centos63 ~]# yum install httpd -y

Examples :

[root@centos63 ~]# yum install httpd -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * updates: mirrors.hostemo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.i686 0:2.2.15-15.el6.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos.1 for package: httpd-2.2.15-15.el6.centos.1.i686
--> Processing Dependency: libaprutil-1.so.0 for package: httpd-2.2.15-15.el6.centos.1.i686
--> Processing Dependency: libapr-1.so.0 for package: httpd-2.2.15-15.el6.centos.1.i686
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.1.i686
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.1.i686
--> Running transaction check
---> Package apr.i686 0:1.3.9-5.el6_2 will be installed
---> Package apr-util.i686 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.i686 0:1.3.9-3.el6_0.1 will be installed
---> Package httpd-tools.i686 0:2.2.15-15.el6.centos.1 will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                 Arch             Version                           Repository         Size
====================================================================================================
Installing:
 httpd                   i686             2.2.15-15.el6.centos.1            base              819 k
Installing for dependencies:
 apr                     i686             1.3.9-5.el6_2                     updates           129 k
 apr-util                i686             1.3.9-3.el6_0.1                   base               89 k
 apr-util-ldap           i686             1.3.9-3.el6_0.1                   base               15 k
 httpd-tools             i686             2.2.15-15.el6.centos.1            base               70 k
 mailcap                 noarch           2.1.31-2.el6                      base               27 k

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

Total download size: 1.1 M
Installed size: 3.4 M
Downloading Packages:
Setting up and reading Presto delta metadata
http://mirrors.hostemo.com/CentOS/6.3/updates/i386/repodata/1dbb6d68b2b39e2eab5888b04cfa0f20a86cb7c4ee54420384eaf8fa0f3d326d-prestodelta.xml.gz: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
updates/prestodelta                                                          |  18 kB     00:00
Processing delta metadata
Package(s) data still to download: 1.1 M
(1/6): apr-1.3.9-5.el6_2.i686.rpm                                            | 129 kB     00:00
(2/6): apr-util-1.3.9-3.el6_0.1.i686.rpm                                     |  89 kB     00:00
(3/6): apr-util-ldap-1.3.9-3.el6_0.1.i686.rpm                                |  15 kB     00:00
(4/6): httpd-2.2.15-15.el6.centos.1.i686.rpm                                 | 819 kB     00:07
(5/6): httpd-tools-2.2.15-15.el6.centos.1.i686.rpm                           |  70 kB     00:00
(6/6): mailcap-2.1.31-2.el6.noarch.rpm                                       |  27 kB     00:00
----------------------------------------------------------------------------------------------------
Total                                                               104 kB/s | 1.1 MB     00:11
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 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) 
 Package: centos-release-6-3.el6.centos.9.i686 (@anaconda-CentOS-201207051201.i386/6.3)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : apr-1.3.9-5.el6_2.i686                                                           1/6
  Installing : mailcap-2.1.31-2.el6.noarch                                                      2/6
  Installing : apr-util-1.3.9-3.el6_0.1.i686                                                    3/6
  Installing : apr-util-ldap-1.3.9-3.el6_0.1.i686                                               4/6
  Installing : httpd-tools-2.2.15-15.el6.centos.1.i686                                          5/6
  Installing : httpd-2.2.15-15.el6.centos.1.i686                                                6/6
  Verifying  : apr-util-1.3.9-3.el6_0.1.i686                                                    1/6
  Verifying  : httpd-2.2.15-15.el6.centos.1.i686                                                2/6
  Verifying  : apr-1.3.9-5.el6_2.i686                                                           3/6
  Verifying  : apr-util-ldap-1.3.9-3.el6_0.1.i686                                               4/6
  Verifying  : httpd-tools-2.2.15-15.el6.centos.1.i686                                          5/6
  Verifying  : mailcap-2.1.31-2.el6.noarch                                                      6/6

Installed:
  httpd.i686 0:2.2.15-15.el6.centos.1

Dependency Installed:
  apr.i686 0:1.3.9-5.el6_2                       apr-util.i686 0:1.3.9-3.el6_0.1
  apr-util-ldap.i686 0:1.3.9-3.el6_0.1           httpd-tools.i686 0:2.2.15-15.el6.centos.1
  mailcap.noarch 0:2.1.31-2.el6

Complete!

2. Check httpd status :

[root@centos63 ~]# /etc/init.d/httpd status
httpd is stopped

3. Start httpd service :

[root@centos63 ~]# /etc/init.d/httpd start

Examples

[root@centos63 ~]# /etc/init.d/httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for centos63.ehowstuff.local
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]

4. To remove above warning when starting httpd, follow the following steps. Go to line 276, change ServerName as below :

ServerName centos63.ehowstuff.local:80

5. Stop httpd service :

[root@centos63 ~]# /etc/init.d/httpd stop
Stopping httpd:                                            [  OK  ]

6. Restart httpd service :

[root@centos63 ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

7. Make httpd start at boot :

[root@centos63 ~]# chkconfig httpd on

How to Setup phpMyAdmin 3.5.1 on CentOS 6.2 using Remi Repository

phpmyadminphpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a Web browser. It is a tools that giving users the ability to interact with their MySQL databases to perform the task such as creating, modifying or drop databases, executing SQL statements, managing users and set permissions. This post will show you the steps on how to setup phpMyAdmin 3.5.1 on CentOS 6.2 using remi repository.

Prerequisites :
How to Install Remi yum Repository on CentOS 6.2 x86 and x86_64

Simply execute the following command to install phpmyadmin :

[root@centos62 ~]# yum install phpmyadmin -y
Loaded plugins: fastestmirror, priorities
Determining fastest mirrors
 * base: mirror.averse.net
 * extras: mirror.yourconnect.com
 * remi: iut-info.univ-reims.fr
 * remi-test: iut-info.univ-reims.fr
 * updates: mirror.yourconnect.com
base                                                                         | 3.7 kB     00:00
base/primary_db                                                              | 3.5 MB     00:34
extras                                                                       | 3.5 kB     00:00
extras/primary_db                                                            | 9.1 kB     00:00
remi                                                                         | 2.9 kB     00:00
remi/primary_db                                                              | 259 kB     00:02
remi-test                                                                    | 2.9 kB     00:00
remi-test/primary_db                                                         |  80 kB     00:01
updates                                                                      | 3.5 kB     00:00
updates/primary_db                                                           | 3.9 MB     00:35
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.5.1-1.el6.remi will be installed
--> Processing Dependency: php-mysql >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.remi.noarch
--> Processing Dependency: php-mcrypt >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.remi.noarch
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.remi.noarch
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.remi.noarch
--> Running transaction check
---> Package php-gd.i686 0:5.4.4-1.el6.remi will be installed
---> Package php-mbstring.i686 0:5.4.4-1.el6.remi will be installed
---> Package php-mcrypt.i686 0:5.4.4-1.el6.remi will be installed
---> Package php-mysql.i686 0:5.4.4-1.el6.remi will be installed
--> Processing Dependency: php-pdo(x86-32) = 5.4.4-1.el6.remi for package: php-mysql-5.4.4-1.el6.remi.i686
--> Running transaction check
---> Package php-pdo.i686 0:5.4.4-1.el6.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                 Arch              Version                       Repository            Size
====================================================================================================
Installing:
 phpMyAdmin              noarch            3.5.1-1.el6.remi              remi                 4.7 M
Installing for dependencies:
 php-gd                  i686              5.4.4-1.el6.remi              remi-test            132 k
 php-mbstring            i686              5.4.4-1.el6.remi              remi-test            921 k
 php-mcrypt              i686              5.4.4-1.el6.remi              remi-test             41 k
 php-mysql               i686              5.4.4-1.el6.remi              remi-test            122 k
 php-pdo                 i686              5.4.4-1.el6.remi              remi-test            107 k

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

Total download size: 6.0 M
Installed size: 21 M
Downloading Packages:
(1/6): php-gd-5.4.4-1.el6.remi.i686.rpm                                      | 132 kB     00:11
(2/6): php-mbstring-5.4.4-1.el6.remi.i686.rpm                                | 921 kB     00:28
(3/6): php-mcrypt-5.4.4-1.el6.remi.i686.rpm                                  |  41 kB     00:01
(4/6): php-mysql-5.4.4-1.el6.remi.i686.rpm                                   | 122 kB     00:02
(5/6): php-pdo-5.4.4-1.el6.remi.i686.rpm                                     | 107 kB     00:01
(6/6): phpMyAdmin-3.5.1-1.el6.remi.noarch.rpm                                | 4.7 MB     01:14
----------------------------------------------------------------------------------------------------
Total                                                                50 kB/s | 6.0 MB     02:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-gd-5.4.4-1.el6.remi.i686                                                     1/6
  Installing : php-mcrypt-5.4.4-1.el6.remi.i686                                                 2/6
  Installing : php-pdo-5.4.4-1.el6.remi.i686                                                    3/6
  Installing : php-mysql-5.4.4-1.el6.remi.i686                                                  4/6
  Installing : php-mbstring-5.4.4-1.el6.remi.i686                                               5/6
  Installing : phpMyAdmin-3.5.1-1.el6.remi.noarch                                               6/6

Installed:
  phpMyAdmin.noarch 0:3.5.1-1.el6.remi

Dependency Installed:
  php-gd.i686 0:5.4.4-1.el6.remi                  php-mbstring.i686 0:5.4.4-1.el6.remi
  php-mcrypt.i686 0:5.4.4-1.el6.remi              php-mysql.i686 0:5.4.4-1.el6.remi
  php-pdo.i686 0:5.4.4-1.el6.remi

Complete!
[root@centos62 ~]# vim /etc/httpd/conf.d/phpMyAdmin.conf

Original configuration file :

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
   order deny,allow
   deny from all
   allow from 127.0.0.1
   allow from ::1
</Directory>

Modify to the following :

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
   order deny,allow
   deny from all
   allow from 127.0.0.1
   allow from all
</Directory>

Once configured, restart the httpd as below :

[root@centos62 ~]# service httpd restart

Login to the phpmyadmin as below :
http://192.168.1.44/phpmyadmin

How to Install Apache, PHP and MySQL on CentOS 6.2

CentOS 6.2

Install Apache, PHP and MySQL on centOS 6.2

In this post, i will share with you on how to install Apache Httpd, PHP and MySQL on linux CentOS 6.2 server. All these steps has been tested on CentOS 6.2. Assume that you have installed minimal installation type CentOS 6.2 and has setup your own local yum repository. You can use internet CentOS yum repository instead if you have direct internet connection to your server.

How to Setup Local Yum Repository from CD-ROM/DVD-ROM image on CentOS 6.2

1.0 How to Install Httpd on CentOS 6.2

Apache httpd is one of the most popular web servers and has a lot of features that make it very extensible and useful for many different types of websites.

[root@centos6 ~]# yum install httpd
Loaded plugins: fastestmirror
Determining fastest mirrors
CentOS6.2-Repository                                                        | 1.3 kB     00:00 ...
CentOS6.2-Repository/primary                                                | 1.2 MB     00:00 ...
CentOS6.2-Repository                                                                     3042/3042
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.i686 0:2.2.15-15.el6.centos will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos for package: httpd-2.2.15-15.el6.centos.i686
--> Processing Dependency: libaprutil-1.so.0 for package: httpd-2.2.15-15.el6.centos.i686
--> Processing Dependency: libapr-1.so.0 for package: httpd-2.2.15-15.el6.centos.i686
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.i686
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.i686
--> Running transaction check
---> Package apr.i686 0:1.3.9-3.el6_1.2 will be installed
---> Package apr-util.i686 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.i686 0:1.3.9-3.el6_0.1 will be installed
---> Package httpd-tools.i686 0:2.2.15-15.el6.centos will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================
 Package              Arch          Version                      Repository                   Size
===================================================================================================
Installing:
 httpd                i686          2.2.15-15.el6.centos         CentOS6.2-Repository        818 k
Installing for dependencies:
 apr                  i686          1.3.9-3.el6_1.2              CentOS6.2-Repository        129 k
 apr-util             i686          1.3.9-3.el6_0.1              CentOS6.2-Repository         89 k
 apr-util-ldap        i686          1.3.9-3.el6_0.1              CentOS6.2-Repository         15 k
 httpd-tools          i686          2.2.15-15.el6.centos         CentOS6.2-Repository         70 k
 mailcap              noarch        2.1.31-2.el6                 CentOS6.2-Repository         27 k

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

Total download size: 1.1 M
Installed size: 3.4 M
Is this ok [y/N]: y
Downloading Packages:
---------------------------------------------------------------------------------------------------
Total                                                              3.8 MB/s | 1.1 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : mailcap-2.1.31-2.el6.noarch                                                     1/6
  Installing : apr-1.3.9-3.el6_1.2.i686                                                        2/6
  Installing : apr-util-1.3.9-3.el6_0.1.i686                                                   3/6
  Installing : httpd-tools-2.2.15-15.el6.centos.i686                                           4/6
  Installing : apr-util-ldap-1.3.9-3.el6_0.1.i686                                              5/6
  Installing : httpd-2.2.15-15.el6.centos.i686                                                 6/6

Installed:
  httpd.i686 0:2.2.15-15.el6.centos

Dependency Installed:
  apr.i686 0:1.3.9-3.el6_1.2                     apr-util.i686 0:1.3.9-3.el6_0.1
  apr-util-ldap.i686 0:1.3.9-3.el6_0.1           httpd-tools.i686 0:2.2.15-15.el6.centos
  mailcap.noarch 0:2.1.31-2.el6

Complete!

2.0 How to Install php on CentOS 6.2

Next we proceed to Install the php packages on CentOS 6.2.

Simply run the following command :

[root@centos6 ~]# yum install php*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
CentOS6.2-Repository                                                            | 1.3 kB     00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.i686 0:5.3.3-3.el6_1.3 will be installed
---> Package php-cli.i686 0:5.3.3-3.el6_1.3 will be installed
--> Processing Dependency: libedit.so.0 for package: php-cli-5.3.3-3.el6_1.3.i686
---> Package php-common.i686 0:5.3.3-3.el6_1.3 will be installed
---> Package php-gd.i686 0:5.3.3-3.el6_1.3 will be installed
--> Processing Dependency: libpng12.so.0(PNG12_0) for package: php-gd-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libpng12.so.0 for package: php-gd-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libjpeg.so.62 for package: php-gd-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libfreetype.so.6 for package: php-gd-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libXpm.so.4 for package: php-gd-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libX11.so.6 for package: php-gd-5.3.3-3.el6_1.3.i686
---> Package php-ldap.i686 0:5.3.3-3.el6_1.3 will be installed
---> Package php-mysql.i686 0:5.3.3-3.el6_1.3 will be installed
---> Package php-odbc.i686 0:5.3.3-3.el6_1.3 will be installed
--> Processing Dependency: libodbc.so.2 for package: php-odbc-5.3.3-3.el6_1.3.i686
---> Package php-pdo.i686 0:5.3.3-3.el6_1.3 will be installed
---> Package php-pear.noarch 1:1.9.4-4.el6 will be installed
---> Package php-pecl-apc.i686 0:3.1.3p1-1.2.el6.1 will be installed
---> Package php-pecl-memcache.i686 0:3.0.5-3.el6 will be installed
---> Package php-pgsql.i686 0:5.3.3-3.el6_1.3 will be installed
--> Processing Dependency: libpq.so.5 for package: php-pgsql-5.3.3-3.el6_1.3.i686
---> Package php-soap.i686 0:5.3.3-3.el6_1.3 will be installed
---> Package php-xml.i686 0:5.3.3-3.el6_1.3 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24) for package: php-xml-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18) for package: php-xml-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13) for package: php-xml-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11) for package: php-xml-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libxslt.so.1 for package: php-xml-5.3.3-3.el6_1.3.i686
--> Processing Dependency: libexslt.so.0 for package: php-xml-5.3.3-3.el6_1.3.i686
---> Package php-xmlrpc.i686 0:5.3.3-3.el6_1.3 will be installed
--> Running transaction check
---> Package freetype.i686 0:2.3.11-6.el6_1.7 will be installed
---> Package libX11.i686 0:1.3-2.el6 will be installed
--> Processing Dependency: libX11-common = 1.3-2.el6 for package: libX11-1.3-2.el6.i686
--> Processing Dependency: libxcb.so.1 for package: libX11-1.3-2.el6.i686
---> Package libXpm.i686 0:3.5.8-2.el6 will be installed
---> Package libedit.i686 0:2.11-4.20080712cvs.1.el6 will be installed
---> Package libjpeg.i686 0:6b-46.el6 will be installed
---> Package libpng.i686 2:1.2.46-1.el6_1 will be installed
---> Package libxslt.i686 0:1.1.26-2.el6 will be installed
---> Package postgresql-libs.i686 0:8.4.9-1.el6_1.1 will be installed
---> Package unixODBC.i686 0:2.2.14-11.el6 will be installed
--> Processing Dependency: libltdl.so.7 for package: unixODBC-2.2.14-11.el6.i686
--> Running transaction check
---> Package libX11-common.noarch 0:1.3-2.el6 will be installed
---> Package libtool-ltdl.i686 0:2.2.6-15.5.el6 will be installed
---> Package libxcb.i686 0:1.5-1.el6 will be installed
--> Processing Dependency: libXau.so.6 for package: libxcb-1.5-1.el6.i686
--> Running transaction check
---> Package libXau.i686 0:1.0.5-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
 Package                 Arch         Version                         Repository                  Size
=======================================================================================================
Installing:
 php                     i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository       1.1 M
 php-cli                 i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository       2.2 M
 php-common              i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository       522 k
 php-gd                  i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository       102 k
 php-ldap                i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository        35 k
 php-mysql               i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository        76 k
 php-odbc                i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository        47 k
 php-pdo                 i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository        71 k
 php-pear                noarch       1:1.9.4-4.el6                   CentOS6.2-Repository       393 k
 php-pecl-apc            i686         3.1.3p1-1.2.el6.1               CentOS6.2-Repository        93 k
 php-pecl-memcache       i686         3.0.5-3.el6                     CentOS6.2-Repository        60 k
 php-pgsql               i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository        66 k
 php-soap                i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository       138 k
 php-xml                 i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository        98 k
 php-xmlrpc              i686         5.3.3-3.el6_1.3                 CentOS6.2-Repository        50 k
Installing for dependencies:
 freetype                i686         2.3.11-6.el6_1.7                CentOS6.2-Repository       362 k
 libX11                  i686         1.3-2.el6                       CentOS6.2-Repository       585 k
 libX11-common           noarch       1.3-2.el6                       CentOS6.2-Repository       188 k
 libXau                  i686         1.0.5-1.el6                     CentOS6.2-Repository        22 k
 libXpm                  i686         3.5.8-2.el6                     CentOS6.2-Repository        58 k
 libedit                 i686         2.11-4.20080712cvs.1.el6        CentOS6.2-Repository        73 k
 libjpeg                 i686         6b-46.el6                       CentOS6.2-Repository       133 k
 libpng                  i686         2:1.2.46-1.el6_1                CentOS6.2-Repository       184 k
 libtool-ltdl            i686         2.2.6-15.5.el6                  CentOS6.2-Repository        45 k
 libxcb                  i686         1.5-1.el6                       CentOS6.2-Repository       104 k
 libxslt                 i686         1.1.26-2.el6                    CentOS6.2-Repository       448 k
 postgresql-libs         i686         8.4.9-1.el6_1.1                 CentOS6.2-Repository       201 k
 unixODBC                i686         2.2.14-11.el6                   CentOS6.2-Repository       382 k

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

Total download size: 7.8 M
Installed size: 26 M
Is this ok [y/N]: y
Downloading Packages:
-------------------------------------------------------------------------------------------------------
Total                                                                  7.2 MB/s | 7.8 MB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : libX11-common-1.3-2.el6.noarch                                                     1/28
  Installing : php-common-5.3.3-3.el6_1.3.i686                                                    2/28
  Installing : php-pdo-5.3.3-3.el6_1.3.i686                                                       3/28
  Installing : libxslt-1.1.26-2.el6.i686                                                          4/28
  Installing : postgresql-libs-8.4.9-1.el6_1.1.i686                                               5/28
  Installing : libedit-2.11-4.20080712cvs.1.el6.i686                                              6/28
  Installing : php-cli-5.3.3-3.el6_1.3.i686                                                       7/28
  Installing : 1:php-pear-1.9.4-4.el6.noarch                                                      8/28
  Installing : libjpeg-6b-46.el6.i686                                                             9/28
  Installing : libtool-ltdl-2.2.6-15.5.el6.i686                                                  10/28
  Installing : unixODBC-2.2.14-11.el6.i686                                                       11/28
  Installing : 2:libpng-1.2.46-1.el6_1.i686                                                      12/28
  Installing : freetype-2.3.11-6.el6_1.7.i686                                                    13/28
  Installing : libXau-1.0.5-1.el6.i686                                                           14/28
  Installing : libxcb-1.5-1.el6.i686                                                             15/28
  Installing : libX11-1.3-2.el6.i686                                                             16/28
  Installing : libXpm-3.5.8-2.el6.i686                                                           17/28
  Installing : php-gd-5.3.3-3.el6_1.3.i686                                                       18/28
  Installing : php-odbc-5.3.3-3.el6_1.3.i686                                                     19/28
  Installing : php-pecl-apc-3.1.3p1-1.2.el6.1.i686                                               20/28
  Installing : php-pecl-memcache-3.0.5-3.el6.i686                                                21/28
  Installing : php-5.3.3-3.el6_1.3.i686                                                          22/28
  Installing : php-pgsql-5.3.3-3.el6_1.3.i686                                                    23/28
  Installing : php-xml-5.3.3-3.el6_1.3.i686                                                      24/28
  Installing : php-mysql-5.3.3-3.el6_1.3.i686                                                    25/28
  Installing : php-xmlrpc-5.3.3-3.el6_1.3.i686                                                   26/28
  Installing : php-ldap-5.3.3-3.el6_1.3.i686                                                     27/28
  Installing : php-soap-5.3.3-3.el6_1.3.i686                                                     28/28

Installed:
  php.i686 0:5.3.3-3.el6_1.3                        php-cli.i686 0:5.3.3-3.el6_1.3
  php-common.i686 0:5.3.3-3.el6_1.3                 php-gd.i686 0:5.3.3-3.el6_1.3
  php-ldap.i686 0:5.3.3-3.el6_1.3                   php-mysql.i686 0:5.3.3-3.el6_1.3
  php-odbc.i686 0:5.3.3-3.el6_1.3                   php-pdo.i686 0:5.3.3-3.el6_1.3
  php-pear.noarch 1:1.9.4-4.el6                     php-pecl-apc.i686 0:3.1.3p1-1.2.el6.1
  php-pecl-memcache.i686 0:3.0.5-3.el6              php-pgsql.i686 0:5.3.3-3.el6_1.3
  php-soap.i686 0:5.3.3-3.el6_1.3                   php-xml.i686 0:5.3.3-3.el6_1.3
  php-xmlrpc.i686 0:5.3.3-3.el6_1.3

Dependency Installed:
  freetype.i686 0:2.3.11-6.el6_1.7                libX11.i686 0:1.3-2.el6
  libX11-common.noarch 0:1.3-2.el6                libXau.i686 0:1.0.5-1.el6
  libXpm.i686 0:3.5.8-2.el6                       libedit.i686 0:2.11-4.20080712cvs.1.el6
  libjpeg.i686 0:6b-46.el6                        libpng.i686 2:1.2.46-1.el6_1
  libtool-ltdl.i686 0:2.2.6-15.5.el6              libxcb.i686 0:1.5-1.el6
  libxslt.i686 0:1.1.26-2.el6                     postgresql-libs.i686 0:8.4.9-1.el6_1.1
  unixODBC.i686 0:2.2.14-11.el6

Complete!

3.0 How to Install MySQL Database Server on CentOS 6.2

This post will show you on how to install MySQL server using yum command.

Simply run the following command :

[root@centos6 ~]# yum install mysql mysql-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.i686 0:5.1.52-1.el6_0.1 will be installed
---> Package mysql-server.i686 0:5.1.52-1.el6_0.1 will be installed
--> Processing Dependency: perl-DBI for package: mysql-server-5.1.52-1.el6_0.1.i686
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.52-1.el6_0.1.i686
--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.52-1.el6_0.1.i686
--> Running transaction check
---> Package perl-DBD-MySQL.i686 0:4.013-3.el6 will be installed
---> Package perl-DBI.i686 0:1.609-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================
 Package                Arch         Version                  Repository                    Size
=================================================================================================
Installing:
 mysql                  i686         5.1.52-1.el6_0.1         CentOS6.2-Repository         898 k
 mysql-server           i686         5.1.52-1.el6_0.1         CentOS6.2-Repository         8.3 M
Installing for dependencies:
 perl-DBD-MySQL         i686         4.013-3.el6              CentOS6.2-Repository         134 k
 perl-DBI               i686         1.609-4.el6              CentOS6.2-Repository         705 k

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

Total download size: 10 M
Installed size: 27 M
Is this ok [y/N]: y
Downloading Packages:
-------------------------------------------------------------------------------------------------
Total                                                             13 MB/s |  10 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : perl-DBI-1.609-4.el6.i686                                                     1/4
  Installing : perl-DBD-MySQL-4.013-3.el6.i686                                               2/4
  Installing : mysql-5.1.52-1.el6_0.1.i686                                                   3/4
  Installing : mysql-server-5.1.52-1.el6_0.1.i686                                            4/4

Installed:
  mysql.i686 0:5.1.52-1.el6_0.1               mysql-server.i686 0:5.1.52-1.el6_0.1

Dependency Installed:
  perl-DBD-MySQL.i686 0:4.013-3.el6                  perl-DBI.i686 0:1.609-4.el6

Complete!

Hope all these three steps will be useful when installing Apache, PHP and MySQL on linux Centos 6.2 server

How to Install phpMyAdmin on CentOS 6.2 using EPEL Repository

phpmyadmin

PhpMyAdmin

phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can manage a whole MySQL server (needs a super-user) as well as a single database. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement. In this post, i will show on how to install phpMyAdmin on CentOS 6.2 using EPEL repository. This post assumed that MySQL and Apache Httpd server has been installed and configured as per documented guidelines below :
How to Install Httpd on CentOS 6.2
How to Install MySQL Database Server on CentOS 6.2
How to Secure MySQL Database Server

1. How to Install and Configure EPEL Repository :
Follow this steps to install and configure the Extra Packages for Enterprise Linux (EPEL) repository on CentOS 6.2. EPEL repository is another extra repository that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL) and CentOS server.

2. Simply run yum command to install phpmyadmin :

[root@centos62 ~]# yum install phpmyadmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * epel: ftp.riken.jp
 * extras: mirrors.hostemo.com
 * updates: ossm.utm.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.4.9-1.el6 will be installed
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.4.9-1.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.4.9-1.el6.noarch
--> Running transaction check
---> Package php-gd.i686 0:5.3.3-3.el6_2.6 will be installed
---> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                    Arch              Version                      Repository          Size
====================================================================================================
Installing:
 phpMyAdmin                 noarch            3.4.9-1.el6                  epel               4.1 M
Installing for dependencies:
 php-gd                     i686              5.3.3-3.el6_2.6              updates            102 k
 php-php-gettext            noarch            1.0.11-3.el6                 epel                21 k

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

Total download size: 4.2 M
Installed size: 15 M
Downloading Packages:
(1/3): php-gd-5.3.3-3.el6_2.6.i686.rpm                                       | 102 kB     00:00
(2/3): php-php-gettext-1.0.11-3.el6.noarch.rpm                               |  21 kB     00:00
(3/3): phpMyAdmin-3.4.9-1.el6.noarch.rpm                                     | 4.1 MB     00:46
----------------------------------------------------------------------------------------------------
Total                                                                89 kB/s | 4.2 MB     00:48
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-php-gettext-1.0.11-3.el6.noarch                                              1/3
  Installing : php-gd-5.3.3-3.el6_2.6.i686                                                      2/3
  Installing : phpMyAdmin-3.4.9-1.el6.noarch                                                    3/3

Installed:
  phpMyAdmin.noarch 0:3.4.9-1.el6

Dependency Installed:
  php-gd.i686 0:5.3.3-3.el6_2.6                php-php-gettext.noarch 0:1.0.11-3.el6

Complete!

3. Open the phpMyAdmin.conf configuration file as below :

[root@centos62 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf

Original phpMyAdmin.conf configuration file :

<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</Directory>

Change as below. Default setting only allows only localhost. Changes below will allow access to any ip address but very dangerous unless properly secured by SSL :

<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from All
Allow from ::1
</Directory>

4. Restart apache httpd service to take effect :

[root@centos62 ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

5. Open PhpMyAdmin from myour browser using the following URL :

http://ipaddress/phpmyadmin/

How to Install phpMyAdmin on CentOS 5.8 using EPEL Repository

In this post, i will show on how to install phpMyAdmin on CentOS 5.8 using EPEL repository. phpMyAdmin is a opensource tool written in PHP intended to handle the MySQL administration using web interface over the internet. It can manage a whole MySQL server as well as a single database. This post assumed that MySQL and Apache Httpd server has been installed and configured properly.

1. How to Install and Configure EPEL Repository :
Follow this steps to install and configure the Extra Packages for Enterprise Linux (EPEL) repository on CentOS 5.8. EPEL repository is another extra repository that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL) and CentOS server.

2. Simply run the following command to install phpmyadmin :

[root@centos58 ~]# yum install phpmyadmin -y

Example :

[root@centos58 ~]# yum install phpmyadmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * epel: mirror.nus.edu.sg
 * extras: centos.ipserverone.com
 * updates: mirrors.hostemo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:2.11.11.3-2.el5 set to be updated
--> Processing Dependency: php-mcrypt >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php-gd >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php-mysql >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php-mbstring >= 4.1.0 for package: phpMyAdmin
--> Running transaction check
---> Package php.i386 0:5.1.6-34.el5_8 set to be updated
--> Processing Dependency: php-common = 5.1.6-34.el5_8 for package: php
--> Processing Dependency: php-cli = 5.1.6-34.el5_8 for package: php
--> Processing Dependency: libcurl.so.3 for package: php
--> Processing Dependency: libgmp.so.3 for package: php
--> Processing Dependency: libidn.so.11 for package: php
--> Processing Dependency: libaspell.so.15 for package: php
--> Processing Dependency: libpspell.so.15 for package: php
---> Package php-gd.i386 0:5.1.6-34.el5_8 set to be updated
---> Package php-mbstring.i386 0:5.1.6-34.el5_8 set to be updated
---> Package php-mcrypt.i386 0:5.1.6-15.el5.centos.1 set to be updated
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt
---> Package php-mysql.i386 0:5.1.6-34.el5_8 set to be updated
--> Processing Dependency: php-pdo for package: php-mysql
--> Running transaction check
---> Package aspell.i386 12:0.60.3-12 set to be updated
--> Processing Dependency: aspell-en for package: aspell
---> Package curl.i386 0:7.15.5-15.el5 set to be updated
---> Package gmp.i386 0:4.1.4-10.el5 set to be updated
---> Package libidn.i386 0:0.6.5-1.1 set to be updated
---> Package libmcrypt.i386 0:2.5.8-4.el5.centos set to be updated
---> Package php-cli.i386 0:5.1.6-34.el5_8 set to be updated
---> Package php-common.i386 0:5.1.6-34.el5_8 set to be updated
---> Package php-pdo.i386 0:5.1.6-34.el5_8 set to be updated
--> Running transaction check
---> Package aspell-en.i386 50:6.0-2.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch             Version                            Repository         Size
====================================================================================================
Installing:
 phpMyAdmin             noarch           2.11.11.3-2.el5                    epel              4.2 M
Installing for dependencies:
 aspell                 i386             12:0.60.3-12                       base              946 k
 aspell-en              i386             50:6.0-2.1                         base              1.6 M
 curl                   i386             7.15.5-15.el5                      base              235 k
 gmp                    i386             4.1.4-10.el5                       base              664 k
 libidn                 i386             0.6.5-1.1                          base              194 k
 libmcrypt              i386             2.5.8-4.el5.centos                 extras            116 k
 php                    i386             5.1.6-34.el5_8                     updates           2.3 M
 php-cli                i386             5.1.6-34.el5_8                     updates           2.1 M
 php-common             i386             5.1.6-34.el5_8                     updates           154 k
 php-gd                 i386             5.1.6-34.el5_8                     updates           118 k
 php-mbstring           i386             5.1.6-34.el5_8                     updates           996 k
 php-mcrypt             i386             5.1.6-15.el5.centos.1              extras             16 k
 php-mysql              i386             5.1.6-34.el5_8                     updates            87 k
 php-pdo                i386             5.1.6-34.el5_8                     updates            66 k

Transaction Summary
====================================================================================================
Install      15 Package(s)
Upgrade       0 Package(s)

Total download size: 14 M
Downloading Packages:
(1/15): php-mcrypt-5.1.6-15.el5.centos.1.i386.rpm                            |  16 kB     00:00
(2/15): php-pdo-5.1.6-34.el5_8.i386.rpm                                      |  66 kB     00:00
(3/15): php-mysql-5.1.6-34.el5_8.i386.rpm                                    |  87 kB     00:00
(4/15): libmcrypt-2.5.8-4.el5.centos.i386.rpm                                | 116 kB     00:00
(5/15): php-gd-5.1.6-34.el5_8.i386.rpm                                       | 118 kB     00:00
(6/15): php-common-5.1.6-34.el5_8.i386.rpm                                   | 154 kB     00:01
(7/15): libidn-0.6.5-1.1.i386.rpm                                            | 194 kB     00:01
(8/15): curl-7.15.5-15.el5.i386.rpm                                          | 235 kB     00:01
(9/15): gmp-4.1.4-10.el5.i386.rpm                                            | 664 kB     00:05
(10/15): aspell-0.60.3-12.i386.rpm                                           | 946 kB     00:08
(11/15): php-mbstring-5.1.6-34.el5_8.i386.rpm                                | 996 kB     00:08
(12/15): aspell-en-6.0-2.1.i386.rpm                                          | 1.6 MB     00:13
(13/15): php-cli-5.1.6-34.el5_8.i386.rpm                                     | 2.1 MB     00:18
(14/15): php-5.1.6-34.el5_8.i386.rpm                                         | 2.3 MB     00:26
(15/15): phpMyAdmin-2.11.11.3-2.el5.noarch.rpm                               | 4.2 MB     00:37
----------------------------------------------------------------------------------------------------
Total                                                               108 kB/s |  14 MB     02:09
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php-common                                                                  1/15
  Installing     : libidn                                                                      2/15
  Installing     : curl                                                                        3/15
  Installing     : gmp                                                                         4/15
  Installing     : php-gd                                                                      5/15
  Installing     : php-mbstring                                                                6/15
  Installing     : php-pdo                                                                     7/15
  Installing     : php-mysql                                                                   8/15
  Installing     : libmcrypt                                                                   9/15
  Installing     : aspell-en                                                                  10/15
  Installing     : aspell                                                                     11/15
  Installing     : php-cli                                                                    12/15
  Installing     : php                                                                        13/15
  Installing     : php-mcrypt                                                                 14/15
  Installing     : phpMyAdmin                                                                 15/15

Installed:
  phpMyAdmin.noarch 0:2.11.11.3-2.el5

Dependency Installed:
  aspell.i386 12:0.60.3-12                       aspell-en.i386 50:6.0-2.1
  curl.i386 0:7.15.5-15.el5                      gmp.i386 0:4.1.4-10.el5
  libidn.i386 0:0.6.5-1.1                        libmcrypt.i386 0:2.5.8-4.el5.centos
  php.i386 0:5.1.6-34.el5_8                      php-cli.i386 0:5.1.6-34.el5_8
  php-common.i386 0:5.1.6-34.el5_8               php-gd.i386 0:5.1.6-34.el5_8
  php-mbstring.i386 0:5.1.6-34.el5_8             php-mcrypt.i386 0:5.1.6-15.el5.centos.1
  php-mysql.i386 0:5.1.6-34.el5_8                php-pdo.i386 0:5.1.6-34.el5_8

Complete!

3. Open the phpMyAdmin.conf configuration file as below :

[root@centos58 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf

Original phpMyAdmin.conf configuration file :

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from 127.0.0.1
   Allow from ::1
</Directory>

Change as below. Default setting only allows only localhost. Changes below will allow access to any ip address but very dangerous unless properly secured by SSL :

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from All
   Allow from ::1
</Directory>

4. Restart apache httpd service :

[root@centos58 ~]# /etc/init.d/httpd restart

5. Open PhpMyAdmin from myour browser using the following URL :

http://CentOS5.8_Ipaddress/phpmyadmin/

This will install phpMyAdmin – 2.11.11.3 on your CentOS 5.8

How to Install Apache Httpd on CentOS 5.8

Apache httpd is one of the most popular web servers and has a lot of features that make it very extensible and useful for many different types of websites.This steps has been tested on CentOS 5.8. Assume that you have installed minimal installation type CentOS 5.8 and has setup your own local yum repository. You can use internet CentOS yum repository instead if you have direct internet connection to your server.

To install apache httpd, simply run the following command :

[root@centos58 ~]# yum install httpd -y

Example :

[root@centos58 ~]# yum install httpd -y
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: mirror.oscc.org.my
 * extras: mirror.oscc.org.my
 * updates: mirror.oscc.org.my
base                                                                         | 1.1 kB     00:00
extras                                                                       | 2.1 kB     00:00
updates                                                                      | 1.9 kB     00:00
updates/primary_db                                                           | 263 kB     00:01
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.i386 0:2.2.3-63.el5.centos.1 set to be updated
base/filelists                                                               | 3.0 MB     00:28
extras/filelists_db                                                          | 212 kB     00:02
updates/filelists_db                                                         | 1.1 MB     00:09
--> Processing Dependency: /etc/mime.types for package: httpd
--> Processing Dependency: libapr-1.so.0 for package: httpd
--> Processing Dependency: libaprutil-1.so.0 for package: httpd
--> Running transaction check
---> Package apr.i386 0:1.2.7-11.el5_6.5 set to be updated
---> Package apr-util.i386 0:1.2.7-11.el5_5.2 set to be updated
--> Processing Dependency: libpq.so.4 for package: apr-util
---> Package mailcap.noarch 0:2.1.23-1.fc6 set to be updated
--> Running transaction check
---> Package postgresql-libs.i386 0:8.1.23-1.el5_7.3 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                   Arch             Version                         Repository         Size
====================================================================================================
Installing:
 httpd                     i386             2.2.3-63.el5.centos.1           updates           1.2 M
Installing for dependencies:
 apr                       i386             1.2.7-11.el5_6.5                base              124 k
 apr-util                  i386             1.2.7-11.el5_5.2                base               80 k
 mailcap                   noarch           2.1.23-1.fc6                    base               14 k
 postgresql-libs           i386             8.1.23-1.el5_7.3                base              197 k

Transaction Summary
====================================================================================================
Install       5 Package(s)
Upgrade       0 Package(s)

Total download size: 1.6 M
Downloading Packages:
(1/5): mailcap-2.1.23-1.fc6.noarch.rpm                                       |  14 kB     00:00
(2/5): apr-util-1.2.7-11.el5_5.2.i386.rpm                                    |  80 kB     00:00
(3/5): apr-1.2.7-11.el5_6.5.i386.rpm                                         | 124 kB     00:00
(4/5): postgresql-libs-8.1.23-1.el5_7.3.i386.rpm                             | 197 kB     00:01
(5/5): httpd-2.2.3-63.el5.centos.1.i386.rpm                                  | 1.2 MB     00:12
----------------------------------------------------------------------------------------------------
Total                                                               108 kB/s | 1.6 MB     00:15
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : apr                                                                          1/5
  Installing     : postgresql-libs                                                              2/5
  Installing     : mailcap                                                                      3/5
  Installing     : apr-util                                                                     4/5
  Installing     : httpd                                                                        5/5

Installed:
  httpd.i386 0:2.2.3-63.el5.centos.1

Dependency Installed:
  apr.i386 0:1.2.7-11.el5_6.5                 apr-util.i386 0:1.2.7-11.el5_5.2
  mailcap.noarch 0:2.1.23-1.fc6               postgresql-libs.i386 0:8.1.23-1.el5_7.3

Complete!

Start httpd service :

[root@centos58 ~]# service httpd start

Stop httpd service :

[root@centos58 ~]# service httpd stop

Check httpd status :

[root@centos58 ~]# service httpd status
httpd (pid  2411) is running...

Make httpd auto start at boot :

[root@centos58 ~]# chkconfig httpd on

How to Check Apache Error Log and Access Log file

The purpose of logging in a server is to diagnose some issues. The common way to start the troubleshooting is to look at logs. For apache httpd server, all the log is normally stored at “/var/log/httpd” as below :

    [root@centos62 ~]# ls /var/log/httpd/
    access_log  error_log
    

How to Continuously Check Apache Error Log file :

    [root@centos62 ~]# tail -f /var/log/httpd/error_log
    

Example :

    [root@centos62 ~]# tail -f /var/log/httpd/error_log
    [Thu Feb 16 18:23:08 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Thu Feb 16 18:23:08 2012] [notice] Digest: generating secret for digest authentication ...
    [Thu Feb 16 18:23:08 2012] [notice] Digest: done
    [Thu Feb 16 18:23:09 2012] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations
    [Thu Feb 16 19:56:33 2012] [error] [client 192.168.1.52] File does not exist: /var/www/html/favicon.ico
    [Thu Feb 16 23:47:07 2012] [notice] caught SIGTERM, shutting down
    [Sat Feb 18 20:39:26 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Sat Feb 18 20:39:26 2012] [notice] Digest: generating secret for digest authentication ...
    [Sat Feb 18 20:39:26 2012] [notice] Digest: done
    [Sat Feb 18 20:39:27 2012] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations
    

How to Continuously Check Apache Access Log file :

    [root@centos62 ~]# tail -f /var/log/httpd/access_log
    

Example :

    [root@centos62 ~]# tail -f /var/log/httpd/access_log
    192.168.1.52 - - [16/Feb/2012:23:03:50 +0800] "GET /adminer/externals/jush/jush.css HTTP/1.1" 304 - "http://192.168.1.44/adminer/adminer/?server=localhost&username=root" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    192.168.1.52 - - [16/Feb/2012:23:03:52 +0800] "GET /adminer/adminer/static/loader.gif HTTP/1.1" 200 673 "http://192.168.1.44/adminer/adminer/?server=localhost&username=root" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    192.168.1.52 - - [16/Feb/2012:23:03:52 +0800] "GET /adminer/adminer/?server=localhost&username=root&database= HTTP/1.1" 200 4739 "http://192.168.1.44/adminer/adminer/?server=localhost&username=root" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    192.168.1.52 - - [16/Feb/2012:23:03:52 +0800] "GET /adminer/adminer/static/plus.gif HTTP/1.1" 200 72 "http://192.168.1.44/adminer/adminer/?server=localhost&username=root&database=" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    192.168.1.52 - - [16/Feb/2012:23:03:56 +0800] "GET /adminer/adminer/?server=localhost&username=root HTTP/1.1" 200 2977 "http://192.168.1.44/adminer/adminer/?server=localhost&username=root" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    192.168.1.52 - - [16/Feb/2012:23:03:56 +0800] "GET /adminer/adminer/?server=localhost&username=root&script=connect HTTP/1.1" 200 109 "http://192.168.1.44/adminer/adminer/?server=localhost&username=root" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    192.168.1.52 - - [16/Feb/2012:23:04:16 +0800] "GET /adminer/adminer/?server=localhost&username=root&status= HTTP/1.1" 200 19629 "http://192.168.1.44/adminer/adminer/?server=localhost&username=root" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    192.168.1.52 - - [18/Feb/2012:20:39:32 +0800] "GET / HTTP/1.1" 200 1394 "-" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    192.168.1.52 - - [18/Feb/2012:20:39:32 +0800] "GET /icons/compressed.gif HTTP/1.1" 200 1038 "http://192.168.1.44/" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    192.168.1.52 - - [18/Feb/2012:20:44:17 +0800] "GET / HTTP/1.1" 200 1394 "-" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
    

How to Install Apache Httpd Server on RHEL 6

In this post, i will show on how to install Apache Httpd server on Redhat Enterprise Linux 6 (RHEL 6). The Apache HTTP Server is an open-source HTTP server for modern operating systems such as Unix, Linux and windows platform. This post assumed that you have set up local yum repository using your DVDROM. If you haven’t set up the local yum repository, please proceed to this steps :
How to Setup Local Yum Repository from CD-ROM/DVD-ROM image on RHEL 6

Simply run this command to install Apache Httpd server :

    [root@rhel6 ~]# yum install httpd -y
    Loaded plugins: rhnplugin
    This system is not registered with RHN.
    RHN support will be disabled.
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package httpd.i686 0:2.2.15-5.el6 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ====================================================================================================
     Package           Arch             Version                  Repository                        Size
    ====================================================================================================
    Installing:
     httpd             i686             2.2.15-5.el6             DVD-RHEL6-Repository             813 k
    
    Transaction Summary
    ====================================================================================================
    Install       1 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 813 k
    Installed size: 2.8 M
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : httpd-2.2.15-5.el6.i686                                                      1/1
    
    Installed:
      httpd.i686 0:2.2.15-5.el6
    
    Complete!
    

Command to start Httpd service :

    [root@rhel6 ~]# service httpd start
    Starting httpd:                                            [  OK  ]
    

Command to stop Httpd service :

    [root@rhel6 ~]# service httpd stop
    Stopping httpd:                                            [  OK  ]
    

Command to restart Httpd service :

    [root@rhel6 ~]# service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]
    

Make Apache Httpd service auto start at boot :

    [root@rhel6 ~]# chkconfig httpd on
    

How to Install Httpd on CentOS 5.7

Apache httpd is one of the most popular web servers and has a lot of features that make it very extensible and useful for many different types of websites.This steps has been tested on CentOS 5.7 with direct internet connection.

Simply run this command to install apache httpd service on CentOS 5.7:

    [root@CentOS57 ~]# yum install httpd
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.yourconnect.com
     * extras: mirrors.sin1.sg.voxel.net
     * updates: mirror.yourconnect.com
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package httpd.i386 0:2.2.3-53.el5.centos.3 set to be updated
    base/filelists                                                              | 2.9 MB     00:25
    extras/filelists_db                                                         | 199 kB     00:03
    updates/filelists_db                                                        | 1.9 MB     00:22
    --> Processing Dependency: /etc/mime.types for package: httpd
    --> Processing Dependency: libapr-1.so.0 for package: httpd
    --> Processing Dependency: libaprutil-1.so.0 for package: httpd
    --> Running transaction check
    ---> Package apr.i386 0:1.2.7-11.el5_6.5 set to be updated
    ---> Package apr-util.i386 0:1.2.7-11.el5_5.2 set to be updated
    --> Processing Dependency: libpq.so.4 for package: apr-util
    ---> Package mailcap.noarch 0:2.1.23-1.fc6 set to be updated
    --> Running transaction check
    ---> Package postgresql-libs.i386 0:8.1.23-1.el5_7.3 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ===================================================================================================
     Package                  Arch            Version                           Repository        Size
    ===================================================================================================
    Installing:
     httpd                    i386            2.2.3-53.el5.centos.3             updates          1.2 M
    Installing for dependencies:
     apr                      i386            1.2.7-11.el5_6.5                  base             124 k
     apr-util                 i386            1.2.7-11.el5_5.2                  base              80 k
     mailcap                  noarch          2.1.23-1.fc6                      base              14 k
     postgresql-libs          i386            8.1.23-1.el5_7.3                  updates          197 k
    
    Transaction Summary
    ===================================================================================================
    Install       5 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 1.6 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/5): mailcap-2.1.23-1.fc6.noarch.rpm                                      |  14 kB     00:00
    (2/5): apr-util-1.2.7-11.el5_5.2.i386.rpm                                   |  80 kB     00:00
    (3/5): apr-1.2.7-11.el5_6.5.i386.rpm                                        | 124 kB     00:01
    (4/5): postgresql-libs-8.1.23-1.el5_7.3.i386.rpm                            | 197 kB     00:02
    (5/5): httpd-2.2.3-53.el5.centos.3.i386.rpm                                 | 1.2 MB     00:11
    ---------------------------------------------------------------------------------------------------
    Total                                                               99 kB/s | 1.6 MB     00:16
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : apr                                                                         1/5
      Installing     : mailcap                                                                     2/5
      Installing     : postgresql-libs                                                             3/5
      Installing     : apr-util                                                                    4/5
      Installing     : httpd                                                                       5/5
    
    Installed:
      httpd.i386 0:2.2.3-53.el5.centos.3
    
    Dependency Installed:
      apr.i386 0:1.2.7-11.el5_6.5                 apr-util.i386 0:1.2.7-11.el5_5.2
      mailcap.noarch 0:2.1.23-1.fc6               postgresql-libs.i386 0:8.1.23-1.el5_7.3
    
    Complete!
    

Set httpd service to auto start at boot:

    [root@CentOS57 ~]# chkconfig httpd on
    

Start and troubleshoot httpd start error:

    [root@CentOS57 ~]# service httpd start
    
    Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    

Check the server hostname or server fully qualified domain name:

    [root@CentOS57 ~]# hostname
    CentOS57
    

Change the ServerName on line 265 to your hostname above.

    [root@CentOS57 ~]# vi /etc/httpd/conf/httpd.conf
    
      263 # redirections work in a sensible way.
        264 #
        265 ServerName CentOS57:80
        266
        267 #
    

Start the Httpd service using the following command :

    [root@CentOS57 ~]# service httpd start
    Starting httpd:                                            [  OK  ]
    

or

    [root@CentOS57 ~]# /etc/init.d/httpd start
    Starting httpd:                                            [  OK  ]
    

How to Install Httpd on CentOS 6.2

Apache httpd is one of the most popular web servers and has a lot of features that make it very extensible and useful for many different types of websites.This steps has been tested on CentOS 6.2. Assume that you have installed minimal installation type CentOS 6.2 and has setup your own local yum repository. You can use internet CentOS yum repository instead if you have direct internet connection to your server.

How to Setup Local Yum Repository from CD-ROM/DVD-ROM image on CentOS 6.2

    [root@centos6 ~]# yum install httpd
    Loaded plugins: fastestmirror
    Determining fastest mirrors
    CentOS6.2-Repository                                                        | 1.3 kB     00:00 ...
    CentOS6.2-Repository/primary                                                | 1.2 MB     00:00 ...
    CentOS6.2-Repository                                                                     3042/3042
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package httpd.i686 0:2.2.15-15.el6.centos will be installed
    --> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos for package: httpd-2.2.15-15.el6.centos.i686
    --> Processing Dependency: libaprutil-1.so.0 for package: httpd-2.2.15-15.el6.centos.i686
    --> Processing Dependency: libapr-1.so.0 for package: httpd-2.2.15-15.el6.centos.i686
    --> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.i686
    --> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.i686
    --> Running transaction check
    ---> Package apr.i686 0:1.3.9-3.el6_1.2 will be installed
    ---> Package apr-util.i686 0:1.3.9-3.el6_0.1 will be installed
    ---> Package apr-util-ldap.i686 0:1.3.9-3.el6_0.1 will be installed
    ---> Package httpd-tools.i686 0:2.2.15-15.el6.centos will be installed
    ---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ===================================================================================================
     Package              Arch          Version                      Repository                   Size
    ===================================================================================================
    Installing:
     httpd                i686          2.2.15-15.el6.centos         CentOS6.2-Repository        818 k
    Installing for dependencies:
     apr                  i686          1.3.9-3.el6_1.2              CentOS6.2-Repository        129 k
     apr-util             i686          1.3.9-3.el6_0.1              CentOS6.2-Repository         89 k
     apr-util-ldap        i686          1.3.9-3.el6_0.1              CentOS6.2-Repository         15 k
     httpd-tools          i686          2.2.15-15.el6.centos         CentOS6.2-Repository         70 k
     mailcap              noarch        2.1.31-2.el6                 CentOS6.2-Repository         27 k
    
    Transaction Summary
    ===================================================================================================
    Install       6 Package(s)
    
    Total download size: 1.1 M
    Installed size: 3.4 M
    Is this ok [y/N]: y
    Downloading Packages:
    ---------------------------------------------------------------------------------------------------
    Total                                                              3.8 MB/s | 1.1 MB     00:00
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
      Installing : mailcap-2.1.31-2.el6.noarch                                                     1/6
      Installing : apr-1.3.9-3.el6_1.2.i686                                                        2/6
      Installing : apr-util-1.3.9-3.el6_0.1.i686                                                   3/6
      Installing : httpd-tools-2.2.15-15.el6.centos.i686                                           4/6
      Installing : apr-util-ldap-1.3.9-3.el6_0.1.i686                                              5/6
      Installing : httpd-2.2.15-15.el6.centos.i686                                                 6/6
    
    Installed:
      httpd.i686 0:2.2.15-15.el6.centos
    
    Dependency Installed:
      apr.i686 0:1.3.9-3.el6_1.2                     apr-util.i686 0:1.3.9-3.el6_0.1
      apr-util-ldap.i686 0:1.3.9-3.el6_0.1           httpd-tools.i686 0:2.2.15-15.el6.centos
      mailcap.noarch 0:2.1.31-2.el6
    
    Complete!