Friday, October 30, 2009

Installing Nagios 3 on Ubuntu Server 9.10

Follow these steps to installing Nagios 3 on Ubuntu 9.10 Karmic Koala Server Edition:
# sudo apt-get install nagios3
Just follow on-screen instruction. After that, setting up user to access the Nagios web interface:
# sudo htpasswd -c htpasswd.users nagios
   New password:
   Re-type new password:
   Adding password for user nagios
Open up http://localhost/nagios3, enter your username and password you've just created. For configuring the services and hosts you want to monitor, go to /etc/nagios3/conf.d directory and you will see several base file for nagios (.cfg). For now, Nagios 3 is already running and what you have to do next.. configuring your host file for monitoring purposes.

OpenVPN on PocketPC

I'm using OpenVPN client on my Palm Treo Pro to connect to OpenVPN server at my office. After connecting I can access my PC and doing some work stuffs. All you need is .ovpn file and several key files (simply asked your OpenVPN server Admin to generate them for you)

What important is how you configure your .ovpn file. You can see below my sample-config. Please note that I'm using two backslashes, instead of one, to mention location of config folder and files.

* sample config of my .ovpn file:

     client
     port 1194
     dev tun
     proto udp
     remote [ your openVPN server]
     resolv-retry infinite
     nobind
     persist-key
     persist-tun
     redirect-gateway def1

     ca "\\Program Files\\OpenVPN\\config\\ca.crt"
     cert "\\Program Files\\OpenVPN\\config\\[yourfile].crt"
     key "\\Program Files\\OpenVPN\\config\\[yourfile].key"
     tls-auth "\\Program Files\\OpenVPN\\config\\tls-auth.key" 1
     cipher AES-256-CBC
     ns-cert-type server
     comp-lzo
     verb  3

Another files you must provide is the key files. Put them (.ovpn and key files) in the same directory, usually under config folder on installation directory.

This config already tested and works perfectly :)

Upgrade From Ubuntu 9.04 to 9.10 Server Edition

Ubuntu 9.10 Karmic Koala Server Edition is available for download, but if you already used Ubuntu 9.04 Jaunty Jackalope Server Edition, you can do these steps to upgrade to 9.10. Here are what you have to do:

1. install update-manager-core package (in case it's not installed yet)
2. edit /etc/update-manager/release-upgrades
Prompt=normal
3. # sudo do-release-upgrade -d
4. wait till upgrade process succeed


And if you have Desktop System, you can do these:

1. Press Alt+F2 on your GUI
2. Type in "update-manager -d" (without quotes)
3. Update Manger should open up, and you can see "New distribution release '9.10' is available"
4. Press the 'Upgrade' button, and wait till upgrade process succeed

Thursday, October 29, 2009

Dual Boot-ing Windows 7 and Ubuntu Jaunty 9.04 Server Edition

I just succesfully implementing dual boot Windows 7 and Ubuntu Jaunty, using Windows 7 Bootloader, with the help of awesome application called EasyBCD. My first trial was using GRUB Bootloader (install to MBR), with the result "BOOTMGR is missing". Apparently my GRUB installation on MBR, not just failed, but also destroyed Windows 7 Bootloader.

Here is my disk partition mapping, my harddisk size is 80GB:
# Primary partition
/dev/sda1 100mb - automatically created with Windows 7 installation
/dev/sda2 32gb - Windows 7 installation

# Logical partition - Ubuntu
/dev/sda5 100mb - boot
/dev/sda6 2gb - swap
/dev/sda7 10gb - root
/dev/sda8 32gb - home

Before installing Windows, I move the GRUB installation from MBR to my root partition. This way, I can switch between Windows 7 bootloader and GRUB bootloader.

After installing Windows 7, download and install EasyBCD, run it, then go to add/remove Entries:


image courtesy to Neosmart

In Drive, choose your root partition, click 'Add Entry' button, then Save. That's it! Restart your computer, and you'll get Bootloader to choose your Operating System :)