NoIP Dynamic Update Client on RaspberryPi (or Ubuntu)

Personally I like to use NoIP’s dynamic DNS services. This tutorial explains how to install the NoIP DUC on a RaspberryPi running a Raspbian based distribution, but it will work on Ubuntu or any other Debian based distribution as well. You should execute all of the commands below as superuser. As not to have to put sudo in front of all of them, it’s best to log in as root or switch to root with sudo su.

Step 1: Install prerequisites

You will need some software to install and run the DUC software. Execute the following commands:

apt-get update
apt-get install build-essential python-setuptools
easy_install killproc

Step 2: Download and install the DUC software

Next you will have to download and install the DUC software itself. The software has to be built from source code, which is why we installed build-essential. The following commands will download and install the software:

cd /usr/local/src/
rm -r noip-*
tar xf noip-duc-linux.tar.gz
rm noip-duc-linux.tar.gz
cd noip-*
make install

The commands above will first remove any previous source downloads for NoIP you might have had. Next it downloads the sources for the software and installs it. After installing it should immediately start the configuration wizard, which you can always restart using the command “/usr/local/bin/noip2 -C“. The configuration wizard will ask for your NoIP account details, as well as the host you want to be using. This should be mostly straight-forward. When it asks if you want to run anything on an update, you should probably just enter “No”.

Step 3: Running the DUC software on startup

By default, the DUC software will not start when you reboot your system. This is where killproc comes in, which we installed earlier. What we have to do now is set up an init script. We’re going to be using a simple script, as is described in the software’s readme file, with a slight alteration to make it work on our distribution. I have the script uploaded on my webserver, so you can just download it to your drive. Execute the following commands to install it and set it up:

cd /etc/init.d
chmod +x noip2
update-rc.d noip2 defaults

Step 4: Reboot

You’re all done now, so you can reboot the system now and when it boots up, the NoIP DUC software should be running.


Read More

Tar (+GZip) individual (sql) files in a folder

I had been backing up a MySQL database with a simple shell script for a while now. What I somehow forgot to add to the script was a command to compress the SQL dumps before uploading them to my backup server. The script had been running for a few months, so manually compressing each file wasn’t much of an option. So I wrote this little shell script do the work for me.

The script places all of the sql files individually into a tar archive with GZip compression. The new file uses the old file’s name with “.tar.gz” appended at the end. The old file is deleted after the compressed archive has been created.

You can of course do this for other files, just change the *.sql mask to work with different files. If for some reason you just want TAR files without the GZip compression, replace the tar line in the script with “tar cvf "${file}".tar "${file}"“.

Read More

Check available diskspace on Ubuntu (CLI)

If you are running an Ubuntu (or other linux) commandline interface, you might have to check how much diskspace is available on the system. You can easily have the system output a list of the disk space usage on all mounted filesystems with the command df -h.

The output depends completely on how your system is set up, but it will look something like:

Read More

Installing Imagemagick or GD (Ubuntu 12.04)

If you’re working with PHP software, you’ll often need image processing software to support complex processing of images in PHP. Most commonly, you will be using the GD or Imagemagick libraries.

To install Imagemagick on Ubuntu for PHP:

To install GD on Ubuntu for PHP:

Read More

Installing “pecl intl” (Ubuntu 12.04)

Some PHP software, such as MediaWiki, prefer for servers to have the “intl” PECL package to be installed. On Ubuntu you can insall it as a precompiled package from the official repositories:

If you start from a clean Ubuntu install and you want to build the package yourself, you might not have all of the dependencies installed. Run this command to make sure you have all of the prerequisites installed:

To build the package itself:

You might also have to restart your webserver if you manually build the package. For Apache, run:

Read More

Elementary OS 0.2 Jupiter

Elementary OS 0.2 Jupiter is the first stable release of Elementary OS and was release just over 10 days ago. I’ve been using the OS on one of my production machines for a week now and I’d like to share some of my thought about the OS.

Elementary OS is an Ubuntu remix, though things aren’t all that different. The only real difference between Ubuntu and Elementary OS is the interface. Elementary OS uses a custom built shell that runs on top of Gnome. The shell is clearly designed to resemble Mac OSX. The interface looks very sleek and tidy, is very responsive and overall I must say that it works really well.

As for functionality, the interface unfortunately doesn’t really add any, at the bottom of your desktop you will see a dock such as in Max OSX, opened programs will show up on the dock and you can easily stick them to do the dock to quick launch them. Aside from the dock, the interface seems to actually reduce the functionality of the Ubuntu desktop environment. The Desktop itself is completely gone, you can no longer put any files or folders onto the desktop and aside from this you no longer have multiple desktop support.

The OS still has a couple of bugs to iron out, often folders like Documents won’t launch and there’s a few other minor bugs.

Overall even though there’s some reduced functionality and small bugs, I must say I’m very satisfied with this new distro, the new interface looks very clean and is fun to use, it reduces that basic feel to Gnome while retaining the performance.

Note that you can use Ubuntu Tweak to bring back a lot of the functionality that was removed.

Read More