Category Archives: Productivity

How to monitor remote Windows machine using Nagios on Linux

In the previous articles we discussed about Nagios 3.0 Jumpstart guide and How to monitor remote Linux host using Nagios 3.0. In this article, l’ll explain how to monitor remote windows machine and the various service running on the windows server using nagios monitoring server. Following three sections are covered in this article.

I. Overview
II. 4 steps to install nagios on remote windows host

  1. Install NSClient++ on the remote windows server
  2. Modify the NSClient++ Service
  3. Modify the NSC.ini
  4. Start the NSClient++ Service

III. 6 configuration steps on nagios monitoring server

  1. Verify check_nt command and windows-server template
  2. Uncomment windows.cfg in /usr/local/nagios/etc/nagios.cfg
  3. Modify /usr/local/nagios/etc/objects/windows.cfg
  4. Define windows services that should be monitored.
  5. Enable Password Protection
  6. Verify Configuration and Restart Nagios.

Read more on www.thegeekstuff.com

Advertisement

How To Make monit Send SMS Alerts When Your Server Goes Down

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 08/05/2008

This tutorial explains how you can configure monit to send alert messages per SMS to your mobile phone when a service fails. Because monit can send only emails but not SMS, we will use an email-to-sms gateway where monit will send its emails to, and the email-to-sms gateway will convert the emails to SMS messages.

Read more on Howtoforge.com

How To Install Django On Fedora 9 (Apache2/mod_python)

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 07/21/2008

This tutorial explains how to install Django on a Fedora 9 server. Django is a web framework that allows to develop Python web applications quickly with as much automation as possible. I will use it with Apache2 and mod_python in this guide.

This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web.

Red more on Howtoforge.com

Installing And Using OpenVZ On CentOS 5.2

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 07/09/2008

In this HowTo I will describe how to prepare a CentOS 5.2 server for OpenVZ. With OpenVZ you can create multiple Virtual Private Servers (VPS) on the same hardware, similar to Xen and the Linux Vserver project. OpenVZ is the open-source branch of Virtuozzo, a commercial virtualization solution used by many providers that offer virtual servers. The OpenVZ kernel patch is licensed under the GPL license, and the user-level tools are under the QPL license.

This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web.

Read more on Howtoforge.com

How To Save All Open Websites in Firefox When It’s Time to Call It a Day

Imagine a situation where are you have a dozen different websites open inside Firefox and suddenly your wife walks in saying – “Let’s go out for dinner and then see a movie.”

That’s an offer you can’t refuse but before shutting down the computer, you would like to save a list of all websites that are currently open in Firefox. Here are some suggestion on how to achieve this?

Read more at www.labnol.org

GNU Screen: an introduction and beginner’s tutorial

Most modern Unix-based operating systems (e.g. Linux, MacOS X, and BSD) come with a little console-mode utility called GNU Screen. It’s a powerful tool in the hands of the console warrior, a veritable Swiss Army knife of text-mode human-computer interaction.

This utility, despite its considerable usefulness, goes unused by a great many people. Why is this? Few people even know it’s there, and those that do rarely understand the problem it solves. In this article, I will explain what screen does for you, and provide a simple set of instructions for accomplishing basic tasks using screen. My audience is those that are skilled with the command line but who have little or no experience with screen itself.

What screen does

Screen is best described as a terminal multiplexer. Using it, you can run any number of console-based applications–interactive command shells, curses-based applications, text editors, etc.–within a single terminal. The desire to do this is what gets most people hooked on screen. I used to start a half-dozen terminal emulators when I logged into my machine: I wanted one to read my email, one to edit my code, one to compile my code, one for my newsreader, one for a shell into my web host, and so on. Now I start one terminal emulator, and run screen in it. Problem solved.

The other main cool feature of screen is its ability to decouple the terminal emulator from the running programs. This means that you can use screen to keep programs running after you accidentally close the terminal emulator, or even after you log out, and later resume right where you were. It means that the idea of a “session” in which you are running a number of console programs is a free-floating entity that you can bind to any terminal anywhere, or no terminal at all if you want.

Read more at www.kuro5hin.org

10 Fast Tips You Need To Know For Windows XP

10 Tips Fast You Need To Know For Windows XP, Tech Support Page: There’s ten Windows XP tips you should know. it’s time to deliver a bit deeper and uncover some of Windows XP’s secrets.

