Sunday, October 27, 2013

Your(ls) Own Short URL service on Raspberry Pi

Raspberry Pi a $35 credit-card sized computer is an excellent piece of hardware that can be used to run many of small workloads for personal use, learning and sometimes even for use at SMBs and Enterprises.


Yourls (Your Own URL Shortener) is a small PHP application which uses MySQL as DB to run our own URL shortening service similar to well known and


I Have been running Yourls on Ubuntu VM on Hyper-V with Apache HTTPD for an year now.


After getting Raspberry Pi wanted to shift Yourls to Raspberry Pi and due to limited resources available on RPi I chose NGINX webserver instead of Apache webserver to run Yourls.


This post is a walkthrough of working configuration to setup Yourls under 10 minutes on Raspberry Pi running NGINX webserver, PHP and MySQL.


My Setup – Hardware and Software details

1. Raspberry Pi Model B (512 MB RAM) connected to LAN

2. 4 GB Class 4 SD Card

3. PiBang Linux Server Edition

4. Windows 8.1 Laptop with Wifi

5. Putty

6. Win32 Disk Image

7. Cisco E1200 Wifi Router

8. Cable Broadband – 5 Mbps