Fedora Core 3

Table of Contents

Introduction

Use these instructions to install GNU/Linux and the software required for supporting a PHP- or Perl-based web server and database server. These instructions tell you how to install and configure:

Fedora is an open source GNU/Linux project sponsored by Red Hat. Fedora Core 3 was released on November 3, 2004. A later version of Fedora, Fedora Core 4, was released on June 9, 2005.

These instructions assume you are installing Fedora Core 3 onto a PC with a 32-bit Intel or AMD processor. I have created these instructions by installing Fedora Core 3 on a Toshiba Satellite Pro laptop.

falko provides instructions for The Perfect Setup—Fedora Core 3 at www.howtoforge.com.

Install and Configure Fedora Core 3

Obtain the Fedora Core 3 Installation CDs

The ISO images for the installation CDs for Fedora Core 3 can be downloaded from the Fedora Core Download Server. You need to download the following files:

Since the downloads are large, you need a high-speed Internet connection to obtain them. Even then, it will take three to four hours to download all four images.

One you have downloaded the files, you need to burn each file to a CD. I did this on my PowerBook using Apple’s Disk Utility.

Install Fedora Core 3

Boot from Fedora Core Disk 1

Configure the BIOS of your computer so it will boot first from the CD drive. On my Toshiba laptop, I entered the BIOS configuration by pressing the Esc key immediately after turning on the computer. The BIOS configuration screen allowed me to direct the computer to attempt to boot first from the internal CD drive. I saved this setting and exited the configuration screen.

As an alternative, on my Toshiba laptop I can press F12 immediately after turning on the computer. This causes the computer to present a menu for choosing the boot device.

Place Fedora Core 3 Disk 1 into the CD drive, and reboot the computer.

Choose Install or upgrade in graphical mode by pressing the enter key

Test the CD Media

You should test the CDs before you use them for the first time. Use the tab key to highlight the OK button, then press the space bar to initiate testing.

Skip testing the media by using the tab key to highlight the Skip button, then press the space bar.

Welcome to Fedora Core

On the Welcome to Fedora Core screen, read the text on the left, then click the Next button.

Language Selection

On the Language Selection screen, select the language you want to use during the installation process, then click the Next button.

Keyboard Configuration

On the Keyboard Configuration screen, select the appropriate keyboard for the system, then click the Next button.

Upgrade Examine

The installer searches for an existing installation of Fedora Core. If the installer detects that a version of Fedora Core is already installed on the computer, it presents the Upgrade Examine screen, which gives you the option to Install Fedora Core or Upgrade an existing installation. These directions follow the Install Fedora Core path. Select Install Fedora Core, then click the Next button.

If Fedora Core is not already installed on the computer, then the installer omits the Upgrade Examine step.

Installation Type

On the Installation Type screen, select Server, then click the Next button.

Disk Partitioning Setup

On the Disk Partitioning Setup screen, select Automatically partition, then click the Next button.

Automatic Partitioning

Partitioning sets up the hard drive so it can hold the Fedora Core 3 installation. You may already have another operating system installed on the computer (such as Windows XP) that you want to preserve. On the Automatic Partitioning screen, carefully select the choice that is most appropriate.

For a dedicated web server, you will normally want to select the second option, Remove all partitions on this system, and these directions assume that you make this choice. This choice wipes out everything previously installed on the computer.

However, on a dual boot machine that can boot Windows and a previous installation of GNU/Linux, you want to check Remove all Linux partitions on this system. This choice wipes out the previous GNU/Linux installation but preserves the Windows installation.

If Windows is installed and GNU/Linux is not already installed, you must have free disk space reserved for the GNU/Linux installation. In this case, select Keep all partitions and use existing free space.

Click the Next button.

Disk Setup

On the Disk Setup screen, check that Automatic Partitioning has set up your drives the way you desire. Click on the Back button to return to the previous step if necessary.

When finished with this step, click the Next button.

Boot Loader Configuration

On the Boot Loader Configuration screen, accept the default options. You want the GRUB boot loader installed; this will allow you to boot into other operating systems if you have a dual boot machine. Click the Next button.

Network Configuration