1.Windwos XP System Properties dialogue box, Fast! Windows key + Break brings up the System Properties dialogue box; Windows key + D brings up the desktop; Windows key + Tab moves through the taskbar buttons.

2. Easy Windows XP Lock: You can lock your Windows XP workstation with two clicks of the mouse. Create a new shortcut on your desktop using a right mouse click, and enter ‘rundll32.exe user32.dll,LockWorkStation’ in the location field. Give the shortcut a name you like. That’s it — just double click on it and your computer will be locked. And if that’s not easy enough, Windows key + L will do the same. Wndows Key + L Key, Try it.

3. Free Up Hard Drive Space: Internet Explorer will automatically delete temporary files, but only if you tell it to. Start the browser, select Tools / Internet Options… and Advanced, go down to the Security area and check the box to Empty Temporary Internet Files folder when browser is closed.

4. Start Windows Fast, No Login: You can start up without needing to enter a user name or password. Select Run… from the start menu and type ‘control userpasswords2’, which will open the user accounts application. On the Users tab, clear the box for Users Must Enter A User Name And Password To Use This Computer, and click on OK. An Automatically Log On dialog box will appear; enter the user name and password for the account you want to use.

5. Reload Many Files, Fast: You can rename loads of files at once in Windows Explorer. Highlight a set of files in a window, then right click on one and rename it. All the other files will be renamed to that name, with individual numbers in brackets to distinguish them. Also, in a folder you can arrange icons in alphabetized groups by View, Arrange Icon By… Show In Groups.

6. Free Network Activity Light: XP comes with a free Network Activity Light, just in case you can’t see the LEDs twinkle on your computer network card. Right click on My Network Places on the desktop, then select Properties. Right click on the description for your LAN or dial-up connection, select Properties, then check the Show icon in notification area when connected box. You’ll now see a tiny network icon on the right of your task bar that glimmers nicely during network traffic.

7. Remote Assistance To Help A Friend: You can use Remote Assistance to help a friend who’s using network address translation (NAT) on a home network, but not automatically. Get your pal to email you a Remote Assistance invitation and edit the file. Under the RCTICKET attribute will be a NAT IP address, like 192.168.1.10. Replace this with your chum’s real IP address — they can find this out by going to http://www.whatismyip.com — and get them to make sure that they’ve got port 3389 open on their firewall and forwarded to the errant computer.

8. Stop The Windows XP Nagging: Windows XP can be very insistent about you checking for auto updates, registering a Passport, using Windows Messenger and so on. After a while, the nagging goes away, but if you feel you might slip the bonds of sanity before that point, run Regedit, go to HKEY_CURRENT_USER/Software/Microsoft/Windows/Current Version/Explorer/Advanced and create a DWORD value called EnableBalloonTips with a value of 0.

9. Create Your Only Personal Screen Saver Using Your Photos: If you like using a screen saver and have digital photos on your computer, you can easily make your own screen saver using the pictures that you have stored on your PC. You can set up your screen saver in Microsoft Windows XP to display a slide show of some or all of your pictures when you’re not using your computer.

To set up a My Pictures slide show. Right-click on the desktop, and then click Properties. In the Display Properties dialog box, click the Screen Saver tab. Then, click the Screen saver list, and click My Pictures Slideshow. Click OK.

The next time your screen saver starts, you’ll see a slide show of all the pictures in your My Pictures folder. If you want to see your pictures right away, follow these instructions to add a shortcut to your desktop that immediately starts the slide show.

10. Free Windows XP Backup Software: Install Windows XP Home Edition Backup software: To manually install Windows Backup. Insert your Windows XP CD into your CD drive. If Windows XP Setup does not appear after several seconds, open My Computer, right-click your CD drive, and then click AutoPlay. In the Welcome to Microsoft Windows XP window, click Perform additional tasks. Click Browse this CD.

Double-click VALUEADD, double-click MSFT, and then double-click NTBACKUP to open the \VALUEADD\MSFT\NTBACKUP folder. In the NTBACKUP folder, double-click NTBACKUP. After setup is complete, click Finish.

You can now start Windows Backup by clicking Start, pointing to All Programs, pointing to Accessories, pointing to System Tools, and then clicking Backup. For more information about protecting your files from computer failure.

Read more on www.webtechgeek.com

Quick ‘n’ Easy LAMP Server For CentOS/RHEL

