Turning Your Raspberry Pi into a Personal web Server in Simple Steps.


Transforming raspberry pi to a web server is an easy task and the steps we are signifying you are moderately easy and straight. You can use your web server as a host for PHP resume and HTML also for your landing page.

Step 1:

Raspberry Pi – Equipment’s required for the complete process:

Given are the materials that you require to turn Raspberry Pi into your working web server.

  • An SD card that should be at least 4 GB or more than that.
  • Raspberry Pi board.
  • An Ethernet cable
  • A USB Keyboard that has no mouse that means the complete work can be navigated with the help of keys on the keyboard.
  • A monitor and cable that is HDMI compatible.

Raspberry Pi Board

Step 2:

Raspberry Pi – Preparations to get started:

 Working in progress

You should at all times need to Raspberry Pi boot off on an SD card with a disk image of an operating system. It is recommended that you should always purchase an SD card that previously been booted with an operating system of Raspberry Pi or you perhaps purchase an SD card that is blank. You will have to download disk image of an operating system and it has to be written onto your SD card. After writing the image to your SD card the SD card has to be plugged into the Raspberry Pi card reader and on the power of the device. You have to be certain that all the input and output devices are plugged in properly.

Step 3:

Raspberry Pi – Configuring initially:

initial Configuring

If in this whole process any goes wrong, do not panic and format your SD card and your disk image should be reloaded and start the process again. After you plug in the powered Raspberry Pi along with SD card you will acquire a list of information about the operating system and the peripherals.

You will receive a raspi-config window after the boot information is accomplished. You be supposed to craft the following changes.

  • To make all the space on SD card usable expands root partition.
  • Time zone has to be set.
  • SSH server that is found in the advanced options is to be enabled.
  • To the desktop, boot should be disabled; using solely the terminal environment this program can be configured.
  • Raspberry Pi has to be updated.
  • Raspberry Pi has to be rebooted.

Step 4:

Raspberry Pi – Setup SSH:

SSH Setup

Now, in your Raspberry you will be able to SSH and now if you want, you can work on it with another computer. Login information will be prompted once you reboot your Raspberry Pi. On the place where it is written “raspberrypi login: “type the default username which will be pi and thump the enter key. Where it is written “password: ” type the default password which will be raspberry. Now, you will have to type the IP address of your Raspberry Pi.

If config:

In the next row of the output you will see “inet addr” followed by a number to the consequence of the IP address. After writing up your number, you can SSH the client. Not it prompts you login information again, which will be same as it was before. Once you are logged in, it will be good for practice of security to mould the default password. Now, you can change the password with the given command.

sudo passwd pi

To make sure that your operating system is up to the mark, thump enter after every and stay until one runs to a conclusion before initiating another:

sudo apt-get update
sudo apt-get upgrade

Step 5:

Raspberry Pi – Installation of Apache:

Apache Installation  Installed Apache Working

Using the following commands Apache and PHP can be installed.

sudo apt-get install apache2 php5 libapache2-mod-php5

If you will like to continue, you will be prompted. Now, type Y for yes and thump enter. The whole processes will a take a small number of minutes only.

sudo groupadd www-data
sudo usermod -g www-data www-data

With the following commands apache has to be restarted.

sudo service apache2 restart

After going to your web browser of your choice in the URL bar type, IP address of your Raspberry Pi, if in any case you are unable to remember your IP address you can use ifconfig command that was stated before in this tutorial and now you will see like in the picture shown above a web page that says “It works”

Step 6:

Raspberry Pi – My SQL to be installed:

 installed My SQL

Configuring mysql server

Installing MYSQL with the given command

sudo apt-get install mysql-server mysql-client php5-mysql

Type Y for Yes and strike enter after you are asked do you want to continue.

At the time of installation, for the MYSQL root user, you will be prompted to position a fresh password.

Step 7:

FTP to be installed:

Install FTP

Install FTP to permit the transferring of files from your Raspberry Pi. Primarily we have to take possession of the web root. To accomplish this, employ the subsequent commands:

sudo chown -R pi /var/www

After that, install vsftpd with the subsequent command:

sudo apt-get install vsftpd

Now the configuration can take place. Initially edit the vsftpd.config file. To alter the file employ the following command:

sudo nano /etc/vsftpd.conf

Discover and correct the subsequent lines as precised:

Alter anonymous_enable=YES to anonymous_enable=NO,

Uncomment local_enable=YES

Uncomment write_ enable=YES

Then go to the base of the file and append force_dot_files=YES

Egress the editing line by striking ctrl+X, type y to verify the alters and push enter to save the file path.

Resume the FTP service with the subsequent command:

sudo service vsftpd restart

Step 8:

Final Step:


Your Raspberry Pi password has to be modified:

sudo passwd root

Insert the user root as a mod with the subsequent command:

sudo usermod -L root

Now, your server supposed to be up and successively and now you can move the files through FTP by the means of your servers IP address and using the Port 21 it should be connected.


About Author

Leave A Reply