cat /etc/sysconfig/i18n cp /etc/sysconfig/i18n /etc/sysconfig/i18n.old vi /etc/sysconfig/i18n LANG="zh_CN.GBK" SUPPORTED="zh_CN.GBK:zh:zh_CN.GB2312:zh:zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="latarcyrheb-sun16" vi /etc/profile //添加NLS_LANG设置 export NLS_LANG='SIMPLIFIED CHINESE_CHINA'.ZHS16GBK cat /etc/sysconfig/clock ZONE="Asia/Shanghai" cp /etc/syconfig/clock /etc/sysconfig/clock.old vim /etc/sysconfig/clock ZONE="Asia/Shanghai" UTC=false ARC=false mv /etc/localtime /etc/localtime.bak ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime rz //上传jdk-8u131-linux-x64.tar.gz mkdir -p /root/jdk //创建源码解压缩文件存放目录 tar -zxvf jdk-8u131-linux-x64.tar.gz -C /root/jdk/ vi /root/.bash_profile //编辑root用户的JAVA环境变量 export JAVA_HOME=/root/jdk/jdk1.8.0_131 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar NLS_LANG='SIMPLIFIED CHINESE_CHINA'.ZHS16GBK export PATH=$JAVA_HOME/bin:$PATH ulimit -u 4096 source /root/.bash_profile //让/root/.bash_profile环境变量立刻生效 java -version //查看root用户的java版本 java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)