From sudo apt-get install

Discussion in 'macOS' started by amtec, Jun 13, 2011.

  1. amtec macrumors newbie

    May 20, 2010
    Trivandrum, India

    I just bought a Mac Book Pro and Im a complete newbie to OSX.
    Im using Ubuntu on my desktop and am used to
    sudo apt-get install <package>

    Is there something like this for OSX ?
    I want to install & configure Apache, PHP and MySQL
  2. Phil A. Moderator

    Phil A.

    Staff Member

    Apr 2, 2006
    Shropshire, UK
    There is no equivalent to apt-get on OSX: Installs are generally graphically based and you need to download the installers from the web.

    PHP and Apache 2 are already included in OSX out of the box. Apache 2 is turned on and off using the "sharing" system preference (turn on Web Sharing). The config file for Apache is located in /etc/apache2/httpd.conf (turn web sharing off and back on to apply changes). By default, apache isn't configured to include the php or fast-cgi modules, but the configs are present (and commented out) in the httpd.conf file so configuring them is trivial

    To install MySQL, simply download and run the OS X installer from here:

    OS X makes a very capable alternative to the LAMP platform and once you get used to the differences, you should be pretty comfortable coming from a Linux background
  3. maflynn Moderator


    Staff Member

    May 3, 2009
    The closest thing you'll get to apt-get is apple's app store. Its not command line like apt-get (but then ubuntu has been moving people away from the CLI and apt-get anyways) and it allows you to download and install applications.
  4. sudoash macrumors member

    Jun 12, 2011
    Have a look at MacPorts and/or Homebrew. Both offer a command-line utility that you'll probably get familiar with fairly quickly.

Share This Page