How to install the NoIP.com dynamic update client on Ubuntu.14.04

 

Step 1: Download, extract, install

sudo su
cd /usr/local/src/
wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
tar xzf noip-duc-linux.tar.gz
cd noip-2.1.9-1/ # ...or whatever version you are using
make install

Step 2: Set the client to run at startup

cd /etc/init.d

# Literally, just copy and paste the command below:

cat >noip2 <<DELIM
#######################################################
#! /bin/sh
# . /etc/rc.d/init.d/functions  # uncomment/modify for your killproc
case "$1" in
    start)
        echo "Starting noip2."
        /usr/local/bin/noip2
    ;;  
    stop)
        echo -n "Shutting down noip2."
        killall noip2
    ;;  
    *)  
        echo "Usage: $0 {start|stop}"
        exit 1
esac
exit 0
#######################################################
DELIM

Now you can set it to run at boot:

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

Step 3: Start the client

sudo service noip2 start

You can check that it’s running with

ps -ef | grep noip2

How to compile and install Eucalyptus 3.3.0 on Ubuntu 13.04 from GitHub sources (cloud-in-a-box)

 

This is an updated guide on how to build and install Eucalyptus 3.3.0 on Ubuntu 13.04. I have tested these steps on a freshly installed & updated Ubuntu 13.04 machine on Sunday, July 21st, 2013.

There is another guide here for Eucalyptus 3.2 and Ubuntu 12.04. :)

Continue reading

How to compile and install Eucalyptus 3.2.0 on Ubuntu 12.04 from GitHub sources (cloud-in-a-box)

 

Recently, I’ve been spending my time up in the clouds (sunt cu capul in nori) messing around with Eucalyptus.

Eucalyptus is an open-source cloud platform. In my experience, this means that you can download it from GitHub, compile it and then torture yourself trying to get it to run :)

Here, I am presenting a short guide on building, installing and configuring Eucalyptus 3.2.0. To maximize pain, feel free to ignore everything I say below.
Continue reading

Encrypting a file using AES in 256-bit CBC/CTR mode using the OpenSSL library

 

I’ve been using OpenSSL a *LOT* for work lately and I’ve learned some interesting stuff. Here’s a quick guide on how to encrypt and decrypt files using AES in CBC or CTR mode using 256 bit keys and 128 bits IVs. To do this, I used the EVP API in OpenSSL, which allows you to easily encrypt a file using any cipher of your liking.
Continue reading

Alin’s Linux cheat-sheet

 

This is my Linux cheat-sheet, a place for me to remember what I forgot.
Getting a properly formatted date for file names

date +%Y-%m-%d-%H-%M-%S

…for, December 20th, 2014, 3:31AM this will output

2014-12-20-03-31-08

Zip a directory

zip -r archive.zip /path/to/directory/

Computing with floating point numbers using bc

echo "4.5 / 2.5" | bc -l
# Computes log_2(256)
echo "l(256)/l(2)" | bc -l

Renaming tricks
This renames all directories in the current working directory from b6-r9-a16 into b06-r09-a16 (bulk renaming).

rename 's/b(\d+)_r(\d+)_a(\d+)/sprintf("b%02d-r%02d-a%02d", $1, $2, $3)/e' *

This renames all directories in the current working directory from results_blablabla into blablabla (bulk renaming).

rename 's/results_.*b/b/g' *

How to hash a directory (quick)

find /usr/include -type f -print0 | sort -z | xargs -0 sha256sum | sha256sum

Continue reading