Run MAMP from thumb drive?

Discussion in 'Mac Programming' started by cprevost, Sep 1, 2011.

  1. cprevost macrumors newbie

    Sep 17, 2010
    So far my research has hit a lot of dead ends. I'm teaching a basic web class this year and was interested in having students run a web server from a thumb drive. This would make things MUCH easier for me. Haven't found any usable documentation on how to do this. I was hoping we could run MAMP from a thumb drive but seem to find nothing on how to do this on a Mac. We had students doing this last year on PC's and it worked well. Anyone have any resources on running a web server from a thumb drive on a Mac?
  2. And1ss macrumors 6502a


    Oct 20, 2009
    You could use XAMP and run a web server directly on the machine itself. Is there a particular reason why you want to run it on a usb vs. on the machine?
  3. Hansr, Sep 2, 2011
    Last edited: Sep 2, 2011

    Hansr macrumors 6502a

    Apr 1, 2007
    I'd assume so they can do work at home too without having to set up access to a server for them.

    But then again setting up a remote server for all of them isn't rocket science.

    If you want to go with the thump drive I don't think there is any reason why it shouldn't be easy, it most likely needs a small shell script to sync the prefs though but that's about it.
  4. cprevost thread starter macrumors newbie

    Sep 17, 2010
    Thanks. Students need admin access to run MAMP. I have to run around the room and authenticate every time they start the program. I was hoping that there would be a way on the Mac to run MAMP from a thumb drive like Windows users can. Haven't found anything useful in my research so far....
  5. Hansr macrumors 6502a

    Apr 1, 2007
    Tried e-mailing the team behind MAMP? It's most likely because it's binding to the IP. But binding might be possible if it's not on port 80.
  6. chown33 macrumors 604

    Aug 9, 2009

    OP, please describe how your students are launching MAMP now. Is it a command-line? A double-clickable app?

    How is MAMP configured? If it's using port 80, then there's no way to avoid the need for admin authentication. All ports below 1024 require root access on Posix systems, so even if you had MAMP on a thumb drive, it would still need admin auth if it's configured to run on port 80. The conventional unprivileged port number for HTTP is 8080, so if MAMP is configured for that port, then no admin auth is needed.

    Apache's config file is easily changed to use a different port. Google search terms: apache port 8080.
    Top hit:

    I'm assuming the firewall on the Macs is already configured to allow listening on port 8080. Otherwise you'd have to configure that, too, and again, that requires admin access.
  7. cprevost thread starter macrumors newbie

    Sep 17, 2010
    Thanks, have it partially working by changing the port so that I'm not using port 80. It still asks for admin credentials when we launch the app but if we hit cancel 2 times it seems to turn on the server and mysql anyway. There is an issue with shutting the servers down though. If you shut the servers off mysql won't start back up again without restarting the computer. May have to just deal with it and use it anyway. Haven't found a better solution so far.
  8. chown33 macrumors 604

    Aug 9, 2009
    Well, if you want any suggestions, you'll have to post the actual shell script or whatever that starts and stops things. The Apache config file might also be needed. I've never been able to debug any program just from a brief description of its behavior.
  9. robvas macrumors 68020

    Mar 29, 2009
    Set them all up on a server with their own homedirs?

Share This Page