Joseph Zikusooka ~ Zik

A Linux software engineer specializing in open source technologies | Very experienced in building and configuring UNIX/Linux systems and servers. Passionate about developing software applications and hardware for the smart home | Currently serving as the CEO of Jambula Labs and the project leader at JambulaTV, a smart home automation and entertainment platform - https://jambulatv.com | This blog focuses on the following areas: Linux How-Tos and Tutorials ::: IT Security News ::: Free and Libre Open Source Software ::: Smart Home Software ::: Digital Innovations in East Africa https://mastodon.social/@jzik | https://github.com/zikusooka

Apps

Cool Applications

How to create your own Linux install image

I was reading this google+ post by Linux’ very own Linus Torvalds. One of the comments reads “I feel like Mom and Dad are fighting. I love Fedora and I love Linux :)” Clearly, Linux distributions come with their own specific set of packaging rules and guidelines. Sometimes, it does not make sense to everyone. And when that someone else is Linus, people will go ‘bonkers’ to either agree or disagree with him. But why the noise?

To any one who’s not ventured into the murky waters of Linux kernel building and packaging, you may be wondering why a topic like this one solicits such responses even if its not coming from the man who invented Linux. Believe me – it is a big deal.

Due to the rapid development of open-source software, the Linux kernel and packages on the original CD/DVD images tend to become outdated over a short period of time. Sometimes, those packages become insecure and vulnerable. Furthermore, with all the latest and cool hardware devices that vendors are producing every other day, the Linux kernel has to be upgraded so as to be fully usable by those devices.

So in my opinion, Linus Torvalds is half right, since non-techie users need to get Linux working straight out of the box. My feeling though is that the main distros are really not meant for the Linux newbies. That is why re-spins seem to be a lot popular with new Linux users. So if you made it this far and are still reading this, how do you go about creating a re-spin? Here is one way:

Lately, I’ve been spending sometime, creating customized versions of the Fedora Linux images. I use these Fedora re-spins for the embedded products I’ve been working on such as the JambulaPi, TV STB etc. BTW, these re-spins of Fedora are open source and free, so I plan on posting them to a public site in a not too distant future!

A very useful tool for creating custom images for Fedora Linux is called livemedia-creator. Livemedia-creator uses Anaconda, kickstart and Lorax to create bootable media such as live iso’s that use the same install path as a normal system install.

To install it:

sudo yum install lorax

Then, take a look at the readme file located at /usr/share/doc/lorax-*/README.livemedia-creator. There you will find examples on how to set up your very own customized Linux distribution. A kickstart file is highly recommended as you can add other repositories for installing software that is not originally included in the Fedora releases. Also, it lets you do things like adding initial users, etc. Take a look at Kickstarting Fedora Linux installations.

How to install Asterisk 11 – Part 1

Asterisk is the popular open source telephony platform. With just a few hours to spare, you can turn any spare PC in to a world class PBX system. In part 1, I will list the steps involved in installing asterisk using sources. The steps below can be used with RedHat based systems like Fedora. It shouldn’t be that hard to replicate on other Linux distributions like Ubuntu.

Update your system and reboot if there’s a kernel upgrade:
yum update

For Redhat systems, disable selinux:
sed s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

Install required dependencies:
yum -y install make wget openssl-devel ncurses-devel newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel

Download current asterisk 11 sources:
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz

Note: Dahdi is only needed if you will be using a telephony card to access the PSTN. Timing provided by dahdi is also no longer needed with the new conferencing capabilities in Asterisk 11

Unpack and install the source packages. Please note that the installation order is very important:

a) dahdi
tar zxvf dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete*
make && make install
make config (Generates sample configs)

b) libpri
tar zxvf libpri-1.4-current.tar.gz
cd libpri-1.4*
make && make install

c) tar zxvf asterisk-11-current.tar.gz
cd asterisk*
./configure --libdir={LIBDIR} e.g /usr/lib64 (use uname -a to confirm architecture"
make menuselect (optional)
make && make install
make samples (on fresh install only)
make config

Start services
service dahdi start
service asterisk start

Check to ensure is running:
asterisk -vr

In part 2, I will go over how to configure your asterisk server.

Setup an instant messaging server for your office

Email is a great tool for communication and that is why even in the age of social networks, it persists. However, if you work in an office environment that requires constant and real-time communication between users, email may not cut it. Sometimes you just want to send a quick message without clogging your users Inboxes. What you need is an instant messaging system.

There are quite a number of open source based IM messaging servers; however, I like and have used jabberd over the years. Jabberd2 is an open source implementation of the jabber/XMPP protocol used by popular IM clients.

Installation of jabberd2 on Linux is fairly easy, although you need to know your way around the command line interface and how to edit configuration files.

To start with, install jabberd2. On Fedora/CentOs/RedHat systems:

yum install jabberd

After installation, you will find all configuration files located under /etc/jabberd

You will need to edit the files sm.xml s2s.xml c2s.xml, router.xml; and templates/roster.xml to suit your environment. Then setup your user accounts in your preferred driver backend. Detailed configuration instructions can be found here.

Now all you need to do is install an IM client on your users PCs. There are several of these for all platforms. On Linux; favorites include pidgin and empathy

One cool thing with jabberd2, is that it is very extensible and you can add chat rooms functionality; a sort of ‘circles’ – old school style

Git – The open source developer’s favorite version control system

Today, my brother sent me a link to Clay Sirky’s talk on the political ramifications of ‘cooperation without coordination’ on communities – How the internet will one day transform government. Knowing how much an advocate for open source software I am, he couldn’t have picked a good time. I’ve been thinking of recommending an open source tool called git on this blog.
OK, I won’t comment on the politics here, but I encourage you to listen to this talk, even if you’re not a software developer.

Interestingly, Clay Sirky mentions the power of collaborative software development using git, which enables one developer in Edinburgh to collaborate with another developer in Entebbe (Uganda) without them knowing each other.

So what is git? Git is an open source based distributed version control system, that allows software developers to collaborate and share code. Unlike traditional systems that require a central server, with git, anyone can clone a repository and make changes locally, that can be pushed upstream. Git was created by the man who invented Linux i.e. Linus Torvalds, so you know it embodies the open source spirit!

I recently migrated all my software development projects to using git, I am really loving it as it makes keeping track of the projects a lot easier than before.
I won’t delve into how to use git here, but a good How-To can be found at:
Getting Started with Git

If you are an open source developer and you’ve not yet started using git, you are really missing out.

Try it and you’ll not look back.

Remind: A Cool CLI based UNIX program

I have started a category on this blog featuring cool open source programs. These are mainly command line based, since that is where I spend most of my time. I will also pick those programs that have real life and practical applications.

Remind: As its name suggests is a reminder application. I use it to remind me of birthdays, anniversaries, holidays, etc

To install it: Use your favorites package manager such as apt or yum:
Using Yum: yum -v install yum
Typical Usage: remind [options] [filename]
e.g. remind ../mybirthdays
Typical contents of the file: mybirthdays:
REM 1 Feb MSG Peter’s birthday

This tells the app to remind you that it is Peter’s Birthday on Feb 1.
You can now script this command and do all sorts of cool things, like sending an email or SMS to your phone, when there’s a reminder.

For Help: Type ‘man remind’ to get a detailed how to

Scroll to top