Remove Ubuntu from Dual boot

Author posted by Jitendra on Posted on under category Categories Linux and tagged as Tags , with Leave a comment on Remove Ubuntu from Dual boot

How to remove ubuntu from system and use previously installed Windows XP/ Vista.

If you want to remove ubuntu then some people may ask “why not just delete Ubuntu partitions?”.  No we can’t do like this because Ubuntu installs a boot loader called GRUB into the Master Boot Record (MBR), if you delete Ubuntu partitions all the data will be deleted but not GRUB!  So when your restart your PC, GRUB will look for Ubuntu , when it does not find Ubuntu it show some error and you cannot even boot into windows. So here I’m going to show you two ways to safely remove Linux.
First (Using MbrFix)

  1. Download mbfix from here
  2. Extract all files in mbrfix.zip to C:.
  3. Open Command Prompt (start->run-> type cmd -> OK).
  4. Type cd and press enter.
  5. Then type mbrfix /drive 0 fixmbr /yes and press enter.
  6. Now you can delete Ubuntu partitions (/, swap etc) using Easeus Partition Manager or Windows Disk Management or other partition editor.
  7. Restart your PC.

This will overwrite GRUB with Windows boot loader . So you will see Windows boot loader instead of GRUB.

Second (Using Windows CD)

XP Users:

  1. Boot your PC with Windows XP CD and select Repair.
  2. Then select the OS, once you are there you’ll have a command line.
  3. Type Administrator password. If Admin password is blank, just press Enter.
  4. Type fixmbr, and then press Enter.
  5. Restart PC.
  6. Delete Ubuntu Partitions.

Vista Users:

  1. Boot PC with Windows Vista installation disc.
  2. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
  3. Click Repair your computer.
  4. Click the operating system that you want to repair, and then click Next.
  5. In the System Recovery Options dialog box, click Command Prompt.
  6. Type Bootrec.exe, and then press Enter.
  7. Delete Ubuntu Partitions.

This will also overwrite GRUB with Windows boot loader.

Create Cron job to run PHP Script in Cpanel

Author posted by Jitendra on Posted on under category Categories Linux and tagged as Tags , , with 1 Comment on Create Cron job to run PHP Script in Cpanel

Hi All,

Today i just want to share that how to create  a cron job in Cpanel to run the PHP script.

I hope everyone knows that what is Cron job : it is the task schedule in Linux which will run on predefined time interval. its same concept like schedule tasks in Windows OS.

To create the cron job, open the Cpanel and select “cron jobs”.

Select Cron job in Cpanel

You can see that in drop down list there are lots of common schedules of crone job, you can select it, or create your own schedules.

Common settings in Cpanel

In Command text box, write the PHP program path and file to be executed like:

/usr/local/bin/php -q /home/<username>/script.php


to find the path to php,
log on to the server with SSH, then run this command:
“”””””””””””-
which php
or
whereis php
“”””””””””””””-
This will give you the path to the php executable, probably:
/usr/local/bin/php

How to Install java on Ubuntu 10 and Ubuntu 11

Author posted by Jitendra on Posted on under category Categories JAVA, Linux and tagged as Tags , , with Leave a comment on How to Install java on Ubuntu 10 and Ubuntu 11
Run below command on the terminal of ubuntu to install the JAVA.
Ubuntu 10 :
	$ sudo add-apt-repository "deb http://archive.canonical.com/lucid partner"
	$ sudo apt-get update
	$ sudo apt-get install sun-java6-jdk
	$ sudo apt-get install sun-java6-jre

Ubuntu 11:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-jre
sudo update-alternatives --config java

Install MySQL and Query Browser in Ubuntu

Author posted by Jitendra on Posted on under category Categories Linux and tagged as Tags , , , , with 12 Comments on Install MySQL and Query Browser in Ubuntu

To open the Terminal, go to Application > Accessories > Terminal

Open terminal in ubuntu
Open terminal in ubuntu

Type the following command at terminal.

  • $sudo apt-get install mysql-server
console screen look like during downloading the mysql in Ubuntu
console screen look like during downloading the mysql in Ubuntu

  • mysql comes with no root password. To set the root password, type:

$mysqladmin -u root password your-new-password

$sudo /etc/init.d/mysql restart

  • Install mysql query browser

$sudo apt-get install mysql-query-browser

  • After installing, go to Applications > Programming > MySQL Query Browser to connect to mysql as shown below.
open mysql query browser in ubuntu
open mysql query browser in ubuntu

Enter Server Hostname, Username and Password. Click on Connect and MySQL is now installed on Ubuntu.

Connect to MySQL using Query Browser in Ubuntu
Connect to MySQL using Query Browser in Ubuntu