MAMP tutorial, second set of eyes

Ryan Schmidt ryandesign at macports.org
Mon Jan 4 16:00:22 PST 2010


On Jan 4, 2010, at 17:16, Scott Haneda wrote:

> Since I updated to snow, that meant a new MAMP install, along with all my other ports.  I decided, no better time to document the process.
> 
> http://dl.dropbox.com/u/340087/drops/01.04.10/mamp/mamp-tutorial.html

Sorry, I haven't had time to read it yet, but just wanted to quickly say...


> I am doing things a little different than the MAMP page for MP state to do, though I explain my reasons.  For example, I am not sure why phpmyadmin is getting into /opt/local/www unless it is for preparation for htdocs going away one day when Apache 2's layout gets worked on.

The htdocs directory might get moved and/or renamed but can't go away because there needs to be a directory for the document root and /opt/local/www is too general to be it; the doc root needs to be a subdirectory of www. A properly-designed web app should not go directly into the doc root; a properly-designed web app should contain a directory which should be served directly by the web server and a bunch of other directories for classes and libraries which the web server should never ever be able to see directly. For such web apps, it would be appropriate to install them elsewhere (/opt/local/www directly, like phpmyadmin and some other ports now do, or better yet /opt/local/www/apps or something) and install a symlink to their docrootable directory in the actual docroot. phpmyadmin and many other webapp ports that we have *are* designed to go directly into the docroot so for them it doesn't much matter, but I like the idea of all web apps installing into the same place (e.g. /opt/local/www/apps). Months ago I touched a couple web app ports to change the install directory from /opt/local/www/htdocs to /opt/local/www but then I stopped because I wasn't sure I liked that and there were so many ports and each port had so many things wrong with it and hadn't been touched in ages and I couldn't decide what directory I wanted them to go in anyway.


> I certainly ran into a few gotcha's here and there that I believe a new to MacPorts uses is going to hit.  I also think MAMP is one of the most attractive reasons a user is going to come along to MacPorts so it should be presented as good as possible.
> 
> I do not know how well this will incorporate into the wiki, I just wrote it in html, and I also took some liberties to make it rather verbose.  The wiki may not be a good home for it.
> 
> Looking for suggestions, pointers, and recommendations on what to do with it, aside from "shove it into a blog and let google have it's way with it".
> 
> All in all, it took about 2 days two write up, and certainly could use a second set of eyes, and ideally, someone willing to move /opt/local aside and make MP think it is a new install. They could then follow these steps and see how it all works out for them.
> 
> Thanks for any comments.  Look forward to hearing any feedback.  

I would not recommend adding your document to the wiki as a new page, since as you know we already have a MAMP howto in the wiki. I would rather see the existing document improved or (if appropriate) replaced than have two competing documents. Having multiple competing documents for a given topic is a recurring problem in MacPorts documentation and I would like to avoid further exacerbating it.

Actually I would prefer separate documentation for each piece of software. I have referred a number of MySQL users to the MAMP document for setup information, who then expressed the opinion that they would never have thought to look in a document titled "MAMP" when all they wanted to know was how to set up MySQL. We can still have a MAMP page, but it would simply become a set of pointers to the Apache, MySQL and PHP setup pages. I would probably delete most of the phpMyAdmin setup information and refer users instead to the existing phpMyAdmin documentation on their web site.


> Should I maybe cross post this to dev?

No, I expect everyone who reads dev also reads users. Anyway, this is a "how to use MacPorts" question and clearly in the charter for the users list.




More information about the macports-users mailing list