On the Network Configuration screen, you can set up your computer to run initially using DHCP, then later modify the network settings to assign a static IP address and host name. These directions assume you set the hostname automatically via DHCP, the default setting. Click the Next button.

Firewall Configuration

On the Firewall Configuration screen, select Enable firewall. Check the following options:

These directions ignore the Mail Server (SMTP) option.

For Enable SELinux, select Warn from the popup menu.

Click the Next button.

Additional Language Support

On the Additional Language Support screen, select additional languages to install on the system. Click the Next button.

Time Zone Selection

On the Time Zone Selection screen, using the scrolling list to select your time zone. Click the Next button.

Set Root Password

On the Set Root Password screen, enter a high-quality root password and confirm it. A high-quality root password is about 15 characters long with a relatively random assortment of upper case and lower case letters, numerals, and punctuation characters. Click the Next button.

Package Group Selection

On the Package Group Selection screen, select the software you want to install on the computer. My recommendations are given in the table below. You will later use the yum utility to load other packages after the initial install procedure.

Package Group Selected Notes
X Window System Yes Accept the default options.
GNOME Desktop Environment Yes Accept the default options.
KDE (K Desktop Environment) No
XFCE No
Editors Yes Click the Details link and select your favorite editor. I find that the gedit editor, installed as part of the GNOME Desktop Environment, works well.
Engineering and Scientific No You will install gnuplot and other scientific software later.
Graphical Internet No You will install the latest version of the Mozilla FireFox web browser later.
Text-based Internet No
Office/Productivity No
Sound and Video No
Authoring and Publishing No
Graphics No You will install the graphics software later.
Games and Entertainment No
Server Configuration Tools Yes Click on the Details link, and select just the following four optional packages:
  • system-config-httpd
  • system-config-securitylevel
  • system-config-services
  • xorg-x11-xauth
Web Server Yes Fedora Core 3 comes with Apache httpd version 2.0.53 and PHP version 4.3.9. Do not install PHP; you will install PHP version 4.4.1 later. Click on the Details link and select the optional packages you desire. I recommend:
  • httpd-manual
  • mod-perl
Mail Server No
Windows File Server No
DNS Name Server No
FTP Server Yes Accept the default option.
PostgresQL Database No
MySQL Database No Fedora Core 3 comes with MySQL version 3.23. You will install MySQL version 4.1.15 later.
News Server No
Network Servers No
Legacy Network Server No
Development Tools Yes Accept the default options.
X Software Development No
GNOME Software Development No
KDE Software Development No
XFCE Software Development No
Legacy Software Development No
Administration Tools Yes Accept the default options.
System Tools No
Printing Support No
Everything No
Minimal No

Click the Next button.

About to Install

On the About to Install screen, read the text carefully, then click the Next button.

Required Install Media

Make sure you have all four Fedora Core 3 CDs to hand. If you followed these directions, you’ll require CDs #1, #2, and #3. In the Required Install Media window, click the Continue button.

Installing Packages

The Installing Packages screen will provide status messages during the installation and prompt you to exchange CDs when required.

When the installation is complete, remove the last CD from the drive, connect the computer to your network, and click the Reboot button.

Reboot

When you reboot, if you also have Windows or another operating system installed on your machine, the GRUB booter will give you a few seconds to enter a menu and choose which operating system to boot. If you don’t respond, GRUB will boot Fedora Core 3 automatically.

Welcome

After reboot, Fedora Core will provide a Welcome screen that begins the steps for completing the setup of the system. Click the Next button.

License Agreement

On the License Agreement screen, read the license agreement, select Yes, I agree to the License Agreement, and click the Next button.

Date and Time

On the Date and Time screen, set the correct date and time, then click the Next button.

Display

On the Display screen, set the correct monitor type, resolution, and color depth for your display.

For my Toshiba Satellite Pro laptop, I clicked the Configure button, chose Generic LCD Display, selected LCD Panel 1400 x 1050, and clicked the OK button.

When finished, click the Next button.

System User

On the System User screen, set up an account for a normal system user. (You should use the root account only for system administration tasks.) When finished, click the Next button.

Sound Card

