|
| ||||||||||
| Tags: centos, java, jdk, oracle, yum |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to Install Java on CentOS
Installing the necessary software equipment. Installation through yum. If you use CentOS 5, you need to do the following to install or update the necessary packages: Code: yum -y install rpm-build gcc gcc-c++ redhat-rpm-config automake autoconf yum -y install xorg-x11-font-utils chkfontpath ttmkfdir Creating user to use rpmbuild. Is inconvenient and poses a high irrigation use rpmbuild as root. Therefore it is recommended to create a user account devoted exclusively to use the rpmbuild command. Code: su - root useradd rpmbuilduser passwd rpmbuilduser In order to work comfortably, you will create a suite of user directories that will be used to create RPM package. Code: su - rpmbuilduser
mkdir-p ~ / rpmbuild / {SOURCES, SRPMS, SPECS, RPMS, TMP, BUILD} Code: % _topdir / Home / rpmbuilduser / rpmbuild
% _tmppath% {_topdir} / TMP
% _unpackaged_files_terminate_build 0
% Packager My Name
% Distribution My distribution or workspace.
% My company vendor. Then you must download the Oracle JDK. If you are using a x86 architecture, you must make the downloaded file executable using the following command: Code: chmod + x jdk-6u14-linux-i586.bin Code: mv jdk-6u14-linux-i586.bin ~ / rpmbuild / SOURCES / Code: chmod + x jdk-6u14-linux-x64.bin Code: mv jdk-6u14-linux-x64.bin ~ / rpmbuild / SOURCES / Code: rpmbuild - rebuild java-1.6.0-sun-1.6.0.14-1jpp.nosrc.rpm Code: java-1.6.0-sun-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-alsa-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-demo-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-devel-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-fonts-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-jdbc-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-plugin-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-src-1.6.0.14-1jpp.i586.rpm Code: cd ~/rpmbuild/RPMS/i586/ su rpm -Uvh java-1.6.0-sun-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-alsa-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-fonts-1.6.0.14-1jpp.i586.rpm java-1.6.0-sun-plugin-1.6.0.14-1jpp.i586.rpm exit Code: java-1.6.0-sun-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-alsa-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-demo-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-devel-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-fonts-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-jdbc-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-plugin-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-src-1.6.0.14-1jpp.x86_64.rpm Code: cd ~/rpmbuild/RPMS/x86_64/ su rpm -Uvh java-1.6.0-sun-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-alsa-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-fonts-1.6.0.14-1jpp.x86_64.rpm java-1.6.0-sun-plugin-1.6.0.14-1jpp.x86_64.rpm exit Code: / Usr / sbin / alternatives - config java Code: There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
* + 1 / usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 / usr/lib/jvm/jre-1.6.0-sun/bin/java
Press Enter to keep the current selection [+], or type the
selection number: To verify that the version of Java 1.6 has been installed correctly, just simply run the following command: Code: java-version Code: cd /usr/lib/mozilla/plugins/ ln -s /usr/lib/jvm/java-1.6.0-sun-1.6.0.14/jre/lib/*/libjavaplugin_jni.so ./ |
|
#2
| |||
| |||
| Re: How to Install Java on CentOS
Lately I've been working on a CentOS server for its cloning of another 13 nodes of our computing cluster and found myself struggling with the 'installation of Java on this distribution derived from Red Hat. Unfortunately, although the Sun has recently released its entire Ambaradan Java under a free license, this came too late for the project CentOS (but also other distributions) could include their packages in the release phase of the release of the family 5. This, however, should be resolved when CentOS 6 will be released. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to Install Java on CentOS" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to install rpm in CentOS 5.5? | Man-Than | Operating Systems | 5 | 06-05-2011 10:39 AM |
| Unable to install Centos using FTP | Mystic01 | Networking & Security | 4 | 02-05-2011 10:42 PM |
| How to install VLC on CentOS 5.4 | Ashert | Windows Software | 4 | 18-09-2010 09:13 PM |
| Install GIT on CentOS 5 | CentOS-DollarUser | Operating Systems | 3 | 18-08-2009 11:03 PM |
| Install vlc player on CentOS 5 | CentOS-DollarUser | Operating Systems | 3 | 30-07-2009 05:10 PM |