Developing the Modern Web 2

Assignment 3

In this assignment you will be using a Raspberry Pi computer to build and configure a LAMP server to enable you to host and run your own website.

Submission date: 5th February 2014

Grade: this assignment will be marked out of 25

Grade contribution: this contributes 25% towards your final grade

Grading Criteria

All five assignments that form part of this module will contain 5 parts, each marked out of 5. The following criteria will be applied.

Marks / Criteria
1 / An attempt has been made but has not been successful either through misunderstandings or not doing most of the work.
2 / The task has been attempted but not all the aspects have been completed, or the work has been done in a very superficial manner). There are some errors in the work.
3 / The work has met the requirements set down in the task but may contain some minor errors. No additional work has been done.
4 / The required tasks have been completed with no errors and an attempt has been made to do additional work, however the final result is not of a professional standard.
5 / All the required tasks have been completed to a professional standard and additional work has been included. There are no errors in the work.

Coursework Submission Requirements

You are required to upload the following files to the CU Moodle course page. Please note that paper-based submissions are NOT ACCEPTABLE and will not be marked.

  1. aPDF copy of this document (minus this page)
  2. The SD card to be submitted on lab.

Please take note of the file formats required. If you submit your work in other formats it will not be marked and you may receive a 0% grade.

205CDE

Assignment 5 / 5

LAMP Server

your name here

1 - Installing the Linux Operating System

This first task requires you to install and configure a Linux Server on a Raspberry Pi computer.

Task 1

Your first task is to download a copy of the Minibian Linux distro and install it on your SD card. Paste in screenshots showing the process you went through to achieve this.

Task 2

For your second task you need to configure your server to use a static IP address. When you have done this, run the server ‘headless’ and log in using SSH. Once logged in, ping to prove your network setting are correct.

Paste in the contents of your interfaces configuration file.

Paste in the text from your SSH session showing that your server has full internet connectivity.

Task 3

The next task is to install a number of packages to show that you can use the APT tools. You are required to use the APT tools to update the currently installed packages then install: tree, lynx and sudo.

Paste in the commands you used and the responses. This should be copied from the SSH client window, not added as a screenshot.

Task 4

For the final task you are required to create a normal user account and assign it sudo privileges. You should then log in using this account and use it to create a further normal user account. Both accounts should have their own documents directory.

Paste in the commands used together with the system responses.

Extension Activities

For your extension task, create a new group called webeditors, assign both your users to this. Create another documents directory and give any member of webeditors read/write permissions.

2 - Installing and Configuring MySQL

Once you have installed the Linux server you need to install and configure a MySQL database. You will then port over the database schema and data from your creative server account. All these tasks must be completed over a SSH connection (with the server running ‘headless’).

Task 1

The first task is to use the APT tools to install the MySQL server. Configure the server to allow 10 concurrent connections with a timeout of 1 minute. The server should be able to accept connections from external computers.

Paste in the modified configuration file.

Task 2

Create a MySQL user called editor with permissions to add and delete tables as well as perform the standard CRUD operations. The account should be accessible from computers with an internal IP address only.

Paste in the commands you used to achieve this together with any responses you got from the server.

Task 3

Use the MySQL Workbench software to connect to your database using the editor account. Use the software to create the database schema that you used for your previous assignment.

Task 4

Back up your database from the creative server and import the data into your new database.

Extension Activities

Often your database will need to be available to other servers on the network. For your extension task, work with a second Raspberry Pi and create another account to allow the servers to read each others databases in as secure a manner as you can.

Explain how you achieved this, including any commands you used.

3 - Installing and Configuring an Apache Web Server

For your third task you must install and configure an Apache server on your Raspberry Pi so that your dynamic website can be served from it.

Task 1

Install the packages needed to create an Apache web server.

Paste in the commands you used together with a screenshot showing the default home page in your web browser.

Task 2

Zip up your jquery website on the creative server and transfer this file to your new server. Unzip it and test it to make sure it displays correctly in the web browser.

Paste in any commands you used together with a screenshot showing your website working on the new server.

Task 3

Zip up your RESTful API and transfer it to the new server. Edit the code so it runs off your MySQL database. Test it to make sure it works correctly.

Paste in any commands you used together with a screenshot showing your website working on the new server.

Task 4

Modify your Apache server configuration to give all users their own web server space in a similar manner to the creative server.

Paste in any commands you used together with any changes to config files.

Extension Activities

For your extension task you are required to attempt an advanced Apache topic. This might be to set up an SSL certificate to serve secure web pages over https, or you might have a go at setting up virtual hosts. Whatever you do, make sure you explain how you achieved it and provide evidence of it working correctly.

4 - Building a File Server

For this fourth task you are required to add FTP functionality to allow files to be upload as well as mounting the web root folder as a network drive on your computer.

Task 1

Install the packages required to set up an FTP server on your Raspberry Pi. Configure to to allow you to connect to the web root folder using your normal user account (not root).

Task 2

Use an FTP client to connect to the server and demonstrate you can upload and download files.

Include screenshots that show you can add and remove files.

Task 3

Modify your FTP configuration so that each user is directed to their own home folder when they log in.

Task 4

Finally restrict FTP access to computers on the internal network.

Paste in any commands you used together with any changes to config files.

Extension Activities

For this final extension task you are required to configure the web root directory as a network drive. You should then demonstrate that this works by mounting the drive on your computer and using this to add additional files to the web server. You should also provide network access to allow each user to add files to their own personal web space.

Paste any commands you used plus screenshots showing the drive mounted on your computer. Finally show how you can transfer files to and from the server.

5 - Building a GIT Server

For your final task you are required to create a GIT server on your Raspberry Pi. This will enable you to host your project files and provides you with automatic backup, the ability to work on multiple computers and complete version control.

Task 1

Install the packages required to set up a GIT server on your Raspberry Pi. Create a git user account, specify a document root and configure this account to access it.

Paste in the commands you used to achieve this.

Task 2

Now create a working area on your local computer, add files from one of your projects and use this to create a new repository on the server.

Paste in the commands you used (and screenshots if necessary) to show how you achieved this.

Task 3

Check out your code on a different computer (or a second folder on your original machine). Make some changes and commit these back to the server.

Paste in the commands you used (and screenshots if necessary) to show how you achieved this.

Task 4

For the final task create a public release milestone (so that anyone can download it without a username or password).

Paste in any commands you used together with any changes to config files.

Extension Activities

We have only touched on the features available on GIT. For your extension task you are required to fully explore the more advanced features, keeping a careful record of what you did and how you achieved it. e.g. branching models, tagging, restricted and unlimited push permissions

LAMP Server / {Your Name Here}