Some quick Raspberry Pi tips

In case you are not familiar, Raspberry Pi is a pretty nifty little device. I’ve written about it before – but It’s basically a complete computer that runs Linux, but it’s about the size of a credit card.

Raspberry Pi Model B+ Complete Starter Kit -- [Made in the UK]

You can buy a “kit” like above which includes the power cord, WiFi USB dongle, the operating system on an SD card, and an HDMI cable to hook to your TV – this one above costs $58.99. However, you can get just the Pi for as cheap as $35!

If you plug the HDMI cable into your TV, you’ll see that it boots right into an X-Window interface, and is basically Debian Linux. What can you do with it? Well, your imagination is the limit. You can use it to host sensors or controllers, you can use it as a controller/website for a media center, you can roll your own DropBox clone, etc.

If you want to start doing useful things with this though, there are a handful of things I found I needed to do, right out of the gate…

Set a password:
By default, depending on the distribution the default username is pi and blank password or pi and raspberry for a password. I had one where the default password was blank. That meant that I couldn’t SSH into it, because SSH doesn’t allow blank passwords. When I tried to “passwd” from the Pi, it wouldn’t take my empty password. So, I needed to do a couple of things:

sudo passwd

As I understand it, this creates a root account, and sets the password for it. By default, there is only the “pi” account, which uses a split-token. OK, so now we have an official root account, and now from root, we can reset the “pi” password by doing:

sudo password pi

Install VNC so that you can see the UI desktop:
For VNC, you must install the “server” on the Pi by running:

sudo apt-get install tightvncserver

then, on your PC, go download the TightVNC Client. You can now use the VNC client to connect to the Pi from your regular computer. It’s a little easier to use the keyboard and mouse on your regular computer.

Connect from your PC using PuTTY:
You shouldn’t need to do anything on the Pi to enable SSH. You need to download the standalone executable putty.exe from the link below. First, what this is, is a secure way to connect to a terminal window on the PI – there will be no UI, just a console prompt on your Windows machine, which is the console of the Pi. You can get PuTTY from this NCSA Mosaic 1.0-compliant website: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

I get highly agitated and offended that in the year 2014 – this is ABSOLUTELY the standard that EVERYONE uses to connect via SSH. This program is a horrible throwback from the 90’s – and no one has thought to modernize it, and or make it easier to use? Oh yeah, I forgot, it’s Linux – it’s supposed to be needlessly complex and difficult to use! haha Smile

Update apt-get:
So that you can install other software, you need to update apt-get so that it has the latest mirrors. Then upgrade all installed software the the latest. To do this, just do:

sudo apt-get update
sudo apt-get upgrade

Install a better web browser:
If you are using the graphical interface, the default Midori browser is pretty slow – and some sites still check for a “valid” browser. So, you can install the Google Chrome-based “Chromium” browser by running:

sudo apt-get install chromium

and that looks like this:

image

Install LAMP environment (Linux + Apache + MySQL + PHP):
This is probably only if you plan to host a web site. If you do, it’s pretty simple:

sudo apt-get install apache2 php5 libapache2-mod-php5
sudo apt-get install mysql-server mysql-client php5-mysql

and the web server root will be in /var/www – so you can add a phpinfo.php file and put the contents:

<?php phpinfo(); ?>

To get information about the site, like this:

image

Secure the Pi:
Lastly, I ran across this great page which covers a lot of aspects of securing the Pi – it’s worth checking out:

http://www.raspberrypisoft.com/secure-pi/

Posted in Computers and Internet, Development Tools, Infrastructure, Linux, NETMF, New Technology, Raspberry Pi, Security, Uncategorized
5 comments on “Some quick Raspberry Pi tips
  1. Binoj Daniel says:

    Very nice blog. Have your heard about Spark?
    https://www.spark.io/dev-kits

    Like

  2. Ron Miller says:

    Robert, fell into your website while looking for info on RabbittMQ on RasPI. Are you still @ PB? Anyway, looks like a few of your posts will help me tomorrow.

    Ron Miller

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Categories

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 5 other followers

%d bloggers like this: