Restore GRUB 2

In most of the systems GRUB is now upgraded to 2.0 and with this update the old restore process have also changed now there is no grub command :) available.

If you have lost the Bootloader after a routine reinstall or due to any other reason try the following to restore

Boot Using a Live CD and try the following as root

grub-setup -d /media/XXXXX/boot/grub -m /media/YYYYY/boot/grub/device.map /dev/sda

Where XXXXX represents the root partition and YYYYY represents the partition holding the /boot in case you dont have a seperate partition for /boot then XXXX and YYYY would be be the same. /dev/sda may change depending on the system you are using.

Please note this would erase the current bootloader and install a new one for you if you are unsure of what you are doing do not try this

Using SQL * Plus on Command Line in Ubuntu

This blog post is an HowTo "Setup SQL*Plus to work on BASH" The commands illustrated in this howto are tested on Ubuntu 9.10 with Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production Installed.

What is SQL * Plus ?

SQL*Plus is a command line SQL and PL/SQL language interface and reporting tool that ships with the Oracle Database Client and Server software. It can be used interactively or driven from scripts. SQL*Plus is frequently used by DBAs and Developers to interact with the Oracle database.

Prerequisite

Oracle Database 10g Express Edition Release 10.2.0.1.0 Installed

Once you have Oracle 10g Installed successfully you can go to

Applications > Oracle Database 10g Express Edition > Run SQL Command Line

and successfully run all your SQL PL/SQL easily but using SQL*Plus directly on BASH is the real fun, Below are the steps which will enable you to use SQL*Plus on BASH

1) set ORACLE_HOME

4 Steps to add Ubuntu Systems to Active Directory Setup

The IT environment today in any organization is a sort of a mixture where many different Operating Systems are used, and Windows Active Domain Controller exists in majority of such organization.

Below is a 4 step How to on "Connecting Linux (Ubuntu) Systems to Active Directory Setup"

1) Update the Software Repositories

sudo apt-get update

2) Install Required Packages (likewise-open)

sudo apt-get install likewise-open

3) Join The Domain using Domain Administrator Account, replace Administrator with Domain Administrator Username and fqdn..domain with the Fully Qualified Domain Name

sudo domainjoin-cli join fqdn.domain Administrator

4) Update the Startup Scripts

sudo update-rc.d likewise-open defaults

Where .deb files are stored in Ubuntu ?

We always hear people saying ubuntu works well only when you have a strong internet connection as the Install CD doesn't contain all the packages required agreed now a CD cannot contain all the packages you require so you need to download the packages but there is a clear misunderstanding among new users that they always need to download these packages, Its essential to download them once but if you are reinstalling ubuntu on new machine you need not download these packages all over again if you have installed required packages on one of the machine you can use the content of below listed directory for installation

/var/cache/apt/archives

this directory contains the debian packages download by the apt-get :)

so have fun reuse the content for each install and save time and bandwidth

Search Engine Optimization using 301 Redirects

Search Engine Optimizations, i am very sure that all would have heard this term by now, in simple terms its a process of "making your website Search Engine friendly" there are various ways methods to do this, let me be very clear there is no specific way by which you can have a perfectly optimized website, in this post i discuss one of the methods by which you can remove the confusion of a search engine :).

Hosting a Website from Local Machine

I am sure you would have thought atleast once of hosting your website from your machine itself, if not the website atleast a sandbox version of it as it would be comparatively easy for you to maintain it so i discuss the steps you need to follow to achieve this, first lets go through the requirements, in this post i am talking about small sized sites a minor modified version of this post is applicable for large sites as well.

Requirements

1) A really broad Internet Connection.
2) A Static IP
3) A High End Machine (if the site you are hosting is pretty static a lower end machine is sufficient to be more clear a dynamic personal blog kind of site will also never need more than 1000 Mb of RAM unless you are the Top blogger of the country)
4) Server Software (Apache preferred)
5) A Database Server (if needed, mysql/postgresql recommended)
6) Scripting Support (might be PHP. perl, python as per the requirements)

Key Based Authorization with SSH

Using remote shells is all time favourite but remembering those many passwords is a pain so here are the steps to login using SSH without putting a password :)

 

1. Create a public ssh key, if you haven’t one already. Look at ~/.ssh. If you see a file named id_dsa.pub then you obviously already have a public key. If not, simply create one.

ssh-keygen -t dsa should do the trick. Please note that there are other types of keys, e.g. RSA instead of DSA.

2. Make sure your .ssh dir is not publically writable

    # chmod 700 ~/.ssh