Thursday, March 29, 2012

Installing Sun(oracle) Java bin file on Ubuntu

Here is the steps to install Oracle Java from bin file on ubuntu Server.
1. Download oracle jdk bin file.
2. Put downloaded file on your installation location for eg. /opt
3. Make the downloaded bin file executable
     sudo a+X jdk-6u31-linux-i586.bin
4. run the executable java bin file.
     sh ./jdk...bin
5.Update your installation
    sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.6.0_31/bin/java" 1
    sudo update-alternatives --set java /opt/jdk1.6.0_31/bin/java
6. Now check The current version of java
    java --verson

Tuesday, November 29, 2011

Install VNC Server on CentOS

First install vncserver as user root

#yum install vnc-server

then add user who runs vncserver
#adduser vncuser

Now setup VNC Password for this user

#su - vncuser

It ask password 2 times. You need this password to connect with VNC Viewer.

Now kill the VNC Server

$vncserver -kill :1

:1 is display number. Mostly it will be 1.

Type exit to go back to root shell.

Now edit /etc/sysconfig/vncservers

#vi /etc/sysconfig/vncservers

Add following content to the file, save and exit.

VNCSERVERARGS[1]="-geometry 1024x768"

Now start VNC Server

# service vncserver start

Now you will be able to connect to the server with SERVER-IP:1

To start VNC Server on boot

#chkconfig vncserver on

Tuesday, November 8, 2011

Installing PostgreSQL 9.1 on Ubuntu 11.04

first install python-software-properties:
sudo apt-get install python-software-properties

now add repository and update apt.
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update

now instal postgresql
sudo apt-get install postgresql-9.1 libpq-dev

Now change the postgres user password (still running as root):
su postgres
psql -d postgres -U postgres
alter user postgres with password 'a';

To install GUI client pgsql
sudo apt-get install pgadmin3