Andrea Girardi - It's my blog!

Tag: Ubuntu

Installing Parallels Tools in Linux Virtual Machine

Sometime happens you need to manually mount the cdrom to be able to install the Parallels Tools. Follow these instructions to do that:

1) Start the virtual machine. When the guest OS boots up, choose Install Parallels Tools from the Virtual Machine menu.

At this point, the prl-tools-lin.iso image file will be connected to the virtual machine’s CD/DVD drive.

2) Start a terminal in your Linux guest OS. Type the following command to gain the root privileges:

sudo su -

3) ount the Parallels Tools installation disc image, enter the following:

mount -o exec /dev/cdrom /media/cdrom

Note: /dev/cdrom is the virtual machine’s CD/DVD drive and /media/cdrom is the mount point for this device. In some of the Linux operating systems the virtual CD/DVD drive may appear as /dev/hdb and the mount point /mnt/cdrom. Some Linux OSs do not have the CD/DVD drive mount point. In this case, you should create the mount point directory manually.

4) When the installation disc image is mounted, change the directory to the CD/DVD drive directory using

cd /media/cdrom/

In the CD/DVD drive directory, enter the following to launch Parallels Tools installation:


Note: You must have the root privileges to run this command.

Follow the Parallels Tools Installer instructions to complete the installation.

How to switch between different JVM in Ubuntu

Sometime is needed to install different JVM on Ubuntu server due to application compatibility or software development purposes. To switch between different JVM in ubuntu from command line, use this command:

sudo update-alternatives --config java

and this menu will appear:

There are 2 choices for the alternative java (providing /usr/bin/java).
  Selection    Path                                            Priority   Status
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
  1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

If the database is running, probably the database hasn’t registered yet with the listener. This occurs when the database or listener just starts up. To fix, connect as sysdba:

SHOW parameter LOCAL listener

If something or nothing appears, reset it with:

ALTER system SET local_listener='(address=(protocol=tcp)(host=localhost)(port=1521))';
ALTER system register;

At this point test if it’s working fine:

tnsping xe
TNS Ping Utility for Linux: Version - Production on 26-NOV-2012 17:04:16
Copyright (c) 1997, 2011, Oracle.  All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
OK (0 msec)

Ubuntu md5 hash of a string

Just use md5sum with no options:

echo 'String' | md5sum

Apt-get: Cannot initiate the connection to 8080:80

To fix this issue, open the apt.conf configuration file:

vi /etc/apt/apt.conf

Add this row or check it if already exists:

Acquire::http::proxy “http://proxy.localdomain:8080/”;

Oracle admin on Ubuntu server

To be able to admin Oracle instance from sqlplus command line on Ubuntu server, for first you need to set the enviroment variables:

source /u01/app/oracle/product/11.2.0/xe/bin/

At this point, is possible to login as sysdba using:

sqlplus / as sysdba

if you get insufficient privileges error, you need to add your user to dba group:

usermod [username] -G oracle, dba

a this point is possible to startup and shutdown the Oracle instance on sqlplus prompt using:


Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto

To install Orace 11gR2 Express Edition, please take a look to this tutorial (tutorial? THE TUTORIAL!)

Copyright © 2017 Andrea Girardi – It's my blog!

Theme by Anders NorenUp ↑