Gentoo vs Ubuntu

Well I know the first thing that people are saying is, “Oh no not another distro debate.” I myself hate these debates so I am going to try my best to not make this one. My purpose here is to explain the difference between the two. One of the things Linux offers is a lot of choices of distributions. There is no regulations on who can create one. For more on that you should visit Distro Watch.


Gentoo is an operating system that beginners should not get into unless you like to live dangerous. Unlike most distro’s it is not a click next installer. You have to edit configuration files and work via the command line. Now I know that Gentoo is working on a GUI installer so that might make installing a little bit easier.
The one of the things I do like is that you can set the USE flag for installing applications. What I mean by this is you can tell Gentoo when install an application what you want to build with it. For example you can build apache without MySQL support. So if you wanted to add mysql support you just have to add the word mysql to the USE section in the make.conf. Now one of the con’s of Gentoo is that all applications from portage (the system Gentoo uses to install applications) are built via source. So on some systems to install KDE it takes over 10 hours. This of course can depend on your system. So I would recommend that you try installing Gentoo in a Virtual Machine first to see how you like it or of course you can try the Live CD.


Ubuntu to me is the Windows of the Linux world. You install it by answering some questions, hitting next and all the work is done for you. Ubuntu is the distro I recommend for the beginner to the Linux world. There is hardly no configuration change at all. I have rarely seen an install that you had to mess with configuration files to get it to work.
The apt-get system is like portage but it does not build the application’s from source. The only con that I can come up with is that it is too simple. This is a preference to me. Let me explain this logic here. There was a time that installing Linux was not an easy task. Everyone could not do it. Gentoo is one of those examples. When you could install it you felt good about it. When you install Windows you feel nothing. This is how I feel about Ubuntu. But being easy is need because then Linux has no chance of overtaking Windows. Well that is for another blog post at another time. In conclusion I believe if you are new to the Linux world you should try using Ubuntu and mess around with that and get your feet wet. Then when you are ready for a challenge and ready to take the next step, install Gentoo.


Zenoss is a monitoring tool that everyone should start to look at. In the past when you mention system monitoring software, people would say Nagios . Now do not get my wrong there is nothing really wrong with Nagios but it lacks somethings for my taste. Now I could continue on with comparing Nagios to Zenoss but this is not what I am looking to do in this blog post. I want to share with you the features that have attracted me to start using Zenoss.
First thing I like is the support for getting help with Zenoss. On freenode via IRC, the #zenoss room is filled with people who are will to help you with your struggles. I would mention some names but I will leave that for the reader to decide if they every have to visit there. The next thing I really like is that when you are setting it up for the first time you can put in your subnet or IP range and it will scan for all available devices. I got my devices added within 5 minutes of getting into the interface. GUI administration is something also that I really like. Now I know there are a ton of command line guys out there but sometimes is makes it easier. It also helps if some people you work with do not like the command line. I really like the Google map API interface that will let you map out your servers and see them on a map of the world. If you were like me and have some older servers that finding packages for are just a little bit hard; Then you are in luck. With Zenoss you can run commands via SSH. Now the cool thing is that you can specify your username and password so there is no copying your RSA keys or anything like that. Now I am starting to catch on to the SNMP protocol which I use for my newer machines. SNMP will give you more data than the SSH commands will. You can also connect to Windows computers with the username and password from that box as well. Another big thing I like is that you can get graphs from one application. So no need to run Nagios and Cacti.

There are tons more features that could make this into a novel to post about. Zenoss has already done this with their PDF manuals. Go ahead and download them here . Trust me you will love this system monitoring tool.


Yesterday October 18, 2009 I went to and Open source conference in Harrisburg PA called CPOSC(Central Pennsylvania Open Source Conference). Basically this conference discusses applications that are open source and can help you or your company. Another thing this conference gives you is the ability to meet other people that you can network with. There were a lot of different seminars that you could attend to. Each seminar you had 3 choices that you could only choose one.

Well you have seen me do a tutorial on this app but it was a good thing for me. I learned about how you can manage your critical and warning levels. That was hugh. I learned about how you can connect multiple servers.

This seminar talked about how you can use Drupal on your site. Drupal is a CMS tool and they have definitely come a long way.

IRC chat is something that a lot of people go for help. I learned about how you can setup your own channel for your friends and or customers to get instant help. I learned that Freenode which is a popular server has about 51,000 users. In the next few days I will be setting up #jcwebconcepts for my readers to come ask questions.

The next seminar I watch was about the programming language called Python. Now I did not get a tutorial on how to make an application but I was shown some ways that Python makes some difficult code easier. Might have to look into learning some python but I am not sure.

I got to learn on how to use the nice tool to setup virtual machines. I learned on some ways to setup development servers to test things rather than using real hardware. I definitely will be setting it up on my Linux machines since on my Mac’s I use Parallels.

In between seminars in the lobby there were sponsors from places like Ubuntu, Fedora, and Zenoss. What was cool is you got to talk to these people and make contacts with their companies. There were more classes but I ended up leaving early. Now this conference was not free but it was well worth the information I received. To get more information you can visit CPOSC site for more information.

A Look at WineXS

Well earlier today I was looking around and I found an article about an application for Linux called WineXS. This application is a front end for wine in Linux. Wine is an application that will let you install some Windows applications and games. So let me show you how to install this app. The first thing you need to do is install wine. If you have wine installed then you can skip the first two lines.

sudo apt-get update
sudo apt-get install wine
cd $HOME
tar zxvf winexs-1.4.2.tgz
cd winexs

That is it. You can now start to use the app with all its glory.

Linux System Backup

Well today at work I was given a task to backup a server then reformat the machine and setup a new one. So I sat to think about how am I going to back this up. Am I only going to backup certain files? Or should I just do the whole system? I chose to do the whole system due to age of the OS and applications. What if I needed to go back to the way it was. So I thought I would just quickly show you the single command I ran that did the work for me. I mount my terabyte drive to the system and ran the following:

tar cvzpf /mnt/extdrive/backupfilename.tgz --same-owner --exclude=/mnt/extdrive/backupfilename.tar.gz --exclude=/proc/* --exclude=/media/* --exclude=/dev/* --exclude=/mnt/* --exclude=/sys/* --exclude=/tmp/* /

That is what I did to do my backup. If you want to use this you can but you might need to make some changes. If you like this backup method and it works for you, you can put it in a bash script and setup a cron to do this on a regular basis.

tar cvzpf /mnt/extdrive/backupfilename.tgz --same-owner --exclude=/mnt/extdrive/backupfilename.tar.gz --exclude=/proc/* --exclude=/media/* --exclude=/dev/* --exclude=/mnt/* --exclude=/sys/* --exclude=/tmp/* /

Save the file then do:

chmod a+x filename

Add it to the crontab and you are done

Setting Up Nagios

Well at work I have been messing with a server application call Nagios. This app is used to monitor your servers for certain issues. It can monitor anything from file space to processes running. It will ping servers and you will be notified if it has gone down. Now at first this is a little tricky to setup but once you do it you will get use to it. Now I have this running on Ubuntu servers. I do have some Windows servers but monitoring on those are limited. I will be trying to do this on some other versions of linux like gentoo or red hat. So lets get into this. Before you start this you would want to make sure that you have a configured and working Apache/www server running. You will need this for the GUI interface.
First thing you need to do is find the server that is going to be the master server. The master server will hold the Nagios Server app. To install the server on Ubuntu do the follow:

sudo apt-get update
sudo apt-get install nagios3

During install you will need to tell nagios how you want to setup a mail server. The choices are Internet Site, Internet with smarthost, Satellite system, and Local only. Now the Internet with smarthost will take you thru setting up to use sendmail to point to another mail server. Internet Site will setup sendmail to send mail to the internet by itself. I am going to choose Internet Site. It will ask you for the System mail name will be your domain name.

Now lets setup the nagios user. First thing you want to do is check the /etc/nagios3/cgi.cfg to see what user it is expecting. So open that file and look for this line


If you are going to change the username for nagios, in that same file, do the following replace

:% s/nagiosadmin/nagios/g

Now it might show you something like nagiosadmin. You are welcome to change this but you will have to change it in multiple places. You are welcome to do that. I changed mine to just nagios as you can see. So save the file and run the following commands

cd /etc/nagios3
sudo htpasswd -c htpasswd.users nagios
**Note**: nagios needs to be what ever username is specifed in the cgi.cfg

So that should be good for a start. Lets start Nagios or restart it.

sudo /etc/init.d/nagios3 restart

Now in your web browser go to http://_ipaddress_/nagios3

If something goes wrong or you get permissions error you might have to check the cgi.cfg to make sure your usernames match up. So now that you have a working install it is time to go over some configuration stuff. So lets check the first service that is setup in nagios. Open the localhost_nagios2.cfg in the /etc/nagios3/conf.d/

define host
    host_name localhost
    alias localhost

This file does not require and editing really. One last thing we want to edit is the contacts.cfg All you have to edit here is the email line to match your email address.

Here below is a video of what I have done above:


Web Server Ubuntu 9.10

So I thought I would write up a tutorial on how to install a web server that will support Apache, PHP, and MySQL. I will go over some configuration file adjustments as well. So lets get into this and lets open up your terminal and do the following:$ sudo taskel install lamp-server

Now during this process you will be asked a few things. You will be asked for a MySQL password. The password you will set will be your root users password. When it is installing PHP it might ask you what type of module do you want to install for. You will want to select Apache2. This will take a few minutes to install. Once done you can open up your web browser and put in the address bar the IP address of your web server. Now lets edit the default file for your website.$ sudo vim /etc/apache2/sites-available/default

        # If this is going to be internal only then you can leave this alone
        ServerAdmin webmaster@localhost
        # Now you need to add the following line. If this will be internal then put internal
        # IP. If this will be external then you would either put domain name or outside IP
        # Because you server will support PHP we need to setup a directory index
        DirectoryIndex index.php index.htm index.html
        DocumentRoot /var/www
                Options FollowSymLinks
                AllowOverride None
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        ErrorLog /var/log/apache2/error.log
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
    Alias /doc/ "/usr/share/doc/"
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128

The directory index basically tells the server what files to look for in one is not specified. For example if I do the server will look in the server root directory for the following files: index.php index.htm index.html. If they do not exist you will get an error. And that is it for setting up your own web server in Ubuntu 9.04. I have tried this in the alpha 9.10 and it works as well.