Tuesday, July 5, 2011

Linux CentOS - LAMP (Apache, PHP and MySQL in Linux) Server for CentOS/RHEL

INTRODUCTION

This tutorial shows a quick way of installing a LAMP server (Linux + Apache + MySQL + PHP/Perl together commonly known as LAMP Server) with some additionally repositories (for updated PHP, MySQL packages and phpMyAdmin) on CentOS/RHEL server systems.


Install the extra repositories

The first step requires downloading some RPM files that contain the additional YUM repository definitions.

Centos 5.x

wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

Centos 6.x

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm


Update CentOS
yum update

YUM PRIORITIES

The Yum Priorities plugin can be used to enforce ordered protection of repositories, by associating priorities to repositories. Visit the Yum Priorities CentOS Wiki for more information.

Install Yum Priorities
yum install yum-priorities

Configure Yum Priorities
1. Open the Yum Priorities configuration file with your favourite text editor
vi /etc/yum/pluginconf.d/priorities.conf
- Ensure the following lines exist
[main]
enabled=1
- Save and close the file

2. Open the CentOS base repository configuration file
vi /etc/yum.repos.d/CentOS-Base.repo
 

- Add the following text to the end of the Base, Updates, Addons, and Extras repository entries (A repository entry is specified with the repository name placed between [example], i.e. the base repository entry is specified with [base])
priority=1 - 
Enable (change the enable value 0 to 1) and add the following text to the end of the CentOSPlus repository entry
priority=2

EPEL RPOSITORY

Extra Packages for Enterprise Linux (EPEL) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs such as CentOS or Scientific Linux. Visit the Fedora EPEL Wiki for more information.

Install EPEL Repository
- Download the latest EPEL repository
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

- Run the rpm install command
rpm -Uvh epel-release-5*.rpm

Open the EPEL repository file
/etc/yum.repos.d/epel.repo

- Set priority for the EPEL repository
Add priority=3 to the end of the [epel] section



REMI REPOSITORY

 

The Remi repository is a repository containing updated PHP and MySQL packages and is maintained by Remi. See the Remi Documentation for more information.

Install Remi Repository
1. Download the latest Remi repository
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm


2. Run the rpm install command
rpm -Uvh remi-release-5*.rpm


Configure Remi Repository
1. Open the Remi repository file
vi /etc/yum.repos.d/remi.repo


2. Enable the Remi Repository
Change enabled=0 to enabled=1

3. Set priority for the Remi Repository
Add priority=3 to the end of the [remi] section

Exclude PHP and MySQL packages from the CentOS base repositories
1. Open the CentOS base repository configuration file
vi /etc/yum.repos.d/CentOS-Base.repo


2. Append the following text to all repositories
exclude=*php* *mysql* *phpmyadmin*

APACHE SERVER

Apache HTTP Server is an open-source HTTP server for modern operating systems including UNIX and Windows NT. For more information on Apache HTTP Server, you can visit their website at httpd.apache.org.

Install Apache
yum install httpd

NOTE: The Apache server is installed with our VPS packages with CentOS by default so you may skip this step.

Set the apache service to start on boot
chkconfig httpd on

or type ntsysv for GUI tool

PHP

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. For more information on PHP, visit their website at http://www.php.net/.

Install PHP
yum install php

Restart Apache to load php
/etc/init.d/httpd restart


Test If PHP Is Working Or Not:

1. Create a file named info.php
vi /var/www/html/info.php 

with the following text:
<?php
  phpinfo();
?>

Then point your browser to http://ipaddress/info.php.
NOTE: It is NOT recommended to expose the info PHP file to public view.
That's it! You should see a PHP configuration file displaying all kind of paths and installed modules.

MYSQL

MySQL is a Relational Database Management System (RDBMS) that runs as a server providing multi-user access to a number of databases. For more information on MySQL, you can visit their website at www.mysql.com.

Install MySQL Database Server
yum install mysql-server mysql php-mysql

1. Set the MySQL service to start on boot
chkconfig mysqld on or type ntsysv for GUI tool
 
