Search This Blog

Backing up your email with a Raspberry Pi


One of the great things about the Raspberry Pi is the minuscule amount of electricity it needs to run. This means you can leave it on 24 hours a day without worrying about your electricity bill (or bigger things, like climate change). And when you have it on all the time, you can have the Pi take care of important jobs. One example of this is backing up your email with a Raspberry Pi. For a great guide on using a Pi and getmail to backup your email, checkout this link: How to Back Up Email with Getmail at Magna Techa.

A million Pi's later in the UK


BBC reports that the millionth Raspberry Pi has been produced at the plant in the UK that builds the ever-popular computer. While the Pi was originally manufactured in China, the creators decided to give it a go in their native land of the United Kingdom. They build up to 12,000 Pi's a day at Sony's Pencoed plant the Pi is set to become the most popular UK-built PC since the 1980's.

Setting up nginx on a Raspberry Pi


The Raspberry Pi can be a great small web server. I've hosted many sites on my Pi, and still would if my new ISP didn't block port 80 on my connection. It doesn't take much CPU power or RAM to host static sites and the many people even install WordPress on Raspberry Pis. In this post, I'll show you how to install and use the nginx web server on a Raspberry Pi running Raspbian.
Nginx is an efficient and lightweight web server that is gaining a lot of popularity, most notably taking a large part of the market share from the previously more popular Apache web server. Installing nginx on a Raspberry Pi is pretty simple. To get started, update your Pi's repositories so that you get the latest software:
sudo apt-get update
Now, install nginx on the Pi with this command:
sudo apt-get install nginx
Now that nginx is installed, we need to configure it to serve requests for your domain name. Nginx's configuration on a Raspberry Pi is located in the /etc/nginx directory. The file we're interested in is called default and is in the sites-enabled directory. While you can edit it from the sites-available directory as well, it's a link to sites-enabled, so we can do either one. So let's open that up for editing in a terminal:
sudo nano /etc/nginx/sites-enabled/default
We want to create a server block to define the site that nginx will serve from your Raspberry Pi. Do that by adding this to the bottom of the file, right before the last closing brace (}):
server {
    listen 80;
    server_name pitown.reddino.org;
    root /usr/share/nginx/www/pitown.reddino.org;
    index index.html index.htm;
}
That is one of the simplest server blocks for nginx, and will serve files and pages located inroot to people that request pitown.reddino.org on port 80 at your IP address. Replace pitown.reddino.org with your domain name. Remember that you'll need to make sure your domain registrar is pointing your domain name at your IP address and that your ISP allows serving files on port 80. Once you save the new default file, you'll need to reload nginx's config with this command:
sudo nginx -s reload
I suggest creating a directory for you domain in your home folder and then creating a symklink for it to nginx's default webroot. Here's how I would do that for this site:
mkdir ~/pitown.reddino.org
sudo ln -s /home/myusername/pitown.reddino.org \
/usr/share/nginx/www/pitown.reddino.org
Then you can create your index files for a static site within ~/pitown.reddino.org. And that's all you need to install nginx on your Raspberry Pi.

How dumb is it to pay $150 for a Raspberry Pi?


Pretty dumb. Ken Hess from ZDNet says he spent $150 on a $35 computer, meaning aRaspberry Pi.
"Billed as the $35 computer, the Raspberry Pi, has taken the DIY world by storm. It's a cool project system but it's no $35 computer."
I agree that the little computer has taken the world by storm, but I have to point out that myRaspberry Pi cost me $43 after shipping. This is a far cry from Hess' $150. He complains about having to buy all the peripherals for a Raspberry Pi: "4GB (at least) SD card, a mini USB power adapter, an HDMI cable, RCA cable, RCA to S-Video adapter" and on and on.
The funny thing is that I had a 4 GB SD card from an old camera that I sold and I have about 4 power supply adapters from various phones and what-not. And that's it. You don't need anything else to start having fun with a Raspberry Pi. I'm sure you already have another computer so you can just fire up an SSH session and go to town. You don't need HDMI cables, cases, cases for you cases, a doilies, raspberry pie, or anything else you can find that is related the Pi.
The only thing I would add to my Raspberry Pi right now is a USB wireless radio. Oh no, now it has cost me $52!