How to install Apache with PHP & mySQL


Results 1 to 3 of 3

Thread: How to install Apache with PHP & mySQL

  1. #1
    Join Date
    Jun 2000
    Location
    /home/zoist
    Posts
    358

    Thumbs up How to install Apache with PHP & mySQL

    This how to is for those who want a fresh install of Apache with mySQL & PHP on their Red Hat or Mandrake system. I never liked the default install of any of these programs, so here is the way to go about installing things........

    Step 1
    Download
    PHP
    Download
    Apache
    Download the mySQL x86 RPMs (mySQL, client & libraries) on this page

    Step 2
    Install all the mySQL RPMs using rpm -iv filename.rpm from the console/konsole.
    In this order:
    mySQL main file
    mySQL client
    mySQL devel

    Once that's all done, next step.

    Step 3
    tar xvzf <php_filename>
    tar xvzf <apache_filename>

    Doing this to both files will create directories with the files inside.

    Step 4
    cd <apache_directory>
    ./configure --prefix=/home/httpd
    cd ..


    cd <php_directory>
    ./configure --with-apache=../<apache_directory> --with-mysql --enable-track-vars
    make
    make install
    cd ..


    cd <apache_directory>
    ./configure --prefix=/home/httpd --activate-module=src/modules/php4/libphp4.a
    make
    make install


    Next, php ini stuff

    Step 5
    cd <php_directory>
    cp php.ini-dist /usr/local/lib/php.ini

    Step 6
    Add these lines to your httpd.conf file at /home/httpd/conf/httpd.conf

    AddType application/x-httpd-php .php .php3 .phtml .inc
    AddType application/x-httpd-php-source .phps


    mySQL should now be running. Type mysqladmin ping to see if it is.

    You can now start apache using /home/httpd/bin/apachectl start
    All config and executibles are in your /home/httpd directory.


    I hope this is of use to people. I never liked the Red Hat RPMs of apache and PHP
    Last edited by Zoist; 02-16-2003 at 12:59 PM.
    cat /home/zoist/.signature

  2. #2
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,307
    Looks great.... Thanks.

    If you have the time, may I suggest you submit as a possible Help File to be added to the JustLinux Help File Library.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

  3. #3
    Join Date
    Jun 2000
    Location
    /home/zoist
    Posts
    358
    I will promise to work on it. I would need to fiddle with it a bit.

    Cheers, and thanks for taking interest!
    cat /home/zoist/.signature

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •