Open In App

How to build a Linux server on a Raspberry Pi from Windows?

The Raspberry Pi is a small, inexpensive computer that is of the size of a credit card that connects to a computer monitor or TV and operates with a regular keyboard and mouse. With the help of this competent small gadget, individuals of all ages may learn about computing and how to program in languages like Scratch and Python.
It can be used to set up your own server at a minimal cost. It has all the features of a desktop computer, including the ability to play high-definition video, browse the internet, create spreadsheets, word documents, and play games.

What you’ll have to create a Linux server using a Raspberry Pi is listed below:



Steps to build a Linux server on a Raspberry Pi from Windows

Step 1: Get the Raspbian OS for your Raspberry Pi

The original Raspbian operating system image is accessible on their own website. Download the Raspbian zip file that contains the most recent version. Please refer to the link below to get the OS image: https://www.raspberrypi.com/software/operating-systems/



 

Raspbian is the official operating system for the Raspberry Pi that was adapted from Debian 7.0 (Wheezy) and is customized for the architecture of the device. Although there are numerous ways to run your preferred OS on the Pi, we’ll pick Raspbian OS because of how straightforward it is.

Zip and extract files

On a Raspberry Pi, an operating system can be easily installed. Install the boot image onto a microSD card first using a computer. Simply insert the card further into Raspberry Pi after that to begin booting.

Step 2: Installation of Raspbian OS

Installing the “Raspberry Pi OS with Desktop” image or “Raspberry Pi OS including desktop & recommended applications” will be quite simple. We’ll use “Raspberry Pi OS Lite” since we’re constructing a Linux server. Once the.zip file has finished downloading, you need to extract it.

Step 3: Write Raspbian OS to micro SD card

To write the image to the microSD card(create bootable media), simply download win32 disk imager from the link below: https://sourceforge.net/projects/win32diskimager/

 

Step 4: Booting the Pi

To use the Raspberry Pi, all you need is a computer with a display, a keyboard, and a power source. For network access, we also own an Ethernet cable, which we prefer to WiFi, specifically for just a dedicated server.

Use the default login information when asked:

Username : pi
Password : raspberry

Setting Up Raspbian OS:

There are two possible ways for the initial setup:

1. Booting the Pi with the help of a monitor and keyboard:

For the first setup, you can connect a USB keyboard as well as an HDMI monitor to the Raspberry Pi.

 

 

 

 

 

 

 

2. Booting the Pi using SSH(Secure Shell):

Raspbian is being installed without a display, mouse, or keyboard. SSH is the only way we can interact with the Raspbian OS, which is currently installed on the microSD. 

Putty configuration

Logging into OS:

Pi is the default user, while raspberry is the default password. As an illustration, run ssh pi@192.168.0.137 and then enter the password when prompted if the IP address is 192.168.0.37. 

Login to raspberry pi

Configuring Raspbian:

Follow these instructions to reduce the amount of installation, storage space, and memory use. It is better to invest time in a thorough study to ensure that each setting is as accurate as feasible. A configuration can be applied in a variety of ways, and files and directives may become obsolete. To be sure you are not using an out-of-date setup, always read the product documentation.

Run raspi-config:

Run “sudo raspi-config” once you are connected and logged in.

 sudo raspi-config

raspi-config script window

Update apt Repository:

Use these commands to update the repositories, and type your password when asked after executing the first command. 

sudo apt-get update

Again, when asked type Y then Enter:

sudo apt-get upgrade

Updating apt repository

 Installing NGINX Server:

Run this below command to install the NGINX in your Pi OS:

sudo apt-get install nginx

ngnix install

Start NGINX:

Run the command below to start Nginx server:

sudo /etc/init.d/nginx start

nginx start

Check NGINX running status:

1. Using IP address:

Enter the IP address of your Raspberry Pi inside the URL bar of your web browser.

Welcome Page – Ngnix

2. Using the command:

Additionally, you can use the systemctl command from the console to see whether the NGINX service still is active.

sudo systemctl status nginx

 

Hooray, you have made your own Linux server using Raspberry Pi. Deploy your apps or websites on your own server.


Article Tags :