2. Start the MySQL service
/etc/init.d/mysqld start

3. Log into MySQL
mysql -u root

4. Set the root user password for all local domains (otherwise anybody can access your MySQL database!)
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new-password');
SET PASSWORD FOR 'root'@'localhost.localdomain' = PASSWORD('new-password');
SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('new-password');

5. Drop the Any user
DROP USER ''@'localhost';
DROP USER ''@'localhost.localdomain';

6. Exit MySQL
exit

Alternatively you can run a script to improve the security of your MySQL installation. This is recommended for all MySQL servers in production use!
mysql_secure_installation

PHPMYADMIN

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Visit the phpMyAdmin website for more information.

Install phpMyAdmin
yum install phpmyadmin

NOTE: You might encounter the following errors while configuring phpMyAdmin
Forbidden
You don't have permission to access /phpmyadmin/ on this server.


To fix:
Edit the /etc/httpd/conf.d/phpMyAdmin.conf file and uncomment the line deny from all
vi /etc/httpd/conf.d/phpMyAdmin.conf
<Directory "/usr/share/phpmyadmin">
  Order Deny,Allow
  # Deny from all
  Allow from 127.0.0.1
</Directory>

NOTE: The location of the phpMyAdmin configuration file is /etc/phpMyAdmin/config.inc.php

Restart the Apache Server
/etc/init.d/httpd restart
 
Test:
1. Visit http://ipaddress/phpmyadmin in your web browser. You should be prompted for authentication
2. Enter the system root username and password and click OK
3. You should now be presented with the phpMyAdmin home page


Monday, July 4, 2011

Upgrading CentOS 5.5 to CentOS 5.6

Before upgrading CentOS 5.5 to 5.6 it cannot be stressed enough how important it is to make a backup of your system before you do this. Actions listed in this post are written with the assumption that they will be executed by the root user running the bash or any other modern shell.Clean All Packages
# yum clean all
The following command will get a list of packages that are going to be updated.
# yum list updates
Lets begin upgrading CentOS 5.5 to 5.6
# yum update
Finally reboot the server for Kernel changes to take effect
# reboot
Verify that CentOS 5.6 is working:
# cat /etc/redhat-release
CentOS release 5.6 (Final)
Or:
# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.6 (Final)
Release: 5.6
Codename: Final
Or:
# rpm -q centos-release
centos-release-5-6.el5.centos.1

Sunday, July 3, 2011

Get Information About Your BIOS / Server Hardware From a Shell Without Opening Chassis ( BIOS Decoder )

biosdecode is a command line utility to parses the BIOS memory and prints information about all structures (or entry points) it knows of. You can find out more information about your hardware such as:
=> IPMI Device
=> Type of memory and speed
=> Chassis Information
=> Temperature Probe
=> Cooling Device
=> Electrical Current Probe
=> Processor and Memory Information
=> Serial numbers
=> BIOS version
=> PCI / PCIe Slots and Speed
=> Much more

