Skip to content

Hundreds and thousands of web application & web sites are being created every single day. In order to run or process these kinds of web-based application huge chunks of server are required, and to power these servers 24/7 huge amount of electricity is consumed. It might be possible to buy/rent certain amount of server space, but it is very expen…

Notifications You must be signed in to change notification settings

pramit-marattha/Portable-Local-Network-Server-Final-Year-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portable-Local-Network-Server-Final-Year-Project

Hundreds and thousands of web application & web sites are being created every single day. In order to run or process these kinds of web-based application huge chunks of server are required, and to power these servers 24/7 huge amount of electricity is consumed. It might be possible to buy/rent certain amount of server space, but it is very expensive to buy the entire server. So, the main objective of this project is to make even more highly efficient, completely inexpensive and portable pocket size web server.

Fully completed Product

1 2 3
WorkInprogress_6 WorkInprogress_5 WorkInprogress_4
4 5. 6
WorkInprogress_3 20200701_085801 20200701_085541
7 8 9
20200701_085948 20200701_085608 20200701_085550
10 11 12
workInProgress WorkInprogress_1 WorkInprogress_2

Portable local network server

Setting up Raspberry Pi 4 to serve a Django project using Apache2. .

Software Required for setting up the Raspberry-pi:

Flash Rapios os in Sd card -- https://www.balena.io/etcher/

Setting up raspberry pi

  1. Total wipeout of the SD Card:

    1. Download SDFormatter.

    2. Install it

    3. Plugin MicroSD card.

    4. Open SDFormatter

    5. Select that specific card

    6. Select "Quick Format".

    7. Click "Format"

  2. Download Raspberry-pi os .

    1. Once downloaded, extract/unzip downloaded contents.

    2. The file is about 3 Giga bytes.

  3. Download and open Etcher

  4. Run it and select the operating system image file.

  5. Select the formatted SD card.

  6. Click Burn to transfer Raspbian to the microSD card. Once complete, you can safely pull the card out

  7. Insert the microSD card into Raspberry Pi

  8. Power on Raspberry Pi

Getting IP Address of the Pi

  1. Turn Raspberry Pi on and ensure microSD card is inserted that contains the Raspbian Jessie Linux Operating System

  2. Connect USB Keyboard, USB Mouse, and Monitor (through HDMI)

  3. Connect Raspberry Pi to the Internet on your local network :

  4. Open up Terminal and type ifconfig. You should see the following result:

    You'll need to find this line inet addr:

  5. SSH into your Pi with ssh pi@<ip>:

    Mac/Linux Users (non-Pi linux):

    1. Open Open Terminal
    2. type ssh pi@<IP>
    3. Accept the warning about fingerprint authenticity (if any)
    4. The default password is raspberry

    Windows Users:

    1. Download & Install PuTTY
    2. Open PuTTY
    3. type ssh pi@<IP>
    4. Accept the warning about fingerprint authenticity
    5. The default password is raspberry

Apache2 and Django installation inside Raspberry pi

Install Apache2 on raspberry-pi:

sudo apt-get install apache2 -y
sudo apt-get install libapache2-mod-wsgi-py3

Install Pip & Django:

sudo apt-get install python-setuptools python-dev build-essential

sudo easy_install pip 

sudo pip install django==X.Y.Z #where X.Y.Z is the version number

sudo pip install django==1.10.3

sudo pip install virtualenv 

Enabling module wsgi

sudo a2enmod wsgi

Restart Apache service:

# Restart in two ways:
sudo apachectl restart
sudo service apache2 restart

Start Apache service :

# Start the Apache:
sudo apachectl start
sudo service apache2 start

Stop Apcahe Service :

# Stop Apache in two ways:
sudo apachectl stop
sudo service apache2 stop

Now its time to Install Virtual environment

specify a directory or create one

mkdir pramitserver_env
cd pramitserver_env
pip install virtualenv

Now its time to Turn on your Virtual environment

virtualenv .

Now lets activate it by typing following command

cd Scripts 
source activate

Now Copy the app into the directory that you just created

Install the Required Python libraries

For Bulk installation copy it and paste it inside requirements.txt file and install it as pip3 install -r requirements.txt

Pillow==5.2.0
chardet==3.0.4
Django==2.1
django-crispy-forms==1.7.2
idna==2.7
requests==2.19.1
pytz==2018.5
certifi==2018.10.15

Or you can simply download the entire file from virtualenvironment branch of this repo

Now Locate manage.py

Type the Following Command

python manage.py runserver 0.0.0.0:8080

Slides

. Table of Content:
Aim of Project Project Objectives
Meeting Record ER Diagram
Screenshot (53)
Structure Chart USe Case Diagram
Screenshot (54) Screenshot (55)
Task Sheet Gantt Chart
Screenshot (56) Screenshot (57)
calendar Timeline
Screenshot (58) Screenshot (59)
Network Diagram Network Diagram
Screenshot (60) Screenshot (61)
Network Diagram Network Diagram
Screenshot (62) Screenshot (63)
Network Diagram Resources Used
Screenshot (64) Screenshot (65)
Requirement Catalogue "Overview" Requirement Catalogue "Functional Requirement"
Screenshot (66) Screenshot (67)
Requirement Catalogue "Non-Functional Requirement" website Mockups
Screenshot (68) Screenshot (69)
website Mockups Raspberry pi server mockups
Screenshot (70) Screenshot (71)
Arduino circuit diagram mockups Arduino circuit diagram mockups
Screenshot (72) Screenshot (73)
Product Development:Front-End ”Login-page” Register
Screenshot (74) Screenshot (75)
Home-Page Back End
Screenshot (76) Screenshot (77)
Product Development:“Users” Database Tables on db.Sqlite3 Product Development: “Posts” Database Tables on db.Sqlite3
Screenshot (78) Screenshot (79)
Final Product Final Product
Screenshot (80) Screenshot (81)

About

Hundreds and thousands of web application & web sites are being created every single day. In order to run or process these kinds of web-based application huge chunks of server are required, and to power these servers 24/7 huge amount of electricity is consumed. It might be possible to buy/rent certain amount of server space, but it is very expen…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published