How to install jre in RHEL5?

Source: Internet
Author: User
How to install jre in RHEL5? -- Linux general technology-Linux technology and application information. For details, refer to the following section. Ladies and gentlemen, I downloaded the jre-6u22-linux-i586.bin, refer to the installation instructions, After configuring the environment variables, now execute java-version, still prompt that the java command is not found.
Jre is installed in/usr/local/java, and the Directory generated after the jre-6u22-linux-i586.bin is executed is:
[Root @ localhost java] # ll
Total 20772
Drwxr-xr-x 8 root 4096 10-16 jre1.6.0 _ 22
-Rwxrwxrwx 1 root 21226886 10-16 jre-6u22-linux-i586.bin

The following is the configuration of/etc/profile. Let's take a look at what went wrong? Thank you !!!
#/Etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in/etc/bashrc

Pathmunge (){
If! Echo $ PATH |/bin/egrep-q "(^ |:) $1 ($ |:)"; then
If ["$2" = "after"]; then
PATH = $ PATH: $1
Else
PATH = $1: $ PATH
Fi
Fi
}

# Ksh workaround
If [-z "$ EUID"-a-x/usr/bin/id]; then
EUID = 'id-U'
UID = 'id-ru'
Fi

# Path manipulation
If ["$ EUID" = "0"]; then
Pathmunge/sbin
Pathmunge/usr/sbin
Pathmunge/usr/local/sbin
Fi

# No core files by default
Ulimit-S-c 0>/dev/null 2> & 1

If [-x/usr/bin/id]; then
USER = "'id-UN '"
LOGNAME = $ USER
MAIL = "/var/spool/mail/$ USER"
Fi

HOSTNAME = '/bin/hostname'
History Size = 1000

If [-z "$ INPUTRC"-! -F "$ HOME/. inputrc"]; then
INPUTRC =/etc/inputrc
Fi
Export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

For I in/etc/profile. d/*. sh; do
If [-r "$ I"]; then
. $ I
Fi
Done

Unset I
Unset pathmunge

JAVA_HOME =/usr/local/java/jrel.6.0 _ 22
JAVA_BIN =/usr/local/java/jrel.6.0 _ 22/bin
Export JAVA_HOME JAVA_BIN
============================================
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.