A simple database and web server implementation
Next, we'll take our project one step further and install both a database and web server, which we can administer later on using ConnectBot. We will even make it more fun by implementing a real project that makes use of these servers. The best candidate for this purpose is a sensor measurement scenario. We will connect a temperature/humidity sensor to our Pi and save the measurements into a database that we will install on the Pi, which a web server will make available to clients. We can later on manage these servers remotely, which is the main objective in this chapter.
Connecting the sensor
For the purpose of this project, we will use a sensor, DHT11, which measures both temperature and humidity, but for the sake of easier connections, we will use an off-the-shelf module called Keyes DHT11 or DHT11 for short, which contains these sensors.
Tip
There is even an improved version of DHT11, which is DHT22. It costs a little bit more but has...