If the installer detected a compatible sound card in your computer, it presents the Sound Card screen. Test your sound card if you want to. When finished, click the Next button.

Additional CDs

On the Additional CDs screen, install software from additional CDs if you have any. These instructions assume that you have only the four Fedora Core 3 installation CDs and that there is nothing else to install. Click the Next button.

Finish Setup

On the Finish Setup screen, click the Next button.

Log In

Fedora Core will finish booting and present the login screen. Log in as the root user.

Update Fedora Core 3

Fedora Core 3 was released in November, 2004, and there have been many updates since. Follow these instructions to use the yum utility to apply the updates and install additional software.

Open Terminal

To open the Terminal application, which provides a command line prompt, click the Applications menu, select System Tools, then select Terminal. The default prompt for the root user will look something like this:

[root@localhost ~]#

For all commands given below, the prompt will be shown as:

#

Do not enter the prompt character when you enter commands.

Import GPG keys

In the Terminal window, attempt to use yum to update the Fedora Core 3 software by entering the command:

# yum update

Yum gives the following warning:

# yum update
You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
    rpm --import public.gpg.key
For more information contact your distribution or package provider.

Unfortunately, the recommended command does not work.

# rpm --import public.gpg.key
error: public.gpg.key: import read failed.

The proper command to run is:

# rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora

Update Fedora Core 3 with yum

In the Terminal window, use yum to update the Fedora Core 3 software by entering the command:

# yum update

This begins the update process, which takes a long time. First, yum figures out which packages need to be updated. Then it gives you the following prompt:

Performing the following to resolve dependencies:
  Install: libidn-devel.i386 0:0.5.6-1
Is this ok [y/N]:

Enter y to initiate downloading the packages. The downloads take a few minutes to a few hours, depending on the speed of your Internet connection and on which mirror yum chooses. Once the packages have been downloaded, yum installs them, a process that can minutes to hours depending on the capabilities of your computer.

On October 23, 2005, the update of my Toshiba laptop involved downloading and installing 384 packages. The downloads required 23 minutes and the installation required 18 minutes.

Once the update is complete, reboot the computer.

Kernel Cleanup

After the update, there will be at least two and possibly four different kernels installed on your server. You only need one of these. (On reboot, the GRUB boot loader allows you to specify which kernel your server should run.)

To identify the kernels installed on your server, open a Terminal window by right-clicking on the desktop and selecting Open Terminal from the menu. In the Terminal window, enter the following command:

# yum list installed "kernel*"

The output may look something like this:

# yum list installed "kernel*"
Installed Packages
kernel.i686                              2.6.12-1.1380_FC3       installed
kernel.i686                              2.6.9-1.667             installed
kernel-smp.i686                          2.6.9-1.667             installed
kernel-smp.i686                          2.6.12-1.1380_FC3       installed
kernel-utils.i386                        1:2.4-13.1.49_FC3       installed

The kernel-smp.i686 kernels are Symmetric MultiProcessing kernels, which are designed for multi-processor computers. Sometimes the SMP kernels get installed on single-processor machines, where they run inefficiently. In this example, where the installation is on a single-processor computer, you want to remove all kernels except the latest version of kernel.i686, using the following commands:

# yum remove kernel-smp-2.6.12-1.1380_FC3.i686
# yum remove kernel-smp-2.6.9-1.667.i686
# yum remove kernel-2.6.9-1.667.i686

When you restart your server, GRUB finds only the single remaining kernel.

Install FireFox

You want the latest version of the Mozilla FireFox web browser installed. Use the following command in the Terminal window:

# yum install firefox.i386

This installs FireFox 1.07. Once FireFox is installed, you can launch it by clicking on the Applications menu, selecting Internet, then selecting FireFox Web Browser. When FireFox starts, its default web page is the Fedora Core 3 Release notes installed on your server.

Start and Test the Web Server

Fedora Core 3 installs the Apache httpd web server but doesn’t start it. Click on the Applications menu, select System Settings, select Server Settings, and select Services. This opens the Service Configuration utility.

On the left hand side, scroll down to httpd and click the check box to its left. Then click the Start button in the row of buttons near the top of the window. A dialog box will appear named Information with the message httpd start successful. Click the OK button.

In the Service Configuration window, click on the File menu and select Save Changes. Then click on the File menu and select Quit. This configures the Apache httpd service to start automatically upon reboot.

Open the FireFox application by clicking on the Applications menu, selecting Internet, then selecting FireFox Web Browser. Enter the URL http://localhost/. The Fedora Core Test Page will appear. This confirms that the Apache httpd web server is functioning normally. To view the documentation for the web server, use the URL http://localhost/manual/.

If the httpd service doesn’t appear in the Service Configuration window, or if FireFox can’t open the default web page, then use yum to check that you have all the required packages installed. These are:

Functionality RPMs Version Notes
Web Server httpd.i386 2.0.53-3.3 Apache httpd web server.
httpd-manual.i386
httpd-suexec.i386
apr.i386 0.9.4-24.2 Apache runtime library.
apr-util.i386 0.9.4-17

Install MySQL 4

There are three major versions of MySQL, version 3, version 4, and version 5. At the time of writing, the latest release of MySQL 4 is release 4.1.15.

The version of MySQL that is installed under Fedora Core 3 is version 3.23, a very old version that is missing a lot of capabilities found in version 4.1. If you followed these directions, you did not install MySQL.

Uninstall MySQL 3.23

Use yum to make sure you didn’t accidentally install MySQL 3.23. Here is what you must do if you need to remove MySQL 3.23:

# yum list installed "mysql*"
Installed Packages
mysql.i386                        3.23.58-16.FC3.1       installed
mysql-server.i386                 3.23.58-16.FC3.1       installed
# yum remove mysql.i386 mysql-server.i386
...
Transaction Listing:
  Remove: mysql.i386 0:3.23.58-16.FC3.1
  Remove: mysql-server.i386 0:3.23.58-16.FC3.1

Performing the following to resolve dependencies:
  Remove: perl-DBD-MySQL.i386 0:2.9003-5
Total download size: 0
Is this ok [y/N]:

Here, yum reports that it must also remove the package perl-DBD-MySQL.i386 because it is dependent on the other two packages being removed. Enter y to proceed.

Download and Install MySQL 4.1.15

Now install MySQL 4.1.15. Open FireFox and navigate to the MySQL 4.1 Downloads page at http://dev.mysql.com/downloads/mysql/4.1.html. Scroll down to the Linux x86 RPM downloads area and use FireFox to download and install the following packages:

Click on the Pick a Mirror link for the appropriate package. This takes you to a MySQL registration page. If you register, you will receive e-mail notices from mysql.com. Registration is not required, and you can click on the No thanks, just take me to the downloads! link. On the next page, choose a mirror that is geographically near your location.

When you begin the download of a package, FireFox gives you an option to open the file with Install Packages (default). Click this option, then click the OK button. FireFox downloads the file, after which a dialog box appears that states that a package is queued for installation. Click the Continue button to install the package. Repeat this process for the remaining three packages. (Isn’t this remarkably easy?)

When you install the MySQL Server (glibc 2.3) 4.1.15-0 package, the package installer determines that it also needs to install the perl-DBI-1.40-5 package. It prompts you to insert Fedora Core 3 Disk 1 so it can install this package.

There is an update to the perl-DBI.i386 package that was installed from the Fedora Core 3 Disk #1 CD. Run yum to update it.

# yum update
...
Transaction Listing:
  Update: perl-DBI.i386 0:1.40-6.fc3 - updates-released
Total download size: 466 k
Is this ok [y/N]:

Enter y at the prompt to proceed.

Verify using yum that the correct packages are installed.

# yum list installed "mysql*"
Installed Packages
MySQL-client.i386                       4.1.15-0.glibc23       installed
MySQL-devel.i386                        4.1.15-0.glibc23       installed
MySQL-server.i386                       4.1.15-0.glibc23       installed
MySQL-shared.i386                       4.1.15-0.glibc23       installed

The MySQL 4.1.15 packages are summarized in the following table:

Functionality RPMs Version Notes
MySQL MySQL-client.i386 4.1.15-0 MySQL database management system, installed from dev.mysql.com.
MySQL-devel.i386
MySQL-server.i386
MySQL-shared.i386

