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 |
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 |
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. .. .. :) |
that works!
knudfl : thank you. that works.
yum and apg-get : I am learning to use them regularly. BR, ~A |
|
All times are GMT -5. The time now is 10:51 AM. |