Apache Installation Tips for PHP, SQL Server, MySQL on FreeBSD, Linux, OpenBSD, NetBSD Logo Tuesday, December 05, 2023
By The Voodooman what's new | faq | about

Before You Start

The first thing to do before you start the installation process is to decide what sort of configuration you are going to have for this web-server. The modules that you are definitely going to install are:
  • Apache
  • PHP
  • The parts that you are going to have to decide about are:

  • Database Engine: Are you going to use MySQL or SQL Server or both.
  • Apache Options: Are you going to enable features such as Image maps, CGI scripts etc.
  • Optimizer Options: Are you going to use the Zend Optimizer or not. The Zend Optimizer enables PHP code to run much faster on your webserver. Do you wish to use mod_gzip module or not. The mod_gzip module enables the webserver to send compressed output to browsers that can receive them, thereby cutting down your bandwidth costs.
  • DSO Support or Static Binary: See notes at the bottom of this page for what the different options are.
  • Note that these features can be added on later if you want to do so. However, you might need to repeat certain steps of the Installation procedure to enable these features.

    In practise, the author generally employs the following feature set. Your set of requirements may be similar as well:

  • Database Engine: SQL Server
  • Apache Module options:
    Image Maps: Off
    Actions: Off
    Aliases: Off
    Asis: Off
    Authentication: Off
    CGI Support: Off
    Server Side Includes: Off
  • PHP Module options:
    MySQL support: Off
    Mhash support: On
    SQL Server support: On
    Apache module: On (naturally!)
    GD (dynamic graphics library): Off
    Java module: Off
    Versioning: On
    XML support: Off
    Debugging mode: Off
    Sessions: Off
  • Perl Support for Database Engine: Yes for SQL Server.
  • Zend Optimizer: Yes
  • mod_gzip: Yes

  • This guide will go through setting up Apache with the above modules compiled statically as part of the apache binary. The advantage of this is that the binary has everything it needs and there's no need for additional libraries. This enables it to run slightly faster as well. The disadvantage of using this approach is that you cannot add new modules on the fly, without recompiling apache. Say, sometimes people may want to turn on features such as image maps at a later stage. In this case, it is necessary is to recompile the apache binary to include the necessary module. If you compile apache with DSO library support, then you can add/remove new modules by just modifying a few lines to the configuration file. However, the webserver will run slightly slower. Normally, people don't add and remove modules that often, so I've settled for compiling everything statically into apache instead of providing DSO support. If you want to add DSO support to apache, check out the apache website for this.

    <<Previous: Introduction ^Up to Mayukh's World^ Next: Downloads >>

    Apache Installation Walkthrough
    Last updated 08/01/2003