Apache/PHP and other UNIX tools

Discussion in 'macOS' started by Gary King, Jun 7, 2005.

  1. Gary King macrumors 6502

    Joined:
    Jun 14, 2004
    #1
    I hear that the Mac has a ton of UNIX tools pre-installed, like Apache, and PHP (I know MySQL isn't, but I can install that. I installed WAMP myself.)

    Is this true? Where can I find these? How do I enable them? Also, where do I go for the command prompt in Mac? I'll go to the nearest Apple Store to try these out when I get my hands on one of them over there - or if my own Mac ships here in time :)
     
  2. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #2
    OS X Server has Apache installed; the regular version doesn't (at least I don't see it). PHP is in /usr/bin, as you'd expect in most any *nix.

    Now, I'm sure you can install and build Apache yourself. For that matter there are likely pre-packaged versions out there. If you're used to building apps on x86 there may be a few curves you'll have to master, but OS X has automake/autoconf so it's pretty much the same process you're used to.

    To get to the command line you just run Terminal. I prefer iTerm myself, because I like tabs.
     
  3. rasp macrumors regular

    rasp

    Joined:
    Jan 13, 2005
    Location:
    Easthampton, MA
    #3
    apache is installed by default, just not on. if you go to sharing, and enable personal web sharing, apache starts.

    To enable php, edit /etc/httpd/httpd.conf and uncomment the 2 lines

    LoadModule php4_module libexec/httpd/libphp4.so
    AddModule mod_php4.c

    (on second thought, edit httpd.conf first, then enable apache, to be sure for the changes to take)

    mysql is not installed.

    Edit: Version Info. Apache/1.3.33 (Darwin) PHP/4.3.10
     
  4. jestershinra macrumors regular

    Joined:
    Sep 4, 2004
    #4
    Nope, client has Apache too. WWWroot: /Library/Webserver/Documents/

    PHP must be installed manually, along with MySQL.
     
  5. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #5
    Oh that's weird - I had done "locate httpd" from the command line and got nothing back. But there it is - /usr/sbin/httpd (found it by looking through apachectl).
     

Share This Page