• Entries (RSS)
  • Comments (RSS)

NAGIOS 3 with notifications on twitter

Posted by | Posted in Experiments, How to, Linux, OpenSource, Resources, Social Networking, Tips and Tricks, Tutorials, Virtual Private Server | Posted on 16-08-2010

Tagged Under : , , , ,

I have been experimenting with NAGIOS3 on Ubuntu (I will write a how-to-install on NAGIOS later) and it has served me very good in monitoring my 7 VPS from different providers in different part of the world. I have already recorded 3 hours of downtime from ThrustVPS which is a great deal for me. I now know which VPS has the best time and which ones have hiccups (e.g. my 2Host VPS gave me two unreachable notifications but the VPS was running and still reports the uptime as 4 days).

Since I use twitter more, even when Im on the road, notifications via email is a bit slow for me. Luckily I found a great tutorial online to do that.

Read the rest of this entry »

Not getting a package on Ubuntu?

Posted by | Posted in How to, Resources, Reviews, Tips and Tricks, Tutorials, Ubuntu, Virtual Private Server | Posted on 25-07-2010

Tagged Under : , ,

If you are not getting a package on Ubunu using apt-get then chances are that it has not been updated in the /etc/apt/sources.list file

For example, the following should be there in the sources.list file if you are running Ubuntu 10.04 LTS (codename lucid)

## main & restricted repositories
deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted

deb http://security.ubuntu.com/ubuntu lucid-updates main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-updates main restricted

deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted

## universe repositories - uncomment to enable
deb http://us.archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid universe

deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe

deb http://security.ubuntu.com/ubuntu lucid-security universe
deb-src http://security.ubuntu.com/ubuntu lucid-security universe

How to install byte-unixBench on Ubuntu

Posted by | Posted in How to, Resources, Tips and Tricks, Tutorials, Ubuntu | Posted on 23-07-2010

Tagged Under : , , ,

From UnixBench project homepage:

UnixBench is the original BYTE UNIX benchmark suite, updated and revised by many people over the years.

The purpose of UnixBench is to provide a basic indicator of the performance of a Unix-like system; hence, multiple tests are used to test various aspects of the system’s performance. These test results are then compared to the scores from a baseline system to produce an index value, which is generally easier to handle than the raw scores. The entire set of index values is then combined to make an overall index for the system.

Some very simple graphics tests are included to measure the 2D and 3D graphics performance of the system.

Multi-CPU systems are handled. If your system has multiple CPUs, the default behaviour is to run the selected tests twice — once with one copy of each test program running at a time, and once with N copies, where N is the number of CPUs. This is designed to allow you to assess:

* the performance of your system when running a single task
* the performance of your system when running multiple tasks
* the gain from your system’s implementation of parallel processing

Do be aware that this is a system benchmark, not a CPU, RAM or disk benchmark. The results will depend not only on your hardware, but on your operating system, libraries, and even compiler.

First install required libraries for compilation :

apt-get install libx11-dev libgl1-mesa-dev libxext-dev perl  perl-modules make

Then get the unixbench and run it :

wget http://byte-unixbench.googlecode.com/files/unixbench-5.1.2.tar.gz
tar xvf unixbench-5.1.2.tar.gz
cd unixbench-5.1.2
./Run

Installing Lighttpd, PHP and MySQL on Ubuntu

Posted by | Posted in How to, Linux, OpenSource, PHP, Tips and Tricks, Tutorials, Ubuntu, Virtual Private Server | Posted on 19-07-2010

Tagged Under : , , , , , , , , ,

If you are not getting a package on Ubuntu, please check to see if your /etc/apt/sources.list file is updated. This is common with most VPS providers

On VPS, especially with challenging small memory limit (e.g. 64MB or 128MB) lighttpd is the best option instead of Apache. In this article I will show you how to do that. On a fresh box (which has no apache installed) type this to get lighttpd webserver installed

apt-get install lighttpd

Now install PHP5 CGI package and PHP5 command line package

apt-get install php5-cgi php5-cli

Edit the following file

nano /etc/php5/cgi/php.ini

and uncomment this line

cgi.fix_pathinfo = 1

Now enable fastcgi module

lighty-enable-mod fastcgi

Restart Lighttpd

/etc/init.d/lighttpd restart

You get the welcome page

Lets install MySQL 5.1 server and client

apt-get install mysql-server mysql-client

and optionally phpMyAdmin

apt-get install phpmyadmin

Now create a test page to see if phpinfo is all Ok

nano /var/www/info.php

Type in the following

<?php
phpinfo();

How to change “-bash-*”?

Posted by | Posted in CentOS, How to, Linux, Thoughts, Tips and Tricks, Ubuntu, Virtual Private Server | Posted on 23-06-2010

Tagged Under : , ,

If you are seeing this in your bash (SSH), It makes it tough to navigate through SSH since it doesn’t give you much information.

-bash-3.2#

To fix that, you can simply type this in your SSH when logged in:

PS1="[\u@\h \W]\$ "

PHP Depreciated errors on Ubuntu 10.04 LTS

Posted by | Posted in How to, Linux, PHP, Tutorials, Ubuntu | Posted on 21-06-2010

Tagged Under : , , , , , ,

If you have installed LAMP (Apache, MySQL and PHP on Ubuntu 10.04 LTS) then running this on SSH

php -v

would be giving you certain PHP Depreciated warning like these

root@sea:~# php -v
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/idn.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP 5.3.2-1ubuntu4 with Suhosin-Patch (cli) (built: Apr  9 2010 08:23:39)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Its a noted bug with Ubuntu and changes may be pushed soon but to fix this just edit each of these files and replace comments starting with ‘#‘ to ‘;‘.

Set mysql’s root password on fresh copy from SolusVM OS template

Posted by | Posted in Linux, Virtual Private Server | Posted on 20-06-2010

Tagged Under : , , , , , , ,

On SolusVM, your host may provide you with OS templates such as “Ubuntu 10.04 LTS LAMP” and you click-install it to your VPS. Now how do you change its mysql’s root password? simple, run these two commands on SSH after doing

mysql
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;

Install PHP5 ADOdb extension on Ubuntu

Posted by | Posted in How to, Linux, OpenSource, PHP, Tips and Tricks, Tutorials, Ubuntu | Posted on 30-05-2010

Tagged Under : , , , , ,

ADOdb library is a very good data abstraction layer for PHP. Installing a PHP extension enables the library to auto-detect this and give even better performance. To install this library on Ubuntu 10.04 LTS do this

apt-get install php5-adodb

Installing T1LIB on Ubuntu

Posted by | Posted in How to, Linux, OpenSource, PHP, Tips and Tricks, Tutorials, Ubuntu | Posted on 29-05-2010

Tagged Under : , , , ,

I recently found out about T1LIB. But I had no clue how to install this. Lucky for me I am on Ubuntu and I have the ability to search for a package.

T1LIB is actually in the latest Ubuntu 10.04 LTS. You can install it by punching in the following command

apt-get install t1lib-bin

Build-Essentials in CentOS?

Posted by | Posted in CentOS, How to, Linux, Tips and Tricks, Tutorials, Ubuntu | Posted on 28-05-2010

Tagged Under : , , , , , ,

If you are like me, you may be doing this to install essential build libraries to compile something from source

# wrong method
yum install build-essential

:) Build essential is a Ubuntu / Debian package. On CentOS, you need to do this

yum groupinstall "Development Tools"

Warning: This will install all development tools approx 49 packages closing to 65MB

Get Adobe Flash playerPlugin by wpburn.com wordpress themes