Your Ad Here Your Ad Here
Results 1 to 2 of 2

Thread: Apache Mysql And Php4 Linux

  1. #1
    shn's Avatar Ð3ƒμ|\|(7
    Join Date
    May 2003
    Posts
    3,585
    I have a fairly easy way to install lamp or Apache, MySQL and PHP on a Linux box. If you are one that likes to use Perl or Python for P instead of PHP, then tuff because this one is for PHP : )

    The Apache Toolbox will make installation a breeze. Also, I will be adding Frontpage 2002 Extensions at my discretion . You are welcome to select any other modules you want. To be quite frank I might even select some other modules later on other than the ones listed above. To learn more about the Apache Toolbox click here
    It's basically a menu driven app that let's you compile Apache and lots of other mods,plus MySQL database server..

    First off log in as root. No sudo here. Remember this is the quick and easy way.

    Download Apache Toolbox from this site The version used for this is 1.5.69 Yours may differ but just replace the version number in all the commands in accordance with yours. Or from command line:
    Code:
    wget http://heanet.dl.sourceforge.net/sourceforge/apachetoolbox/Apachetoolbox-install-1.5.69.tar.gz
    Assuming you have downloaded the toolbox in any directory just make sure you are in that directory when you launch the commands from the console.

    This was tested on Red Hat Enterprise Linux WS. For the most part it should work on any Linux box.
    run the following commands from the console;
    Code:
    tar -zxvf Apachetoolbox-install-1.5.69.tar.gz
    This will create a directory called Apachetoolbox-1.5.69
    now change into the directory.
    Code:
    cd Apachetoolbox-1.5.69/
    run the folling command:
    Code:
    ./install.sh

    Now the Apache Toolbox Menu will appear. You can select any module you want. But for this I will be using the ones mentioned above.

    Now we will select PHP menu. To do that type “php” next to [?] and press Enter. You will get the PHP sub menu.
    To select your choice, press the number and then press Enter. You will see a “+” sign will be added next to your choice. In this example, 1, 2 and 8 are selected. Type “go” next to [?] and press Enter to go back to the Main menu.


    Now we will add Frontpage 2002 support. Type 9 next to [?] from the main menu and press Enter. And since I feel like it I am going to add Mod Bandwidth and Mod GZIP. Do the same above with any other modules.
    Type the number next to [?] and then press enter and a “+” should appear next to the modules you want.

    Then type "go" to return to the main menu again. Now we will add MySQL to the installation. Type 2 next to [?] and press Enter. Type 1 next to [?] and press Enter.
    The menu for MySQL will appear and you can select the paths and anything from the menu. Just enter the number next to [?] and press Enter.
    Then be sure to Enable MySQL in the menu there should be a “+” beside it. I choose to leave mine at the defualt paths. You can change that at your discretion or leave it as it is.

    Keep typing “go” next to [?] until you return to the main menu again. Then if everything looks ok we will proceed to install.
    Note: Make sure you have the version of php that you want. There are various versions to choose from. You might have a problem downloading other versions. The installer had no problem downloading version php-4.3.4. So for now I would recommend that version.

    Once at the main menu type “go” to start the installation. The install will attempt to detect apache and the modules in the install directory but will fail and ask you if you want to download them.
    Just enter “y” for yes for every module you need to download and it will retrieve the files and check them for corruption. So keep the modules to a minimum if necessary because the installer will need to download them.
    It may take a while to for the installer to configure and compile MySQL. Be patient.
    At some stages you will be ask if you want to edit configuration scripts. I choose "n for no since I will be configuring them manually after a succesful install. You can accept the default config scripts as well, or edit them right there. The choice is yours.

    If there were no errors you may now enter the following command:
    Code:
    cd apache_1.3.29;make
    Then run:
    Code:
    make install
    After a succesful install you will get this:
    Code:
    +--------------------------------------------------------+
    | You now have successfully built and installed the      |
    | Apache 1.3 HTTP server. To verify that Apache actually |
    | works correctly you now should first check the         |
    | (initially created or preserved) configuration files   |
    |                                                        |
    |   /usr/local/apache/conf/httpd.conf
    |                                                        |
    | and then you should be able to immediately fire up     |
    | Apache the first time by running:                      |
    |                                                        |
    |   /usr/local/apache/bin/apachectl start
    
    |                                                        |
    | Or when you want to run it with SSL enabled use:       |
    |                                                        |
    |   /usr/local/apache/bin/apachectl startssl
    |                                                        |
    | Thanks for using Apache.       The Apache Group        |
    |                                http://www.apache.org/  |
    +--------------------------------------------------------+
    To check if your configuration is correct type the following from the console:
    Code:
    /usr/local/apache/bin/apachectl configtest
    The output should read “Syntax OK”
    If you want to edit your config file type:
    Code:
    vi /usr/local/apache/conf/httpd.conf
    Editing your config file is not necessary just yet especially if you do not want to use vi. I used vi because this box does not have a gui and it is easier for me to use vi.

    Now go to http://localhost
    If you get a web page saying it is installed then it was succesful.

    Remember you can start apache by giving the command:
    Code:
    /usr/local/apache/bin/apachectl start
    And you can stop it with:
    Code:
    /usr/local/apache/bin/apachectl stop
    To test your MySQL installation enter the following command:
    Code:
    /usr/local/mysql/bin/mysql
    To have MySQL start up as boot enter the following commands and DO NOT USE "#":
    Code:
    #cd Apachetoolbox-1.5.69/src/mysql-4.0.16
    #cp support-files/mysql.server /etc/init.d/mysql 
    #cd /etc/rc3.d
    #ln -s ../init.d/mysql S85mysql
    #ln -s ../init.d/mysql K85mysql
    #cd /etc/rc5.d 
    #ln -s ../init.d/mysql S85mysql
    #ln -s ../init.d/mysql K85mysql
    #cd ../init.d
    #chmod 755 mysql
    Done, now MySQL will start up at boot
    If you want apache to start at boot type the following and DO NOT USE "#"
    Code:
    #cd /usr/local/apache/bin
    #cp apachectl /etc/init.d/httpd 
    #cd /etc/rc3.d 
    #ln -s ../init.d/httpd S85httpd 
    #ln -s ../init.d/httpd K85httpd
    #cd /etc/rc5.d
    #ln -s ../init.d/httpd S85httpd
    #ln -s ../init.d/httpd K85httpd
    There, now apache will start up at boot along with MySQL. For easier MySQL administration I recommend PhpMyAdmin



    This installation will work in a production enviorment. However, it is strongly recommended for security purposes that you edit all default configuration files manually. I nor anyone affiliated with me is responsible for any undesired results.



    You can use and distribute this as you wish but you may not alter it.

    All logos and trademarks are property of their respective owners.
    Everything else by shn

  2. Software & Hardware   -   #2
    Poster
    Join Date
    Jan 2003
    Posts
    908
    Good job

Bookmarks

Posting Permissions

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