If a man speaks in a forest, and his wife's not there, is he still wrong?

java on CentOS 5

I recently needed to install Java onto a CentOS 5 machine.
Instructions are available at http://wiki.centos.org/HowTos/JavaOnCentOS but I found that they didn't work with the latest JDK from Sun.
Here's what I did:
  1. Set up a non-root user to build RPMS and create the rpmbuild environment.
    The easiest way to do this is to install fedora-rpmdevtools and run "fedora-buildrpmtree"
  2. Install jpackage-utils with yum
  3. Get the binary java sdk from Sun (http://java.sun.com/javase/downloads/index.jsp).
    I used jdk-6u2-linux-i586.bin.
    Put this in ~/rpmbuild/SOURCES
  4. Get the corresponding nosrc rpm from jpackage. I used http://mirrors.dotsrc.org/jpackage/1.7/generic/SRPMS.non-free/java-1.6.0-sun-1.6.0.2-1jpp.nosrc.rpm.
    Put this in ~/rpmbuild/SRPMS
  5. Rebuild the SRPM:
    rpmbuild --sign --rebuild ~/rpmbuild/SRPMS/java-1.6.0-sun-1.6.0.2-1jpp.nosrc.rpm

You should now have the following RPMS in ~/rpmbuild/RPMS/i586:

java-1.6.0-sun-1.6.0.2-1jpp.i586.rpm
java-1.6.0-sun-alsa-1.6.0.2-1jpp.i586.rpm
java-1.6.0-sun-demo-1.6.0.2-1jpp.i586.rpm
java-1.6.0-sun-devel-1.6.0.2-1jpp.i586.rpm
java-1.6.0-sun-fonts-1.6.0.2-1jpp.i586.rpm
java-1.6.0-sun-jdbc-1.6.0.2-1jpp.i586.rpm
java-1.6.0-sun-plugin-1.6.0.2-1jpp.i586.rpm
java-1.6.0-sun-src-1.6.0.2-1jpp.i586.rpm

You may now install these on your other CentOS 5 servers

I did run into one small gremlin, post-install...

The java-1.6.0-sun-jdbc RPM required libodbc.so and libodbcinst.so. These are provided by the unixODBC and unixODBC-devel RPMS, except that they only declare that they provide libodbc.so.1 and libodbcinst.so.1 so the java-1.6.0-sun-jdbc RPM won't install.

I worked around this by modifying the spec file as described here: http://forums.fedoraforum.org/showpost.php?p=339048&postcount=3

Story Options

java on CentOS 5 | 0 comments
The following comments are owned by whomever posted them. This site is not responsible for what they say.

Topics

  • Home
  • Misc (6/0)
  • Audio (5/0)
  • Linux (21/0)
  • Family (1/0)
  • Fishing Diary (1/0)
  • OpenSolaris (7/0)
  • Computing (11/0)
  • General News (7/0)
  • Chloe (1/0)
  • Emily (2/0)
  • Twins (5/0)
  • Classifieds (2/0)
  • GeekLog (2/0)
  • Project Management (1/0)
  • User Functions






    Lost your password?