Configure MySQL

You may want to set the MySQL query cache settings using a MySQL option file. Using your favorite editor, create the file /etc/my.cnf and enter the following lines:

[mysqld]
query_cache_limit = 30k
query_cache_size = 30M
query_cache_type = 1

Save the file and close the editor. More information on creating MySQL option files is available in the MySQL 4.1 manual, section 4.3.2, at the MySQL Documentation page.

Restart MySQL

Restart the MySQL server so it will recognize and use these new settings. Click on the Applications menu, select System Settings, select Server Settings, and select Services. This opens the Service Configuration utility.

On the left hand side, scroll down to mysql and select it. Its check box should be checked. Click the Restart button in the row of buttons near the top of the window. A dialog box appears named Information with the message mysql restart successful. Click the OK button, then close the Service Configuration window.

Test MySQL

Fedora Core 3 is configured by the installation to start the MySQL server automatically. Verify that the server is active by logging in to MySQL using the mysql program and entering the show databases; and exit commands at the MySQL prompt.

# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.15-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+----------+
| Database |
+----------+
| mysql    |
| test     |
+----------+
2 rows in set (0.00 sec)

mysql> exit
Bye
#

This verifies that the MySQL database server and client programs are installed correctly.

Install Graphics, Numerics, and Software Development Packages

Required Packages

For a server that you’re going to use for bioinformatics data, you will want to install some or all of the following packages.

Functionality RPMs Version Notes
zlib zlib.i386 1.2.1.2-3.fc3 Compression support.
zlib-devel.i386
libjpeg libjpeg.i386 6b-33 JPEG image support.
libjpeg-devel.i386
libtiff libtiff.i386 3.6.1-10.fc3 TIFF image support.
libtiff-devel.i386
libpng libpng.i386 2:1.2.8-1.fc3 PNG image support.
libpng-devel.i386
freetype freetype.i386 2.1.9-1 Freetype font support.
freetype-devel.i386
gd gd.i386 gd.i386 Image generation support.
gd-devel.i386
gd-progs.i386
netpbm netpbm.i386 10.28-1.FC3.2 Image conversion support.
netpbm-devel.i386
netpbm-progs.i386
ghostscript ghostscript.i386 7.07-33 PostScript and PDF language interpreter.
ghostscript-fonts.noarch 5.50-13
gnuplot gnuplot.i386 4.0.0-4 Portable command-line driven interactive data and function plotting utility.
gcc cpp.i386 3.4.4-2.fc3 GNU compiler collection.
gcc.i386
gcc-c++.i386
gcc-g77
gcc-java.i386
libgcc.i386
libgcj.i386
libgcj-devel.i386
libstdc++.i386
libstdc++-devel.i386
glibc glibc.i686 2.3.5-0.fc3.1 GNU C standard library.
glibc-common.i386
gsl gsl.i386 1.5-1 GNU Scientific Library, a numerical library for C and C++.
gsl-devel.i386
make make.i386 1:3.80-5 GNU make system.
automake automake.noarch 1.9.2-3 GNU automake system for automated generation of Makefiles.
autoconf autoconf.noarch 2.59-5 GNU automated configuration system.
libtool libtool.i386 1.5.6-4.FC3.2 GNU generic library support script.
libtool-libs.i386
bash bash.i386 3.0-18 GNU bash shell or command language interpreter.
sed sed.i386 4.1.2-4 GNU streams editor for text filtering.
awk gawk.i386 3.1.3-9 GNU awk scripting language.
java java-1.4.2-gcj-compat-devel.noarch 1.4.2.0-11jpp Java programming support.
ecj.i386 2.1.3-5
java-1.4.2-gcj-compat.noarch 1.4.2.0-11jpp
katana.noarch 2.0.0-1
httpd httpd-devel.i386 2.0.53-3.3 Required to compile and install PHP 4.4.1.
apr-devel.i386 0.9.4-17
apr-util-devel.i386 0.9.4-17
pcre-devel.i386 4.5-3.1.1.fc3

Install Required Packages with yum

Use the yum utility to identify which of these packages is missing, and install the missing packages. To determine if a set of packages is installed, use a command like the following:

