2018-02-04-webserver.md 1.1 KB

{:title "Webserver" :layout :episode :video-url "/media/tinydc/webserver/out.m3u8" :yt-episode-video-id "RPyHFrn37Qc" :tags ["episode" "episode-wip" "video"]}

Simple website

(Not scalable)

Needs

  • Tiny Computer

Generate

  1. Download and write RasPi SD card image

xz -e hypriot-1.7.0.img.xz

dd if=hypriot-1.7.0.img of=/dev/sda bs=128KB conv=fsync

When this completes, the card is ready to boot up the RasPi.

  1. Insert SD card into RasPi, boot up, and configure

  2. Create a new directionctory with index file and start script

cp tinydatacenter/starter-website.com mysite.com

cd mysite.com

nano index.html

Nano is a text editor similar to MS Word, except it runs without a cursor or windows that can be moved around. It's called a "Command line tool"

If this is too uncomfortable we can skip sraight to installing a desktop system so that you can use a normal window based text editor.

Operate

  1. Start website with start script

  2. Make a change

  3. Rebuild and restart website

Destroy

  1. Stop script