Environment


Overview

For the course project, we will mimic industry-standard software develop practices but maintaining two copies of the project: development and production. The development environment is a work-in-progress version of the project that you will continually update. You will test and create your project code here. Once finished, with a fix or milestone, you will move your code to the production environment.

The production environment should always contain a working version of your project. It is where the "users" or "customers" will use (and test) your project. This means the users will be isolated from your small changes and mistakes. You will be creating and testing on your development environment, while they will interacting with your production system.

This split is necessary - imagine if the engineers at Amazon.com where modifying the site's code while you are shopping on it! You will use github.com to track your changes and "deploy" your code to production.

We will use a "LAPP stack" (Linux, Apache, PostgreSQL, PHP) as the platform behind our course project. You may have already heard the term "LAMP stack." This is the more common of the two, with MySQL replacing Postgres as the database management system.

We will use a complete, ready-to-run LAPP stack for our development environments, while I will be hosting a production environment at web.cs.georgefox.edu.



Development Environment

We will use a virtual machine (VM) to run a complete LAPP stack on our local machines. This VM will be used as the development environment for your project and can also be used for SQL query assignments.


VirtualBox

Download and install VirtualBox version 6.0 or newer. Take care to download the correct version for your operating system (known as the "host OS").

If you happen to already use another hypervisor (e.g., VMware, Parallels), feel free to use it instead of VirtualBox.


LAPP Stack

Once you have VirtualBox installed, you will need to setup your development environment. I have pre-packaged a virtual machine, there is a link to it at the top of the page. It should have all the software you'll need to do the class project and assignments. Once you have the OVA files downloaded, open up Virtual Box and "Import Appliance" under the "File" menu.

Network Configuration

First we are going to setup two network adapter for our VM. Before starting your VM, open its settings and navigate to Network. Under Adapter 1, make sure Enable Network Adapter is checked. Next, change the Attached to to Host-only Adapter. This will create a private network for our VM, accessible only to the host machine.

Next, change to Adapater 2. Change the Attached to setting to NAT. This provides an interface for your VM to access the host's network and the Internet. Hit "Ok" to save these settings. Now start the VM.

Confirm your VM is serving web pages by opening a browser and entering "192.168.56.101" into the location bar. You should see a page that says "Hello 314!". If you have trouble, you may have to create a new host network in the Host Network Manager, found under Global Tools.

Starting Your VM

Finally, start up the VM and wait for the login prompt. You may have to hit 'enter' a few times to make it appear. You should see:

Ubuntu 18.04.3 LTS dev314 tty1

dev314 login:

You may log in here with the default username and password: dev & 314dev.

Confirm you are able to log in to your VM via SSH from your host machine via the command line or PuTTY. Use the same username and password. You can transfer files with Cyber Duck or WinSCP

Upon logging in, you should see something like the following:

Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-58-generic x86_64)

* Documentation:  https://help.ubuntu.com
* Management:     https://landscape.canonical.com
* Support:        https://ubuntu.com/advantage

 System information as of Tue Aug 27 05:15:26 UTC 2019

 System load:  0.06              Processes:             101
 Usage of /:   6.6% of 62.74GB   Users logged in:       0
 Memory usage: 19%               IP address for enp0s3: 10.0.2.15
 Swap usage:   0%                IP address for enp0s8: 192.168.56.101

* Keen to learn Istio? It's included in the single-package MicroK8s.

    https://snapcraft.io/microk8s

0 packages can be updated.
0 updates are security updates.


Last login: Tue Aug 27 04:32:07 2019 from 192.168.56.1
			
You can now use SSH to log in to your VM as well as SFTP to move files to your VM.

You'll need to place web pages in the appropriate location on the VM for the Apache web server to access and "serve" them. This path is /var/www/html, however a symbolic link to /home/dev/website has been added for your convenience.


Homework Database

Now you will create a copy of the "Teach Yourself" database. On your VM, download an unzip the SQL files with wget. Alternatively, you can use SFTP or the VM shared folder to transfer the files.

dev@dev314:~$ wget http://jorr.cs.georgefox.edu/courses/csis314-client-server/teach_yourself/create.sql
dev@dev314:~$ wget http://jorr.cs.georgefox.edu/courses/csis314-client-server/teach_yourself/populate.sql
			
You can use the psql command in the VM to connect to the Postgres instance and use the password provided on the VM login screen (*** the default password is 'rando-string' . ***. Note that this connects you to the database as the postgres "superuser" - somewhat like the "root" user of a computer. I recommend that you immediately create a "dev" user to use instead:
dev@dev314:~$ psql postgres 
Password for user dev: 
psql.bin (9.5.4)
Type "help" for help.

postgres=> create database teach_yourself;
CREATE DATABASE
postgres=> \c teach_yourself
You are now connected to database "teach_yourself" as user "dev".
teach_yourself=> \i create.sql
teach_yourself=> \i populate.sql
			
Then, run the schema creation script using the \i meta-command (\i create.sql). This will create the teach_yourself database tables. Do the same for the table population script to populate the database tables with data. You should now be able to run queries against the teach_yourself database.

See the PostgreSQL documentation for help with psql command-line options and meta-commands.

Some useful psql meta-commands



Alternative & Extra Setup Instructions

There are some alternative instructions for network settings and shared folders if you would like a different means of connecting to your VM. If the instructions above worked for you, there is little need to use these additional instructions.


This page was last modified on 2026-08-19 at 20:15:09.

Copyright © 2018–2026 George Fox University. All rights reserved.