MAMP/LAMP/etc...help?

Discussion in 'Web Design and Development' started by fig, Mar 11, 2013.

  1. fig
    macrumors 6502a

    Joined:
    Jun 13, 2012
    Location:
    Houston, TX
    #1
    Ok devs, I've been generally setting up my WordPress sites on the server then redeploying them to the ACTUAL server when the site goes live and...yeah, that's just a terrible way to do it.

    From my looking around and a discussion or two on here it sounds like installing MAMP on my home machine and developing there is the best way to go, unless there's some better options I don't know about? Any recommendations or advice greatly appreciated, thanks.
     
  2. macrumors 68030

    jared_kipe

    Joined:
    Dec 8, 2003
    Location:
    Seattle
    #2
    What kind of recommendations are you looking for? If you know how to setup a linux server for deploying MySQL/PHP applications, then MAMP is going to be very easy.

    General advice. Use GIT to manage your local codebase so that when you want to deploy, all you have to do is push to the actual server.
     
  3. fig
    thread starter macrumors 6502a

    Joined:
    Jun 13, 2012
    Location:
    Houston, TX
    #3
    Thanks, and as I don't know the first thing about setting up a server I'm looking for whatever sort of advice I can get.

    I'm a designer with some minimal backend skills (a bit of jQuery and php manipulation with WordPress) so anything server related is pretty new to me, I do one-click installs for my typical WordPress sites. From what I've found in some searching MAMP or something similar is my best option for hosting my WordPress site on my box for development, but that pretty much sums up my knowledge on the subject :)
     
  4. macrumors newbie

    Joined:
    Mar 25, 2010
    #4
  5. fig
    thread starter macrumors 6502a

    Joined:
    Jun 13, 2012
    Location:
    Houston, TX
    #5
    Sounds like MAMP is at least effective then, good to know. Thanks.
     
  6. macrumors newbie

    Joined:
    Mar 25, 2010
    #6
    It does the job and is easy to use but I'm getting annoyed by having to type in my admin password every time I start or stop the servers.
     
  7. macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #7
    http://www.46palermo.com/blog/run-mamp-without-password-easy-way/

    That's due to lack of Keychain support. Read the blog and also all the comments in that blog, some folks posted better solutions than the original blogger, i.e. Justin Sternberger's rather cool solution.
     
  8. macrumors 6502

    marsmissions

    Joined:
    Jan 5, 2010
    Location:
    Washington, US
    #8
    Or just don't run it on port 80. 8080 shouldn't require a password and the change won't matter.
     
  9. macrumors newbie

    Joined:
    Mar 25, 2010
    #9
    I prefer to use port 80, so I've adapted some of the code from the link above and cobbled together this applescript which launches the MAMP app and then starts Apache and MySQL. If the script is run again after MAMP has been loaded, it stops the server and quits the app.

    For my use I've exported it from the AppleScript editor as an application.

    You must also have used Keychain Access to add an item named MAMP to the login keychain with your admin username and password, as mentioned in the article.

    Code:
    set theUserName to do shell script ("security  find-generic-password -gl MAMP | grep \"acct\" | cut -c 19-99 | sed 's/\"//g'")
    set thePassword to do shell script ("security 2>&1 >/dev/null find-generic-password -gl MAMP | cut -c 11-99 | sed 's/\"//g'")
    
    tell application "System Events"
    	if (exists (process "MAMP")) then
    		
    		do shell script "/Applications/MAMP/bin/stopApache.sh &" password thePassword user name theUserName with administrator privileges
    		do shell script "/Applications/MAMP/bin/stopMysql.sh > /dev/null 2>&1"
    		
    		tell application "MAMP" to quit
    		
    	else
    		
    		tell application "MAMP" to activate
    		set frontmost of process "MAMP" to true
    		
    		do shell script "/Applications/MAMP/bin/startApache.sh &" password thePassword user name theUserName with administrator privileges
    		do shell script "/Applications/MAMP/bin/startMysql.sh > /dev/null 2>&1"
    		
    	end if
    end tell
    
     
  10. macrumors member

    Joined:
    Apr 12, 2011
    Location:
    Athens, OH
    #10
  11. macrumors member

    Joined:
    Jun 24, 2012
    Location:
    Metro Detroit
    #11
    I prefer using homebrew for my local dev for PHP5.4, MySQL5.6.1 and a few other handful of awesome tool. I just use Apples built in Apache as it does what I need. The one GUI I do use is called VirtualHostX, but that's mostly due to hating to deal with my vhost and host files.

    You can use VHX with mamp to if that is your preference. Far as WP local I'd recommend setting up a vhost as dealing with http://localhost/~User will cause issues at some. The other app I use when dealing with MySQL is Sequel Pro. Good luck!
     
  12. fig
    thread starter macrumors 6502a

    Joined:
    Jun 13, 2012
    Location:
    Houston, TX
    #12
    Super helpful, thanks.

    and I'll check out homebrew too, appreciate the recommendation.
     

Share This Page