Beranda > Database, Linux, System Administrator > Installasi JDK, TOMCAT, POSTGRESQL

Installasi JDK, TOMCAT, POSTGRESQL

INSTALL TOMCAT, POSTGRESQL, OPENJDK DI UBUNTU 12.04 SERVER

Install OpenSSH untuk remote ssh ke server tersebut
# apt-get install openssh-server
INSTALL JDK dan JRE
Download JDK dan JRE di download.oracle.com dan transfer ke server via FTP atau SCP
#sudo mkdir -p /usr/lib/jvm
#cd ~/
Pindahkan JDK dan JRE ke direktori yang telah dibuat
# sudo mv jdk-7u9-linux-i586.tar.gz /usr/lib/jvm
# sudo mv jre-7u9-linux-i586.tar.gz /usr/lib/jvm
# cd /usr/lib/jvm
Extract compressed file
# sudo tar zxvf jdk-7u9-linux-i586.tar.gz
# sudo tar zxvf jre-7u9-linux-i586.tar.gz
# ls -l
jdk1.7.0_40
jre1.7.0_40
Run Install JRE dan JDK
# sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/lib/jvm/jdk1.7.0_40/bin/javac” 1
# sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jre1.7.0_40/bin/java” 1

Define JRE dan JDK
# sudo update-alternatives –set “javac” “/usr/lib/jvm/jdk1.7.0_40/bin/javac”
# sudo update-alternatives –set “java” “/usr/lib/jvm/jre1.7.0_40/bin/java”
# sudo nano /etc/profile

Define JAVA_HOME letakan di paling bawah konfigurasi :
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_40
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
export PATH

# java –version
Akan tampil java version

INSTALL TOMCAT
# sudo apt-get update
# sudo apt-get install tomcat7
# sudo service tomcat7 stop
# sudo nano /etc/default/tomcat7

Ganti dan sesuaikan JAVA_HOME dengan version yang terinstall
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_40
Save, sekarang tomcat sudah bisa running dengan JDK.
# sudo service tomcat7 start
# /usr/share/tomcat7/bin/version.sh

ENABLE FIREWALL
# sudo ufw enable 8080/tcp
# wget localhost:8080

INSTALL POSTGRESQL
# sudo apt-get install postgresql postgresql-contrib
# updatedb
# locate pg_hba.conf

Tambahkan network trusted yang boleh mengakses database server.
Download Driver Postgres sesuai versi
# cp postgres.jar /usr/share/tomcat7/lib/

  1. Belum ada komentar.
  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s