Home >Java >javaTutorial >hadoop installation and maintenance 01--JDK environment deployment
Download jdk:
jdk-7u79-linux-x64.rpm
Install jdk:
rpm -ivh jdk-7u79-linux-x64.rpm
Configure java environment variables, edit /etc/profile:
#使用 rpm -ql 文件名 查询安装的路径vi /etc/profile #添加以下配置:export JAVA_HOME=/usr/java/jkd1.7.9_79export JAVA_BIN=$JAVA_HOME/binexport PATH=$PATH:$JAVA_BINexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Execute the following:, make the java environment variables take effect immediately
source /etc/profile
Query the jdk version:
[root@rhel1 ~]# java -versionjava version "1.7.0_45"OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15) OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
Download jdk:
jdk-7u79-linux-x64.rpm
Install jdk:
rpm -ivh jdk-7u79-linux-x64.rpm
Configure java environment variables, edit /etc /profile:
#使用 rpm -ql 文件名 查询安装的路径vi /etc/profile #添加以下配置:export JAVA_HOME=/usr/java/jkd1.7.9_79export JAVA_BIN=$JAVA_HOME/binexport PATH=$PATH:$JAVA_BINexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Execute the following: to make the java environment variable take effect immediately
source /etc/profile
Query the jdk version:
[root@rhel1 ~]# java -versionjava version "1.7.0_45"OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15) OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
The above is the hadoop installation and maintenance 01--JDK environment Deployment content, please pay attention to the PHP Chinese website (www.php.cn) for more related content!