Now: Tutorial for Web and Software Design > PHP > PHP Basic > PHP Content
> Basic Installation of PHP on a Unix System [Bookmark it]
Basic Installation of PHP on a Unix System
PHP Admin Basics

Basic Installation of PHP on a Unix System

11/17/2000

The configuration system that PHP uses for installation is one of those nice, simple things in life that makes it rosy. At first it might seem a little confusing, but it's really very easy. So let's dive right in.

To download PHP, visit the php.net download page and click the link under the heading "Complete Source Code."

The first thing to do after downloading and unpacking your source archive is to kick the tires a little bit.

You can unpack the archive using:

gunzip php-x.x.x.tar.gz;
tar xvf php-x.x.x.tar

(Substitute x.x.x for the actual version number of the php archive you downloaded.)

After which, you should see a directory called php-x.x.x, where x.x.x is the version number or some variation thereof. Then, cd into this directory and type:

./configure --help | more

to get a list of all available configuration options. The first few lines of output should look something like this:

Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print "checking..." messages
--version print the version of autoconf that created configure

Before compiling PHP you must first decide whether you're going to install it as a CGI binary or as an Apache module. I'll discuss compiling as an Apache module, as the two are virtually identical.

Next you must decide what additional PHP modules you wish to have built at compile time. An example of these modules might be mCrypt or FTP. I'll use these two as examples, but there are many more available. A complete list of supported modules can be found in the PHP documentation or by executing the above configure command.

To configure PHP with the mCrypt and FTP modules built in, type the following command:

./configure --with-apache=/tmp/apache_1.3.12 --with-mcrypt --with-ftp

Here I use /tmp/apache_1.3.12 as an example. You should replace it with the actual location of your Apache source. The configuration script will now go through a series of checks to see what you have installed on your system. If something the compiler will need is missing, it will let you know of your grievous error and stop abruptly with an error like:

configure: error: Please reinstall libmcrypt - I cannot find mcrypt.h

This is the configuration system's way of telling you it loves you, but you only have twenty-four hours to save the earth. That, and it couldn't find the mCrypt libraries anywhere on your system. So, go download and install any necessary libraries.

[1] [2] Next

[Bookmark][Print] [Close][To Top]
  • Prev Article-PHP:

  • Next Article-PHP:
  • Related Materias
    Scaling Dynamic Websites w
    Custom-Compiling Apache an
    Apaches eXtended Server Si
    Simplify Your Life with Ap
    Multiuser Subversion
    Single-User Subversion
    Industrial-Strength Webcas
    Managing Sessions and Stat
    Simplify PHP Development w
    Programming eBay Web Servi
    Topics
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Graphic Design Tutorial
     

    Coreldraw Tutorial

      Illustrator Tutorial
      3D Graphics Articles
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial&Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial&Articles
     

    XML Style Tutorial

      AJAX Tutorial
      XML Mobile
    Flash Tutorial&Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial&Articles
     

    Linux Tutorial

      Symbian Tutorial
      MacOS Tutorial