biosdecode parses the BIOS memory and prints the following information about all structures :
=> SMBIOS (System Management BIOS)
=> DMI (Desktop Management Interface, a legacy version of SMBIOS)
=> SYSID
=> PNP (Plug and Play)
=> ACPI (Advanced Configuration and Power Interface)
=> BIOS32 (BIOS32 Service Directory)
=> PIR (PCI IRQ Routing)
=> 32OS (BIOS32 Extension, Compaq-specific)
=> VPD (Vital Product Data, IBM-specific)
=> FJKEYINF (Application Panel, Fujitsu-specific)
In this tip you will learn about decoding BIOS data (dumping a computer's DMI ) and getting all information about computer hardware without rebooting the server.

More about the DMI tables

The DMI table doesn’t only describe what the system is currently made of, it also can report the possible evolutions such as the fastest supported CPU or the maximal amount of memory supported.

dmidecode - Read biosdecode data in a human-readable format

Data provided by biosdecode is not in a human-readable format. You need to use dmidecode command for dumping a computer’s DMI (SMBIOS) table contents on screen. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware.

Task: Display information about IPMI Device

# dmidecode --type 38
Output:
# dmidecode 2.7
SMBIOS 2.4 present.

Handle 0x0029, DMI type 38, 18 bytes.
IPMI Device Information
        Interface Type: KCS (Keyboard Control Style)
        Specification Version: 2.0
        I2C Slave Address: 0x10
        NV Storage Device: Not Present
        Base Address: 0x0000000000000CA2 (I/O)
        Register Spacing: Successive Byte Boundaries

Task: Display information about PCI / PCIe Slots

# dmidecode --type 9
# dmidecode 2.7
SMBIOS 2.4 present.

Handle 0x000E, DMI type 9, 13 bytes.
System Slot Information
        Designation: PCIX#1-133MHz
        Type: 64-bit PCI-X
        Current Usage: Available
        Length: Long
        ID: 1
        Characteristics:
                3.3 V is provided

Handle 0x000F, DMI type 9, 13 bytes.
System Slot Information
        Designation: PCIX#2-100MHz
        Type: 64-bit PCI-X
        Current Usage: Available
        Length: Long
        ID: 2
        Characteristics:
                3.3 V is provided

Handle 0x0010, DMI type 9, 13 bytes.
System Slot Information
        Designation: PCIE#3-x8
        Type: Other
        Current Usage: Available
        Length: Other
        Characteristics:
                3.3 V is provided

Handle 0x0011, DMI type 9, 13 bytes.
System Slot Information
        Designation: PCIE#4-x8
        Type: Other
        Current Usage: Available
        Length: Other
        Characteristics:
                3.3 V is provided

Handle 0x0012, DMI type 9, 13 bytes.
System Slot Information
        Designation: PCIE#5-x8
        Type: Other
        Current Usage: Available
        Length: Other
        Characteristics:
                3.3 V is provided

Task: Find out Information about BIOS

# dmidecode --type 0
Output:
# dmidecode 2.7
SMBIOS 2.4 present.
Handle 0x0000, DMI type 0, 24 bytes.
BIOS Information
        Vendor: Phoenix Technologies LTD
        Version: 6.00
        Release Date: 01/26/2007
        Address: 0xE56C0
        Runtime Size: 108864 bytes
        ROM Size: 1024 kB
        Characteristics:
                PCI is supported
                PNP is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                ESCD support is available
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                3.5"/2.88 MB floppy services are supported (int 13h)
                ACPI is supported
                USB legacy is supported
                LS-120 boot is supported
                ATAPI Zip drive boot is supported
                BIOS boot specification is supported
                Targeted content distribution is supported

Understanding BIOS keywords

dmidecode --type {KEYWORD / Number }
You need to pass dmidecode following keywords:
  • bios
  • system
  • baseboard
  • chassis
  • processor
  • memory
  • cache
  • connector
  • slot
All DMI types you need to use with dmidecode --type {Number}:
# Type Short Description
0 BIOS
1 System
2 Base Board
3 Chassis
4 Processor
5 Memory Controller
6 Memory Module
7 Cache
8 Port Connector
9 System Slots
10 On Board Devices
11 OEM Strings
12 System Configuration Options
13 BIOS Language
14 Group Associations
15 System Event Log
16 Physical Memory Array
17 Memory Device
18 32-bit Memory Error
19 Memory Array Mapped Address
20 Memory Device Mapped Address
21 Built-in Pointing Device
22 Portable Battery
23 System Reset
24 Hardware Security
25 System Power Controls
26 Voltage Probe
27 Cooling Device
28 Temperature Probe
29 Electrical Current Probe
30 Out-of-band Remote Access
31 Boot Integrity Services
32 System Boot
33 64-bit Memory Error
34 Management Device
35 Management Device Component
36 Management Device Threshold Data
37 Memory Channel
38 IPMI Device
39 Power Supply

Display Power supply information, enter:
# dmidecode --type 39

Display CPU information, enter:
# dmidecode --type processor

Read man page for more information:
$ man dmidecode

Restore GRUB

GRUB is a boot loader commonly used with linux operating system. It can be used to managed dual boot environment where linux and windows can coexist easily in a same machine without problem provided you install the windows OS first so that when you install linux, GRUB will overwrite Windows boot loader and automatically detect and manage both operating system the next time you boot your computer. Problems will happen if you alter your partitions outside the knowledge of GRUB, for example, you create new partition in your hard drive using windows. This will cause GRUB to automatically go into GRUB shell when boot. To restore back your GRUB is very simple, just follow easy steps below:

1. find in which partition does GRUB store its configuration file, which is your /boot partition. (hd0,2) means third partition of the first hard drive
grub> find /boot/grub/stage1
(hd0,2)

2. set the root for GRUB to be (hd0,2)
grub> root (hd0,2)

3. write GRUB to the Master boot record(MBR) of your hard drive. Change (hd0) to (hd0,2) to write GRUB to your /boot partition instead
grub> setup (hd0)

4. Reboot machine
grub> reboot

Checking hardisk information on linux

To check hardisk information such as model and serial number, there are a few useful commands like hdparm, sdparm and fdisk.

To check the information about first hardisk for PATA and SATA hardisk:
# hdparm -i /dev/sda

For SCSI disk, a different command is to be used:
# sdparm /dev/sda

To check the hardisk capacity and partitions contained in the hardisk, fdisk can be used:
# fdisk -lu /dev/sda

Setting Up An NFS Server And Client On CentOS 5.5

1 Preliminary Note

I'm using two CentOS systems here:
  • NFS Server: server.example.com, IP address: 192.168.0.100
  • NFS Client: client.example.com, IP address: 192.168.0.101

2 Installing NFS

server:
On the NFS server we run:
yum install nfs-utils nfs-utils-lib

Then we create the system startup links for the NFS server and start it:
chkconfig --levels 235 nfs on
/etc/init.d/nfs start 

client:
On the client we can install NFS as follows (this is actually the same as on the server):
yum install nfs-utils nfs-utils-lib

3 Exporting Directories On The Server

server:
I'd like to make the directories /home and /var/nfs accessible to the client; therefore we must "export" them on the server.
When a client accesses an NFS share, this normally happens as the user nobody. Usually the /home directory isn't owned by nobody (and I don't recommend to change its ownership to nobody!), and because we want to read and write on /home, we tell NFS that accesses should be made as root (if our /home share was read-only, this wouldn't be necessary).
The /var/nfs directory doesn't exist, so we can create it and change its ownership; in my tests the user and group nobody both had the ID 99 on both my CentOS test systems (server and client); when I tried to write to /var/nfs from the NFS client, I got a Permission denied error, so I did a chmod 777 /var/nfs so that everyone could write to that directory; writing to /var/nfs from the client worked then, and on the client the files written to /var/nfs appeared to be owned by the user and group nobody, but on the server they were owned by the (nonexistant) user and group with the ID 65534; so I changed ownership of /var/nfs to the user/group 65534 on the server and changed permissions of /var/nfs back to 755, and voilĂ , the client was allowed to write to /var/nfs:
mkdir /var/nfs
chown 65534:65534 /var/nfs
chmod 755 /var/nfs

Now we must modify /etc/exports where we "export" our NFS shares. We specify /home and /var/nfs as NFS shares and tell NFS to make accesses to /home as root (to learn more about /etc/exports, its format and available options, take a look at
man 5 exports
)
vi /etc/exports
/home           192.168.0.101(rw,sync,no_root_squash,no_subtree_check)
/var/nfs        192.168.0.101(rw,sync,no_subtree_check)
(The no_root_squash option makes that /home will be accessed as root.)

Whenever we modify /etc/exports, we must run
exportfs -a
afterwards to make the changes effective.

4 Mounting The NFS Shares On The Client

client:
First we create the directories where we want to mount the NFS shares, e.g.:
mkdir -p /mnt/nfs/home
mkdir -p /mnt/nfs/var/nfs

Afterwards, we can mount them as follows:
mount 192.168.0.100:/home /mnt/nfs/home
mount 192.168.0.100:/var/nfs /mnt/nfs/var/nfs

You should now see the two NFS shares in the outputs of
df -h
[root@client ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       28G  2.2G   25G   8% /
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                 250M     0  250M   0% /dev/shm
192.168.0.100:/home    28G  2.6G   25G  10% /mnt/nfs/home
192.168.0.100:/var/nfs
                       28G  2.6G   25G  10% /mnt/nfs/var/nfs
[root@client ~]#
and
mount
[root@client ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.0.100:/home on /mnt/nfs/home type nfs (rw,addr=192.168.0.100)
192.168.0.100:/var/nfs on /mnt/nfs/var/nfs type nfs (rw,addr=192.168.0.100)
[root@client ~]#

5 Testing

On the client, you can now try to create test files on the NFS shares:
client:
touch /mnt/nfs/home/test.txt
touch /mnt/nfs/var/nfs/test.txt

Now go to the server and check if you can see both test files:
server:
ls -l /home/
[root@server ~]# ls -l /home/
total 55540
-rw-r--r-- 1 root         root                0 Sep 16 17:30 test.txt
[root@server ~]#

Installing Apache2 With PHP5 And MySQL Support On CentOS 5.6 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a CentOS 5.6 server with PHP5 support (mod_php) and MySQL support.
I do not issue any guarantee that this will work for you!

1 Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

2 Installing MySQL 5.0

To install MySQL, we do this:
yum install mysql mysql-server

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start

Set passwords for the MySQL root account:
mysql_secure_installation
[root@server1 ~]# mysql_secure_installation




NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n]
 <-- ENTER
New password: <-- yourrootsqlpassword
Re-enter new password: <-- yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]
 <-- ENTER
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]
 <-- ENTER
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
 <-- ENTER
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
 <-- ENTER
 ... Success!

