|Sunday, August 25, 2019|
|By The Voodooman||what's new | faq | about|
Apache Installation Walkthrough
I. Before you start
V. Credits N Stuff
Sub-Sections1. Uncompress Files
2. Compile MHASH
3. Compile MySQL
4. Compile DBI
5. Compile Msql/Mysql
6. Compile FreeTDS
7. Compile DBD-Sybase
8. Compile Apache/PHP
9. Install Zend Optimizer
!!! WARNING !!!
This Guide is Deprecated!Please go to the New Guide here.
Installation InstructionsThese are the installation instructions that you have to follow to install Apache/PHP with database support. Depending on what features you decide to have (such as types of database support), you can skip certain sections.
Important: It is necessary to follow the installation instructions in sequence otherwise some of the features may not work correctly. It is assumed that you know how to change directories, unzip files and use an editor under a *nix environment at this stage. It is also assumed that you've downloaded all the files to /usr/local/src.
Some of the commands that are issued in the instructions below may be unfamiliar to you. If you are not really sure what the output of certain commands look like, then click on these images below for reference. Your screen should look like something similar when you issue the respective commands.
1. Uncompress FilesIt is assumed that you've already changed directories to /usr/local/src. If you've not done so, then type:
cd /usr/local/srcProceed to uncompress all the downloaded files as follows:
2. Compile MHASH ModuleNote that you need to do this step ONLY if you want to enable MHASH support for the PHP module. If you do not use any of PHP's mhash_xx functions, then you probably don't want this module. If you have already installed Apache completely and find that you need this module at a later time, then follow this step and then from step 8 to the end.
3. Compile MySQLNote that you need to do this step ONLY if you are using MySQL as your database engine and it is not already installed for you. If you've already installed Apache completely and find that you need this module at a later time, then follow this step, step 5 and then step 8 to the end.
Note: Purists may note that the prefix specified is /usr/local/mysql instead of /usr/local. You can use /usr/local if you like, but I like to keep package specific binaries and libraries in their own specific directories (it's a personal preference).
4. Compile DBIThis is the Database Independent driver for Perl. It is a good idea to install this anyway, because it does not affect the running of Apache.
5. Compile Msql-Mysql-modulesNote that you need to do this step ONLY if you are using MySQL as your database engine and it is not already installed for you. If you are going to do this step, you should have already completed step 3 first.
6. Compile FreeTDSNote that you need to do this step ONLY if you are using SQL Server as your database engine. Here's where things get a little different between Linux and FreeBSD. Follow the necessary steps according to your OS.
FreeBSD users ONLY
Some FreeBSD systems do not have GNU make installed by default. If this is the case, you'll need to download and install gmake and gettext for FreeTDS to compile correctly. The steps to do this are as follows:
For both Linux and FreeBSD
Purists may note that the prefix specified is /usr/local/freetds instead of /usr/local. You can use /usr/local if you like, but I like to keep package specific libraries in their own specific directories (it's a personal preference).
FreeBSD users ONLY
Linux users ONLY
For Both Linux and FreeBSDIf you're using sh, bash or ksh for your shell, then type:
If you're using csh, then type:
7. Compile DBD-SybaseThis is the Sybase Driver for Perl. It is a good idea to install this anyway, if you are using SQL Server, because it does not affect the running of Apache.
8. Compile Apache/PHPHere we are.... almost at the end of our journey!
9. Installing the Zend OptimizerThis is an optional step that is recommended, because the Zend Optimizer makes the PHP code run so much smoother when it is installed. To install the optimizer, do the following:
If you installed apache above with --prefix=/usr/local instead of --prefix=/usr/local/apache, then you would be copying to /usr/local/libexec of course.
Next, create a file called php.ini in the directory /usr/local/lib using your favourite text editor. Add the following lines into it (adjusting your paths as necessary):
zend_optimizer.optimization_level = 15 zend_extension = "/usr/local/apache/libexec/ZendOptimizer.so" zend_loader.enable = Off ; Compress output for .gz compliant browsers output_handler = ob_gzhandler ; allow ASP-style <% %> tags asp_tags = Off ; number of significant digits displayed in floating point numbers precision = 14 ; Whether to be year 2000 compliant ;(will cause problems with non y2k compliant browsers) y2k_compliance = Off ; Implicit flush tells PHP to tell the output layer to flush itself implicit_flush = Off ; Decides whether PHP may expose the fact that it is installed on ; in the HTTP header reply expose_php = Off ; Maximum execution time of each script, in seconds max_execution_time = 30 ; Maximum amount of memory a script may consume (8MB) ;memory_limit = 8M sybase.interface_file = "/usr/local/freetds/interfaces" ;error_reporting = E_ALL ;display_errors = OnYou may wish to adjust some of the parameters such as max_execution_time, precision etc. to your own requirements. Notice that some of the options (memory_limit, error_reporting, display_errors) are commented out. These options may be enabled for debugging and removed when you move the code into production. Feel free to experiment with the settings for your own optimal needs.
Reinstalling FeaturesLet's say you've installed apache completely and you wish to add or subtract something (let's say you want to enable the MHASH module and enable Image Mapping on Apache). It's pretty simple -- all you have to do is to repeat the steps from the module downwards (in this case Step 2). Don't forget that if something has already been compiled, then do a make clean before you type make at every stage. In this case, you'll need to do a make clean while recompiling apache in step 8.
|<<Previous: Downloads||^Up to Mayukh's World^||Next: Configuration >>|
Apache Installation Walkthrough
Last updated 12/25/2001