Re: FBSD 5.2.1, Apache 2, PHP

From: Matthew Seaman (m.seaman_at_infracaninophile.co.uk)
Date: 09/18/04

  • Next message: Hugo Silva: "Re: pf not logging on 5.3-BETA3 ? [more info]"
    Date: Sat, 18 Sep 2004 19:57:36 +0100
    To: steveb99 <steveb99@earthlink.net>
    
    
    

    On Sat, Sep 18, 2004 at 09:43:33AM -0700, steveb99 wrote:
    >
    > I keep looking for a how-to or other information on setting up FreeBSD
    > 5.2.1, Apache 2, PHP, and MySQL, but not finding much. I do find
    > things using Apache 1.3, but not 2. I want to have a setup similar to
    > what I develop on at work, but work is using Linux.
    >
    > Is this a workable configuration on FreeBSD? If so can someone point
    > me to some FAQ, how-to, notes, comments, etc.

    Works for me, except I'm running 4.10 rather than 5.2.1. Installing
    all that stuff via ports is the way to go -- it's pretty easy really,
    which might explain the relative paucity of anyone writing up how-tos.

    Here's a handy tip. You can control what versions of apache, PHP and
    MySQL are installed by setting some make(1) variables. First, make
    sure that your ports tree is up to date using cvsup(1).

    To set the variables for make(1) to use, there are quite a few
    options, but the simplest and most effective is to add the settings to
    /etc/make.conf. You'll want to add:

        WITH_APACHE2= yes
        WITH_MYSQL_VER= 40 # Choose from 323, 40, 41 or 50
        DEFAULT_PHP_VER= 4 # Choose from 4 or 5
        WANT_PHP_MOD= yes # Want mod_php{4,5} (*)

    Other stuff you might want to set:

        WANT_PHP_CLI= yes # Install command line version of PHP (*)
        WANT_PHP_PEAR= yes # If you want the PEAR framework (*)

    The three settings marked (*) are really only meant to be used by port
    maintainers. However there as there aren't any handy user oriented
    ways of choosing those settings, you've got to bend the rules a bit.
    Also not that quite a lot of PHP software available from the 'net does
    not yet work with PHP5.

    You can combine WANT_PHP_CLI and WANT_PHP_MOD -- see
    /usr/ports/Mk/bsd.php.mk for a number of other variables you can set
    to achive other PHP configurations. Beware though -- some of those
    settings are mutually incompatible.

    Now, you should be able to install apache2 etc. by utilising the
    dependencies built into the ports system:

        # cd /usr/ports/databases/php4-mysql (or php5-mysql)
        # make install

    That will install the MySQL client-side software as one of the
    dependencies, along with apache2 and mod_php4. If you want to install
    the MySQL server as well, then do:

        # cd /usr/ports/databases/mysql40-server
        # make install

    All of the php extensions are not installed as separate ports -- use
    the lang/php{4,5}-extensions port to select and install exactly what
    extensions you want. (Hint: almost everything wants the pcre
    extension) See ports(7) for the explanation of the 'make configure',
    'make showconfig' and 'make rmconfig' commands.

    Now, you will need to add the correct variables to /etc/rc.conf to get
    those servers started up at system boot (see the scripts installed
    into /usr/local/etc/rc.d for instructions), and you'll have to edit
    the configuration files for apache and MySQL along with installing web
    and database content.

            Cheers,

            Matthew

    -- 
    Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                          Savill Way
    PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
    Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
    
    


    • application/pgp-signature attachment: stored

  • Next message: Hugo Silva: "Re: pf not logging on 5.3-BETA3 ? [more info]"

    Relevant Pages

    • Re: mysql - kern.maxfiles limit exceeded by uid 500 please see tuning(7)
      ... MySQL 4.1.x I can't speak to 5.x, even though I do want to look into it ... One thing you may wish to consider is upgrading the OS. ... At least upgrade your ports tree. ... Since the standard install will put these ...
      (comp.unix.bsd.freebsd.misc)
    • [RESOLVED] DBD::mysql unresolved symbol _intel_fast_memcpy & mysql-standard-5.0.22-l
      ... Some of you may have wanted to build and install the DBD::mysql ... Mysql**, "...the MySQL Community Server compiled with the Intel CC ... Server compiled with the Intel CC compiler exhibit faster performance ... I will use the following settings for compiling and testing: ...
      (comp.lang.perl.modules)
    • Problem building x11/libgnome on 4.10 (sorry for double post)
      ... Just cvsup:ed ports, ran portsclean -C then trying to build x11/libgnome ... nonstandard optimization settings to "-O" before submitting bug reports # to ... # To build the OpenSSL manpages, uncomment the following. ... # Override "don't install a port that's already installed" behavior. ...
      (freebsd-questions)
    • Re: Creating directories on Vista machines using .NET
      ... One thing that the Access database does is maintain settings relating to the ... dialog box asking which account to run the install under. ... even if I run the install using administrator rights, ...
      (microsoft.public.dotnet.framework)
    • Re: Going about a fresh reinstall
      ... Copy this folder to ... specific programs' settings. ... >the install. ... >those you don't have a clue how you'll restore later. ...
      (microsoft.public.windowsxp.moviemaker)