This tutorial shows a quick way of installing a LAMP server (Linux + Apache + MySQL + PHP/Perl together commonly known as LAMP Server.) on CentOS and RHEL server systems.

  • Apache Web Server 2.0
  • MySQL Database Server 5.0
  • PHP Scripting Language 5.0
  • phpMyAdmin – Web based MySQL Administration Tool
  • Webmin – A free web based hosting control panel

Goal

To set up a LAMP server on a fresh VPS/Dedicated server running CentOS 5.0 with atleast 256mb of RAM. We will also be installing Webmin, a free server control panel for linux.

Read more at Howtoforge.com

How-to : Using Tar (Taring)

Ok well here is a short listing on how to use the command tar to backup you data..
Tar is solely an archiving app. Tar by its self wont compress files.

But you say “then what is a .tar.gz”

It’s a tar file that has been compressed with a different compression utility. The .gz=gzip is the compression app use to compress it.

Here is tar in its simplest form

tar -cvf filename.tar /path/to/files

-c means create
-f means filename (-f should always be last when you using syntax)
-v Verbose will display all the files its puts in the tar and error you might have incurred
You should see the filename.tar file in what ever directory you ran tar from.

You say “But I want to make the tarball compressed”

Well then -z is the option you want to include in your syntax

tar -zvcf filename.tar.gz /path/to/files

#notice I had to add the .gz extension.
-Z( no not -z) will run it thru the old compress app.

Now when I make a tarball I like to keep all the path’s from which the file is in.
For this use the -P (absolute path)

tar -zPvcf filename.tar.gz /path/to/file

When I extract it I will see a new directory called /path
and under that I will see the “to” directory, and the “file” is under “to”

Now you say “I want to backup ALL my files in my home directory EXCEPT the temp directory I use”. No problem.

tar -zPvcf myhomebackup.tar.gz –exclude /home/erik/temp /home/erik

The –exclude will give you this option, just slip it in between the tar filename and the path your going to backup. This will exclude the whole temp directory.

You say “Ok this tar thing is pretty cool but I want to backup only single files from all around the drive.

No problem, this requires a bit more work, but hey this is UNIX, get used to it.

Make a file called locations (call it anything you like). In locations place the full path to each file you want to backup on a new line. Please be aware that you have to have read rights to the files you are going to backup.

/etc/mail/sendmail.cf
/usr/local/apache/conf/httpd.conf
/home/erik/scripts

Now with the -T option I can tell it to use the locations file.

tar -zPvcf backup.tar.gz -T locations

Now if you want to backup the whole drive. Then you will have to exclude lots of files like /var/log/* and /usr/local/named/*

Using the -X option you can create an exclude file just like the locations file.

tar -zPvcf fullbackup.tar.gz -X /path/to/excludefile -T /path/to/locationsfile

Now a month has gone by and you need to update your myhomebackup.tar.gz with new or changed files.

This requires a extra step (quit your bitching I already told you why)
You have to uncompress it first but not untar it.

gunzip /path/to/myhomebackup.tar.gz

This will leave your myhomebackup.tar.gz mising the .gz.
Now we can update your tarball with -u and then we are going to compress it again.

tar -Puvf myhomebackup.tar /home/erik | gzip mybackup.tar

It will add the .gz for you.

Tar is a pretty old app and has lots of Fetchers.
I suggest reading the man pages to get a lits of all the options.

I have included a little perl script that I made so I can run it as cron job evernight and get a full backup each time.
It wouldn’t be that hard to update the tarball but I just like full backups.
Feel free to use it.

If you want to extract the tarball that is compressed

tar -zxvf filename.tar.gz

-x extract

If it is not compressed then

tar -xvf filename.tar

#!/usr/bin/perl
#sysbkup.pl
#Created by Erik Mathis hornet@fluidgravity.com 7/02

#Change These paths to fix your needs.
my $filename=”/home/sysbkup/backup”;
my $exclude=”/home/erik/exclude”;
my $data=”/home/erik/locations”;
my $tar=”\.tar”;
my $gz=”\.gz”;

$file=$filename.$tar.$gz;

system (“tar -Pzcvf $file -X $exclude -T $data”);

Read more at www.fedoraforum.org

XWiki On Debian 4 (Etch) – Tomcat – MySQL

XWiki is a professional wiki with enterprise features such as blog, strong rights management, LDAP authentication, PDF export, full skining and more. It also includes an advanced form and scripting engine making it a development environment for data-based applications. It has powerful extensibility features such as scripting in pages, plugins and a highly modular architecture. See the full feature list for more.

Read more at Howtoforge.com