关于jdk-6u45-linux-x64-rpm.bin环境变量的奇怪问题

Java_er 2016-04-30 06:13:52
jdk-6u45-linux-x64-rpm.bin

今天下载了这个jdk的版本,不是说rpm.bind 文件

./jdk-6u45-linux-x64-rpm.bin
之后会有一个解压的目录吗,会生成./jdk-6u45-linux-x64-rpm

而我的生成了好多的rpm文件,而且,尽然自动给我把JDK给装上了

不科学吧。

还有环境变量他也给我设置了,奇怪的是,我找不到他这个环境变量设置在哪里了。

/etc/profile文件:

# /etc/profile

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

# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.

pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}


if [ -x /usr/bin/id ]; then
if [ -z "$EUID" ]; then
# ksh workaround
EUID=`id -u`
UID=`id -ru`
fi
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi

# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
pathmunge /sbin after
fi

HOSTNAME=`/bin/hostname 2>/dev/null`
HISTSIZE=1000
if [ "$HISTCONTROL" = "ignorespace" ] ; then
export HISTCONTROL=ignoreboth
else
export HISTCONTROL=ignoredups
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

# By default, we want umask to get set. This sets it for login shell
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
umask 002
else
umask 022
fi

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "${-#*i}" != "$-" ]; then
. "$i"
else
. "$i" >/dev/null 2>&1
fi
fi
done

unset i
unset -f pathmunge



env set 输出 均没看到Java相关的设置啊。啥情况,给java的环境变量相关配置,配置到哪里去了?
谢谢。
...全文
303 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
cqyy725 2016-05-11
  • 打赏
  • 举报
回复
.bin 文件本身就可以直接安装,不需要解压。。/etc/profile 下如果没有的话,你可以看看用户目录下的.bash_profile
ip621918 2016-05-08
  • 打赏
  • 举报
回复
谢谢分享,楼主
Java_er 2016-05-07
  • 打赏
  • 举报
回复
引用 1 楼 renwotao2009 的回复:
/etc/profile 看看有没有写入配置
这个文件肯定是没有写入的。
fly 100% 2016-05-03
  • 打赏
  • 举报
回复
还有个init的文件夹里面好像可以设置,反正启动文件里面设置
renwotao2009 2016-05-02
  • 打赏
  • 举报
回复
/etc/profile 看看有没有写入配置

19,619

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