Friday, November 12, 2010

Tips on Virtual Box

If you are using any Virtual box , then you mustt add your user name to the vboxgusers group, So that you get access to the USB system in Windows XP i.e.

usermod -A vboxusers

Sunday, July 18, 2010

Install Oracle 10g XE on ubuntu

1) download oracle  oracle-xe-universal_10.2.0.1-1.0_i386.deb from the oracle official website


Then

sudo dpkg -i oracle-xe-universal_10.2.0.1-1.0_i386.deb



2) sudo /etc/init.d/oracle-xe configure

It will ask the value for some option like

Specify the HTTP port that will be used for Oracle Application Express [8080]:7070


By default the port number is 8080, be care full make sure the same port is not used by any other process, In my case tomcat is already on 8080 so i changed to 7070.

Similarly :
Specify a port that will be used for the database listener [1521]:1521

Then Specify the Password and confirm password  and restart the datatabase like

Specify a password to be used for database accounts.  Note that the same
password will be used for SYS and SYSTEM.  Oracle recommends the use of
different passwords for each database account.  This can be done after
initial configuration:
Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y








It Will restart the oracle and now oracle ready to use

You can try it from SQL command line or from http://127.0.0.1:7070/apex

In the above link change the port number accordingly ,what ever you mentioned in the configuration file

from the command line  of SQL, give the command
connect system/manager   i.e

Note: The default database name of 10g is xe.

Tuesday, July 6, 2010

Size of a Symbolic Link In UNIX

Check the Below Example:

lrwxrwxrwx 1 root root 8 Dec 8 2008 swbt -> /nas/usr
lrwxrwxrwx 1 root root 10 Dec 5 2008 tmp -> ../var/tmp

In the above llinks the sizes are 8 and 10 respectively . The Symbolic calculate the size according to the
number of the charaters in the link Path i.e

/nas/usr has 8 characters So the Size is 8

../var/tmp has 10 character So the Size is 10

Tuesday, June 15, 2010

Installing Sun Java On Ubuntu/Debian

Installing Sun Java On Ubuntu/Debian




Download latest Java JDK from http://java.sun.com/j2se/1.5.0/download.jsp

(being sure not to download the .rpm, but rather the .bin)

install java-package with apt-get

(that includes binutils, fakeroot)

(Note also that java-package is in “multiverse”, so your repository list /etc/apt/sources.list needs to have that enabled)

make debian java package:

Disregarding the errors, in a tmp dir where we have copied the downloaded jdk, we do (without using sudo):



fakeroot make-jpkg jdk-1_5_0_05-linux-i586.binwhich, after ok’ing the license and extracting stuff, and trundling,after a while creates sun-j2sdk1.5_1.5.0+update06_i386.deb

then we install our newly made package, this time with sudo:



sudo dpkg -i sun-j2sdk1.5_1.5.0+update06_i386.deb“Once you’ve installed it, you’ll be up and running with the latest jdk: your JAVA_HOME is now, for example, /usr/lib/j2sdk1.5-sun. Get a command line, and enter java -version: you should see something like:


Now you have java :)

Friday, May 7, 2010

How To Restore Grub In Ubuntu

Boot up your live CD


In the desktop, open terminal (Applications -> Accessories -> Terminal).





sudo grub





This will set it to grub mode





find /boot/grub/stage1





This will locate your boot partition. If you already know the location, you can ignore this step.

root (hd0,0)

Replace the (hd0,0) by your boot partition number. If your Ubuntu is installed in the second partition, then change it to (hd0,1)

setup (hd0)
quit

Reboot your system. You should be able to access the Grub bootloader now.

How To Restore Grub In Ubuntu

Boot up your live CD


In the desktop, open terminal (Applications -> Accessories -> Terminal).





sudo grub





This will set it to grub mode





find /boot/grub/stage1





This will locate your boot partition. If you already know the location, you can ignore this step.

root (hd0,0)

Replace the (hd0,0) by your boot partition number. If your Ubuntu is installed in the second partition, then change it to (hd0,1)

setup (hd0)
quit

Reboot your system. You should be able to access the Grub bootloader now.

Thursday, May 6, 2010

Find the MAC address Remotely

If you can ping this host over the LAN/WAN, his MAC address will be cached in ARP table of your NIC for a while, so, from command prompt:


 ping 1.2.3.4

after some echo replies from host 1.2.3.4

arp -a

and you will see MAC address of 1.2.3.4

You can try to specific as

/sbin/arp -a 192.168.1.1


You can also Try : PSTOOLS (freeware from Sysinternals) PSEXEC