Cleaning up...


All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!


[root@server1 ~]#


==========================================================================

3 Installing Apache2

Apache2 is available as a CentOS package, therefore we can install it like this:
yum install httpd

Now configure your system to start Apache at boot time...
chkconfig --levels 235 httpd on
... and start Apache:
/etc/init.d/httpd start
Now direct your browser to http://192.168.0.100, and you should see the Apache2 placeholder page:



Apache's default document root is /var/www/html on CentOS, and the configuration file is /etc/httpd/conf/httpd.conf. Additional configurations are stored in the /etc/httpd/conf.d/ directory. 

==========================================================================

Installing PHP5

We can install PHP5 and the Apache PHP5 module as follows:
yum install php

We must restart Apache afterwards:
/etc/init.d/httpd restart

Testing PHP5 / Getting Details About Your PHP5 Installation


The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.


vi /var/www/html/info.php

type coding as below:-
<?php
phpinfo();
?>
Now we call that file in a browser (e.g. http://192.168.0.100/info.php):
As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support in PHP5 yet.

==========================================================================

Getting MySQL Support In PHP5

To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:
yum search php

Pick the ones you need and install them like this:
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc

Now restart Apache2:
/etc/init.d/httpd restart

Now reload http://192.168.0.100/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:

 ==========================================================================

phpMyAdmin

phpMyAdmin is a web interface through which you can manage your MySQL databases.
First we enable the RPMforge repository on our CentOS system as phpMyAdmin is not available in the official CentOS 5.6 repositories:

On x86_64 systems:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm -Uhv rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

On i386 systems:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -Uhv rpmforge-release-0.5.2-2.el5.rf.i386.rpm

phpMyAdmin can now be installed as follows:
yum install phpmyadmin

Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza):
vi /etc/httpd/conf.d/phpmyadmin.conf
#
#  Web application to manage MySQL
#

#<Directory "/usr/share/phpmyadmin">
#  Order Deny,Allow
#  Deny from all
#  Allow from 127.0.0.1
#</Directory>

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

Next we change the authentication in phpMyAdmin from cookie to http:
vi /usr/share/phpmyadmin/config.inc.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]

Restart Apache:
/etc/init.d/httpd restart 

Afterwards, you can access phpMyAdmin under http://192.168.0.100/phpmyadmin/: