CSCI 470
Web Science
Spring 2015

Montana Tech
Computer Science & Software Engineering



Server setup: Apache, MySQL, PHP

In this, you will complete the installation of the last three components of the LAMP stack:
Part 1: Installing Apache. In the last assignment, you setup and secured your VM. In this assignment you will be creating your own server for use during the course. Your web server will be built using the LAMP software stack consisting of Linux (operating system), Apache (web server), MySQL (database), and PHP (server-side scripting).

Install the Apache web server using Ubuntu's package management software apt-get: Try and connect to your web server using a browser by giving the url http:// followed by the IP address of your server. You'll find the browser will try for awhile and then return an error message. HTTP operates by default on port 80. Currently this port is blocked by the firewall you configured in the last assignment. Open up port 80 using the following command: Now test out the web server: Optional: By default, apache runs the web server as the username www-data and the group www-data. You can add yourself to this group and then modify the permissions of the directory and any current files: Familiarize yourself with Apache's logging:
Part 2: Setting up CGI. You need to enable CGI (Common Gateway Interface) as it is not enabled by default in Apache.
Part 3: Install MySQL. MySQL is a popular open source relational database. You will eventually be using it in some of your web applications developed for the course. Here are the installation steps:
Part 4: Install PHP. In various assignments, we will be using PHP server-side scripting. This is available as an optional Apache module. Install by following the following steps:
Part 5: Hello MySQL! You are now the proud owner of a full-fledged web application server based on the LAMP stack, exciting times!
Submission and grading. There is nothing to turn in for this assignment. But I will be testing you completed the lab by doing the following:

Page last updated: January 26, 2015