LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-08-2010, 04:14 AM   #1
anjanbacchu
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Rep: Reputation: 0
Question how to install java and tomcat to CentOS release 5.4


hi there,

greetings!

I'm a mid-level user on linux desktop but a noob admin on CentOS Server. Haven't installed much stuff -- Thanks in advance for helping.

Got a godaddy Virtual Dedicated Server(VDS), which is a VPS that runs CentOS release 5.4.

It already has java 6.0(OpenJDK) installed in /usr/bin/java. I would like to upgrade or install another version of java (sun's JDK 6.0_20) and apache tomcat 6.0.26 application server (http://tomcat.apache.org/download-60.cgi). I don't mind using OpenJDK but I prefer Sun's JDK since it's more stable and works better.

I have ssh access to this CentOS server. Can someone help me
a) download sun's JDK (http://java.sun.com/javase/downloads/widget/jdk6.jsp)
b) download tomcat for linux (http://tomcat.apache.org/download-60.cgi)
c) install java
d) install tomcat

Once I do that I'd like tomcat to run as a daemon. From previous experience, I know that we create a script in /etc/init or /etc/init.d/ directory. This script helps in starting/stopping and restarting tomcat.

Also, how do I get and install midnight commander (the file manager) ?

I'll be glad to help you help me,

Thank you so much,

BR,
~A
 
Old 06-08-2010, 04:30 AM   #2
anjanbacchu
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
downloaded sun's java but have trouble installing it

hi all,

thanks for your responses.

I went ahead and downloaded java and tomcat using following commands
a) wget http://mirror.candidhosting.com/pub/...-6.0.26.tar.gz
b) wget http://cds.sun.com/is-bin/....jdk-6u...x-i586-rpm.bin

After downloading the above, I started installing java.

$ chmod +x jdk-6u20-linux-i586-rpm.bin
$ ./jdk-6u20-linux-i586-rpm.bin
.
.
.
.

Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u20-linux-i586.rpm
inflating: sun-javadb-common-10.5.3-0.2.i386.rpm
inflating: sun-javadb-core-10.5.3-0.2.i386.rpm
inflating: sun-javadb-client-10.5.3-0.2.i386.rpm
inflating: sun-javadb-demo-10.5.3-0.2.i386.rpm
inflating: sun-javadb-docs-10.5.3-0.2.i386.rpm
inflating: sun-javadb-javadoc-10.5.3-0.2.i386.rpm
error: can't create transaction lock on /var/lib/rpm/__db.000
Installing JavaDB
error: can't create transaction lock on /var/lib/rpm/__db.000

Done.
[temp]$ sudo ./jdk-6u20-linux-i586-rpm.bin

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Password:
vhosting is not in the sudoers file. This incident will be reported.
audit_log_user_command(): Connection refused
[ temp]$

What did I do wrong ? How do I go about installing Java (and tomcat) ?

thank you,

BR,
~A
 
Old 06-08-2010, 06:22 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,744

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
No 'sudo' by default on CentOS ? Unless you set it up.

The most easy way to install Sun java jdk on CentOS 5.4 :
Use the "all in one" rpm package :
http://ftp.scientificlinux.org/linux...0-fcs.i586.rpm
>>> jdk-1.6.0_20-fcs.i586.rpm
.. Then everything will usually be configured automatically.

Install with : 1) su
2) rpm -Uvh jdk-1.6.0_20-fcs.i586.rpm

You can of course use the packages, you already unpacked,
but you will then have to manually configure the links.
http://www.linuxquestions.org/questi...-jre-806269/#2
> Post #2.
..

Tomcat , probably ..
# yum install tomcat5 tomcat5-jsp tomcat5-servlet
And # yum search tomcat
.. to see all available tomcat packages.
..
.. And welcome to LQ. .. ..

Last edited by knudfl; 06-23-2010 at 04:11 PM.
 
Old 06-11-2010, 03:49 AM   #4
anjanbacchu
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
that works!

knudfl : thank you. that works.

yum and apg-get : I am learning to use them regularly.

BR,
~A
 
Old 06-11-2010, 08:21 AM   #5
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,266

Rep: Reputation: 99
See this http://www.linuxquestions.org/questi...tomcat-803925/
 
  


Reply

Tags
centos5, install, java, tomcat6


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java install help (heading towards tomcat) twistedrhymes Ubuntu 4 08-16-2010 11:55 AM
uable to install Xerox phaser3121 in CentOS release 5.2 Manohart24 Linux - Newbie 1 05-26-2009 07:06 PM
JAVA SDK install on CentOS CY83R-R0N1N Linux - Newbie 3 05-24-2006 11:17 PM
how to install java & tomcat server in linux adityakumar Linux - Software 2 06-04-2005 10:51 PM
install Java (Servlet), Tomcat on Fedora need help. learn Fedora 2 02-24-2004 11:28 PM


All times are GMT -5. The time now is 11:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration