Lesson Weekend

To get started, let's make sure we have all the necessary software installed and configured on your computer. Fortunately for Mac and Windows users most of this work is done for us by a bundle of software called MAMP.

After that we'll be downloading a dependency management software called Composer. We'll define dependency management soon. For now let's make sure everything is in place.

MAMP

MAMP includes our necessary server and database software, and the PHP language. You may have seen variations of this term like WAMP or LAMP. Here's why:

  • L in LAMP stands for Linux, referring to the Linux-specific version of this bundle. If you have a personal machine running on Linux, you'll use LAMP instead of MAMP.

  • M in MAMP formerly stood for Mac, but the creators of MAMP later released a Windows version too. So, despite the M, it's no longer restricted to Mac only. Even if you're working on a Windows computer you'll be using MAMP in this class.

  • A stands for Apache. Apache is the most widely-used web server software available. (For more on Servers, check out the Development with a Server section from your PHP course).

  • M stands for MySQL, the database software our PHP apps will use. (For more on MySQL, revisit the Database Basics with PHP section from your PHP course).

  • P stands for PHP.

We'll use MAMP on the Epicodus computers in class. We also recommend students with both Windows and Mac machines use MAMP; and students with Linux operating systems use LAMP. The next portion of this lesson will walk through installing and configuring MAMP, and provide resources for installing LAMP on Linux. Let's get started!

Downloading & Installing MAMP on Mac and Windows

  • First, download the free version of MAMP from the MAMP Downloads Page. Both Mac OS X and Windows versions are available. You'll need to have version 4.1.0 or higher for Mac and 3.3.0 or higher for Windows)

  • Once the download is complete, launch the file.

    • For Mac: This is a.pkg file.
    • For Windows: This is an .exe file.
  • At this point, Mac installation is actually complete.

  • Windows users will be prompted with an installation wizard. The default values and settings suggested at each step are just fine (You may specify a different location for your MAMP installation, if you prefer, just remember exactly where it is; we'll need to locate our MAMP installation in the next step).

Configuring Port Numbers

Next, we need to configure Apache and MySQL to use the correct port numbers using MAMP.

  • Launch your newly-installed MAMP program.

  • A popup may appear upon first launch. If so, uncheck the option reading Check for MAMP Pro when starting MAMP (You may upgrade to MAMP Pro later, but the free version meets all requirements for our course) then click Launch MAMP.

  • When MAMP launches you will be greeted by a small window with several options. Click Preferences.

  • In the Preferences window, select the Ports tab.

  • Set the Apache Port to 8888.

  • Set the MySQL Port to 8889.

  • Click OK to save your new port configurations.