Sponsors

STATS

Todays date:
Thursday 24th of June 2021 06:23:09 PM

You are visitor

33541


Your IP address is 35.170.64.36


Page last updated
25 May 2017

Doing something useful

Raspberry Pi     Our intention was to replace our Windows web server with a Raspberry Pi web server. Your purposes may or may not be the same. Therefore, it is difficult to determine any particular order for us to explain the steps YOU need to take to set up YOUR Raspberry Pi.


We will explain the steps we needed to take, in the order we needed to take them.

A quick update

If you are following on from the previous page this next step may not be required.
It helps to keep our operating system up to date.

From the command prompt, type:

sudo apt-get update && sudo apt-get -y dist-upgrade

Allow that operation to finish. It could take a few minutes. Go and pour a nice glass of wine.

Your Raspberry Pi should now be up to date.

We chose headless

On the previous page, we explained 'headless' operation. Since we are setting up a remote web server, we have no need of a monitor, keyboard or mouse attached directly to our RPi. We can connect to our RPi using the screen, keyboard and mouse, connected to another computer on our network. This is handy because our development team can all contribute to the content of our web server, from the comfort of their own office chair.

If you choose NOT to go headless, you could skip the next step, but it certainly will not do any harm to include this step, so that you have the option to connect from another machine on your network if you wish.

SSH

SSH is the short name for Secure Shell.
It allows us to connect across the network using a command line console, just as if we were actually working on the RPi itself.

We chose to use an application called 'Putty' for Windows. You can search for and install any SSH client for your operating system.

Now. Go to your RPi, login to the console and type:

ifconfig

Look for the first reference to 'inet addr:'

Make a note of the IP address. In our case this was '192.168.1.5'.

Go to your Windows machine, fire up Putty (or your chosen SSH client).

Look for the textbox 'Host Name (or IP address)'

Enter the IP address you found in the previous step. Click open.

If all went well, you should be able to login to the Raspberry Pi, as user pi.

Remote desktop

It is also possible to connect to the graphical user interface (GUI) of the Raspberry, from another machine on the network.
In our case we will connect from a windows machine using Remote Desktop. But first we need to install some stuff on the RPi.

Now. Go to your RPi, login to the console as user pi and type:

sudo apt-get install tightvncserver

Type 'Y' and allow that to install.

Next, type:

sudo apt-get install xrdp

Allow that to install.

Next, type:

ifconfig

Look for the first reference to 'inet addr:'

Make a note of the IP address. In our case this was '192.168.1.5'.

Go to your Windows machine, click on the Start button. In the search box at the bottom, type 'remote' and hit ENTER. This should pop up the remote desktop connection wizard.
Enter the IP address of your RPi.

Enter the pi username and password. Click Connect.

The first login can take a few seconds. Be patient.

Sometimes, the first connection fails for no known reason. Just try a second time.

If all went well, you should be presented with the RPi desktop, on your Windows screen.

>>next>>