# yum list installed "zlib*"
Installed Packages
zlib.i386                                1.2.1.2-3.fc3          installed
zlib-devel.i386                          1.2.1.2-3.fc3          installed

In this case, the required zlib packages are already installed. However, for libjpeg, the result is:

# yum list installed "libjpeg*"
Installed Packages
libjpeg.i386                             6b-33                  installed

For this example, libjpeg.i386 is installed, but libjpeg-devel.i386 is not. Install libjpeg-devel.i386 with the following command:

# yum install libjpeg-devel.i386

You can use yum to install several programs simultaneously. For example:

# yum install gd.i386 gd-devel.i386 gd-progs.i386

I found that I had to install the following packages, where indented package names indicate packages that were installed as prerequisites to the package being installed:

Install PHP 4

There are two versions of PHP, PHP version 4 and PHP version 5. At the time of writing, the latest release of PHP version 4 is PHP 4.4.1.

Download PHP Source Code

Open the FireFox web browser and navigate to the PHP project’s downloads page at http://www.php.net/downloads.php. Under PHP 4.4.1 Complete Source Code, click on the link for PHP 4.4.1 (tar.gz). On the next page, choose a mirror site from which to download the source code. In the dialog box that appears, tell FireFox to save the file to disk.

Compile and Install PHP

Open a Terminal window by right-clicking on the Desktop and selecting Open Terminal. In the Terminal window, execute the following commands, which move the archive to root’s home directory /root, extract the source code from the archive, and configure the build instructions. To simplify the entering of the configuration options, I have placed each option on its own line. You may combine all the options to a single line by omitting the "\" characters.

# cd /root
# mv Desktop/php-4.4.1.tar.gz /root/
# tar -zxf php-4.4.1.tar.gz
# cd php-4.4.1
# ./configure                  \
  --with-apxs2                 \
  --with-gd                    \
  --with-pear                  \
  --with-jpeg-dir=/usr/lib     \
  --with-zlib-dir=/usr/lib     \
  --with-png-dir=/usr/lib      \
  --with-freetype-dir=/usr/lib \
  --with-mysql=/usr            \
  --enable-sockets             \
  --enable-mbstring

If there is an error at the configure step, it is because a Fedora Core 3 package is missing (e.g., freetype-devel.i386). The error message from the configure script will report what is missing. Refer to Install Server Support Software to identify and install the missing Fedora Core 3 package, then run the ./configure command again.

Note that the directory associated with the --with-mysql option is just /usr.

Compile and install PHP 4.4.1 with the following commands:

# make
# make install

Configure PHP

Following the installation directions provided by the file /root/php-4.4.1/INSTALL, copy the file /root/php-4.4.1/php.ini-recommended to /usr/local/lib/php.ini with the following command:

# cp /root/php-4.4.1/php.ini-recommended /usr/local/lib/php.ini

Using your favorite editor, establish the following settings in the file /usr/local/lib/php.ini, where the lines you must change are shown in red:

Line No. Setting
89 short_open_tag = On
246 memory_limit = 200M
285 error_reporting = E_ALL
292 display_errors = Off
302 log_errors = On
380 register_globals = Off
388 post_max_size = 200M
397 magic_quotes_gpc = Off
400 magic_quotes_runtime = Off
497 file_uploads = On
504 upload_max_filesize = 200M

Reconfigure the Apache httpd Server

Now reconfigure the Apache httpd server to use PHP. Using your favorite editor program, open the file /etc/httpd/conf/httpd.conf, which is the configuration file for the Apache httpd server. Below line 798, which is:

AddType application/x-gzip .gz .tgz

add the following lines:


#
# PHP support
#
AddType application/x-httpd-php .php .phtml

Now move to line 376, which looks like:

DirectoryIndex index.html index.html.var

and change the line by adding index.phtml and index.php:

DirectoryIndex index.html index.html.var index.phtml index.php

Restart the httpd server so it will recognize the new configuration and use PHP. Click on the Applications menu, select System Settings, select Server Settings, and select Services. This opens the Service Configuration utility.

