[root@localhost wollo]# vim /etc/profile #export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL export JAVA_HOME=/usr/local/jdk1.8.0_291 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar [root@localhost wollo]# source /etc/profile
5) 查看Java版本,验证是否安装成功
1
[root@localhost wollo]# Java -version
附:查看jdk 1.whereis java 2.which java (java执行路径)
附:我安装jdk1.6、jdk1.7后,使用Java -version命令,发现报错了:
1 2 3
[root@10 jdk1.6]# java -version Error occurred during initialization of VM Unable to load native library: libnsl.so.1: cannot open shared object file: No such file or directory
#DO NOT CHANGE THIS. Response File Version=1.0.0.0.0
[GENERIC]
#Set this to true if you wish to skip software updates DECLINE_AUTO_UPDATES=true
#My Oracle Support User Name MOS_USERNAME=
#My Oracle Support Password MOS_PASSWORD=<SECURE VALUE>
#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true AUTO_UPDATES_LOCATION=
#Proxy Server Name to connect to My Oracle Support SOFTWARE_UPDATES_PROXY_SERVER=
#Proxy Server Port SOFTWARE_UPDATES_PROXY_PORT=
#Proxy Server Username SOFTWARE_UPDATES_PROXY_USER=
#Proxy Server Password SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>
#The oracle home location. This can be an existing Oracle Home or a new Oracle Home ORACLE_HOME=/home/weblogic12/wls_12c
#Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples. INSTALL_TYPE=WebLogic Server
#Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name. MYORACLESUPPORT_USERNAME=
#Provide the My Oracle Support Password MYORACLESUPPORT_PASSWORD=<SECURE VALUE>
#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration DECLINE_SECURITY_UPDATES=true
#Set this to true if My Oracle Support Password is specified SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
#Provide the Proxy Host PROXY_HOST=
#Provide the Proxy Port PROXY_PORT=
#Provide the Proxy Username PROXY_USER=
#Provide the Proxy Password PROXY_PWD=<SECURE VALUE>
#Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port] COLLECTOR_SUPPORTHUB_URL=