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

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

执行netstat -nltp查看7001端口是否启动

进入weblogic

访问 http://192.168.1.129:7001/console 输入用户名密码,如果能访问到这个界面说明顺利部署完成。

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

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/ 查看。出现登陆界面则安装成功

上一篇:Python sqlalchemy orm 外键关联


下一篇:hello 内核模块