On the left hand side, scroll down to httpd and select it. Its check box should be checked. Click the Restart button in the row of buttons near the top of the window. A dialog box appears named Information with the message httpd restart successful. Click the OK button, then close the Service Configuration window.

Test the Apache httpd Server with PHP

Using your favorite editor, create a new file with the following contents:

<?
    phpinfo();
?>

Save the file as /var/www/html/info.php. This creates a dynamic, PHP-generated web page that reports the PHP configuration.

Open the FireFox web browser and navigate to http://localhost/info.php. If the web server and PHP are working correctly, a nicely formatted page should appear that describes the PHP installation on the server.

Install phpMyAdmin

The easiest way to administer the MySQL database is to use phpMyAdmin, a MySQL management tool written using PHP. At the time of writing, the latest release of phpMyAdmin is 2.6.4-pl3.

Download phpMyAdmin

Open the FireFox web browser and navigate to http://www.phpmyadmin.net/home_page/index.php. On the left side of the page, under QUICK DOWNLOADS Latest stable version: phpMyAdmin 2.6.4-pl3, click on the link labeled gzip. On the next page, select a mirror site from which to download the software. When the download begins, tell FireFox to save the file to disk.

Install phpMyAdmin

The installation directions included with the source code say to unpack the archive directly into the document root directory of the web server. This directory is /var/www/html. Open a terminal window by right-clicking on the desktop and selecting Open Terminal from the window. Execute the following commands, which move the phpMyAdmin source code archive to /var/www/html, extract the archive, create a symbolic link, and change the owner of the phpMyAdmin files.

# mv /root/Desktop/phpMyAdmin-2.6.4-pl3.tar.gz /var/www/html/
# cd /var/www/html
# tar -zxf phpMyAdmin-2.6.4-pl3.tar.gz
# rm -f phpMyAdmin-2.6.4-pl3.tar.gz
# ln -s phpMyAdmin-2.6.4-pl3 phpMyAdmin
# chown -R root:root phpMyAdmin-2.6.4-pl3

Open the FireFox web browser and navigate to http://localhost/phpMyAdmin/. If the installation is successful, you see a Welcome to phpMyAdmin page.

Configure phpMyAdmin

The configuration file for phpMyAdmin is /var/www/html/phpMyAdmin/config.inc.php. Use your favorite editor to open and modify this file. There are only two changes to be made:

On line 62, change 'tcp' to 'socket':

$cfg['Servers'][$i]['connect_type']  = 'socket';         // How to connect...

On line 73, change 'config' to 'http':

$cfg['Servers'][$i]['auth_type']     = 'http';           // Authentication...

Reconfigure MySQL Using phpMyAdmin

As an example, you will use phpMyAdmin to create a database named bioinfodb, and you will create a MySQL user, bioinfo, who controls that database.

MySQL 4.1.15 is installed with four authorized users who have no passwords:

You will use phpMyAdmin to set up a root password for user root@% and to set up a second user account for user bioinfo@%. This allows user root and user bioinfo to log in from any machine. The root user will have global privileges. The bioinfo user will have specific privileges on the bioinfodb database.

Create Database

Open the FireFox web browser and navigate to http://localhost/phpMyAdmin/, and log in as user root with no password.

Click on the Databases link. At the bottom of the page, under Create new database, enter bioinfodb in the text entry field. For the collation (the character sorting order), select utf8_unicode_ci in the utf8 set. Click the Create button. This completes creation of the bioinfodb database.

Configure Users

At the top of the page, click on the Server: localhost link. In the page that appears, click on the Privileges link. In the User overview page that appears, there may be a warning:

Warning: Your privilege table structure seem to be older than this MySQL version! Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!

If this warning appears, minimize the phpMyAdmin window, and open a Terminal window by right-clicking on the desktop and selecting Open Terminal from the menu. Enter the mysql_fix_privilege_tables command:

# mysql_fix_privilege_tables
This script updates all the mysql privilege tables to be usable by
MySQL 4.0 and above.

This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION, or the more secure passwords in 4.1

done
#

Return to the FireFox window. Click on the Privileges tab to refresh the window. The warning disappears.

The User Overview table lists four users. Check the checkboxes for user Any at host localhost, user Any at host localhost.localdomain, and user root at host localhost.localdomain. Under Remove selected users, select Delete the users and reload the privileges afterwards., then click the Go button.

The User overview table now shows only the single user, user root on host localhost. Click the icon at the furthest right in the row for this user to edit the user.

On the User 'root'@'localhost' page that appears, scroll down to Change password. Select Password and enter the password twice in the text entry fields, and click the Go button.

Click on the Privileges tab to log in again. Log in as user root with the password you just assigned. If necessary, click on the Privileges tab to return to the User overview page.

For user root on host localhost, click on the icon at the furthest right to edit the user.

On the User 'root'@'localhost' page that appears, scroll down to Change Login Information / Copy User. Click on the popup menu to the right of Host: and select Any host. The text entry field to the right changes from localhost to %. Click the Go button at the bottom of the page. This creates a new user, root on host %.

Click on the Privileges tab to view the two users. Click the checkbox for user root on host localhost. Under Remove selected users, select Delete the users and reload the privileges afterwords. and click the Go button. This completes the changes for the root user.

Click on the Privileges tab to view the User overview page. Click on the link Add a new User. In the Add a new User page that appears, for User name:, select Use text field: from the popup menu and enter bioinfo into the text entry field to the right. For Host:, select Any host from the popup menu. For Password:, select Use text field: from the popup menu, then enter the password twice in the text entry fields. Do not make any changes in the Global privileges part of the page. Click on the Go button.

phpMyAdmin confirms that it has created the new user and present the User 'bioinfo'@'%' page. Scroll down to Database-specific privileges. Click on the popup menu to the right of Add privileges on the following database and select bioinfodb. phpMyAdmin presents the User 'bioinfo'@'%'-Database bioinfodb page. Under Database-specific privileges, click on the link for Check All, then click the Go button.

This completes the configuration of user bioinfo.

Click on the Privileges tab to verify that there are now two users, root@% and bioinfo@%.

Test MySQL Configuration

Confirm that you can connect using either MySQL user. Open a Terminal window by right-clicking the desktop and selecting Open Terminal from the menu. Enter the following commands and confirm the responses from the MySQL client:

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 57 to server version 4.1.15-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+-----------+
| Database  |
+-----------+
| bioinfodb |
| mysql     |
| test      |
+-----------+
4 rows in set (0.00 sec)

mysql> exit
Bye
# mysql -u bioinfo -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 57 to server version 4.1.15-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+-----------+
| Database  |
+-----------+
| bioinfodb |
| test      |
+-----------+
4 rows in set (0.00 sec)

mysql> exit
Bye
#

Install Web Site Documents

Install web site document files in the /var/www/html directory.

Finish Network Configuration

If you configured your server to obtain its IP address using DHCP, you may want to assign it a static IP address so it can be found by other computers on your network. Use the following instructions to assign a static IP address.

Click on the Applications menu, select System Settings, and select Network. In the Network Configuration window that opens, click the Devices tab. Select the eth0 device and click the Edit button at the top of the window.

In the Ethernet Device window that opens, click on the Statically set IP addresses radio button. Set the static IP address. Contact your network administrator to learn what IP address, subnet mask, and default gateway address to use.

In the same Ethernet Device window, click on the Hardware Device tab. Check the box for Bind to MAC address and click the Probe button. Click on the OK button at the bottom of the window to close it.

In the Network Configuration window, click on the DNS tab. Set the Hostname (the name of your server). Set the Primary DNS. Set the DNS search path. Your network administrator can tell you the appropriate values for these fields.

In the same Network Configuration window, click the Hosts tab. Use the buttons at the top of the window to edit the hosts. This table can contain the names of hosts on your network and their corresponding IP addresses. Your network administrator can tell you the appropriate entries to make.

In the same Network Configuration window, click on the File menu and select Save. In the Information window that appears, click the OK button. Close the Network Configuration window.

Restart the server, then test it from another computer. You may need to use the IP address of your server to connect correctly. For example, if the IP address of your server is 192.168.0.2, open a web browser on another computer and navigate to http://192.168.0.2/. You should see the home page for your server.