weblogic系列漏洞整理 -- 1. weblogic安裝


0. 概述

WebLogic是美國Oracle公司出品的一個application server,確切的說是一個基於JAVAEE架構的中間件,WebLogic是用於開發、集成、部署和管理大型分布式Web應用、網絡應用和數據庫應用的Java應用服務器。將Java的動態功能和Java Enterprise標准的安全性引入大型網絡應用的開發、集成、部署和管理之中。

1. 下載安裝Java環境

WebLogic需要安裝Java環境,JDK下載地址http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.rpm

wget http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.rpm
mkdir -p /usr/java/
mv jdk-8u161-linux-x64.rpm /usr/java/
rpm -ivh jdk-8u161-linux-x64.rpm
//添加環境變量
vim /etc/profile
//在最后加入
export JAVA_HOME=/usr/java/jdk1.8.0_161
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

//安裝成功后
[root@CentOS-6 bin]# echo $JAVA_HOME
/usr/java/jdk1.8.0_161
[root@CentOS-6 bin]# java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
[root@CentOS-6 bin]# 

2. 下載安裝weblogic

安裝

wget http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_generic.jar

//創建用戶和組
groupadd weblogic #創建weblogic組
useradd -g weblogic weblogic #創建weblogic用戶
password weblogic #創建weblogic密碼

java -jar wls1036_generic.jar

按照提示完成WebLogic安裝

部署domain域

進入/root/Oracle/Middleware/wlserver_10.3/common/bin執行./config.sh啟動域安裝配置向導。
按照提示部署即可。

最后進入/root/Oracle/Middleware/user_projects/domains/weblogic/bin中,啟動weblogic./startWebLogic.sh

執行netstat -nltp查看7001端口是否啟動

進入weblogic

訪問 http://192.168.1.129:7001/console 輸入用戶名密碼,如果能訪問到這個界面說明順利部署完成。

3. 排錯

如果出現如下錯誤

java.lang.AssertionError: Could not obtain the localhost address. The most likely cause is an error in the network configuration of this machine.
    at weblogic.server.channels.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:38)
    at weblogic.server.channels.AddressUtils$AddressMaker.<clinit>(AddressUtils.java:33)
    at weblogic.server.channels.AddressUtils.getIPAny(AddressUtils.java:154)
    at weblogic.protocol.configuration.ChannelHelper.checkConsistency(ChannelHelper.java:61)
    at weblogic.server.channels.ChannelService.start(ChannelService.java:207)
    Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: CentOS-6.5-mini: CentOS-6.5-mini: Name or service not known
    at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
    at weblogic.server.channels.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:36)
    at weblogic.server.channels.AddressUtils$AddressMaker.<clinit>(AddressUtils.java:33)
    at weblogic.server.channels.AddressUtils.getIPAny(AddressUtils.java:154)
    at weblogic.protocol.configuration.ChannelHelper.checkConsistency(ChannelHelper.java:61)
    Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: CentOS-6.5-mini: Name or service not known
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
    at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
    at weblogic.server.channels.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:36)
    Truncated. see log file for complete stacktrace
> 

則修改hosts文件

vim /etc/hosts
添加
127.0.0.1    your hostname //your host 可以在終端輸入hostname查看

然后瀏覽器訪問http://your-ip:7001/console/ 查看。出現登陸界面則安裝成功


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM