CentOS 安装WebLogic

1.JDK 安装

bash 复制代码
cd /home/
mkdir java
cd java/
tar -zxvf jdk-8u321-linux-x64.tar.gz
bash 复制代码
vim /etc/profile

添加以下内容到 /etc/profile

bash 复制代码
JAVA_HOME=/home/java/jdk1.8.0_321
CLASSPATH=.:$JAVA_HOME/lib.tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH

刷新配置,查看当前版本是否生效。

bash 复制代码
source /etc/profile
java -version

2.安装 weblogic

2.1 上传安装包

bash 复制代码
cd /usr/local/
mkdir weblogic12
cd weblogic12/

2.2 创建组、用户和设置权限

bash 复制代码
groupadd web
useradd -g web weblogic
passwd weblogic
New password: 输入密码(weblogic123)
Retype new password:重复输入密码(weblogic123)
chown -R weblogic:web /home
chown -R weblogic:web /usr/local

密码设置出现问题时 可以换用其他的密码

2.3 配置静默安装文件

2.3.1 配置 wls.rsp 文件

bash 复制代码
su - weblogic
cd /home/weblogic/
vim wls.rsp

添加如下内容:

bash 复制代码
[ENGINE]

#DO NOT CHANGE THIS.

Response File Version=1.0.0.0.0

[GENERIC]

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home   insure having all dir read and write authority

ORACLE_HOME=/usr/local/weblogic12/wlsInstall

#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=

2.3.2 配置 oralnst.loc 文件

bash 复制代码
cd /home/weblogic/
vim oralnst.loc

添加如下内容

bash 复制代码
inventory_loc=/home/weblogic/oraInventory

inst_group=web

2.4 执行安装

bash 复制代码
cd /usr/local/weblogic12/
bash 复制代码
java -jar fmw_12.2.1.3.0_wls.jar  -silent  -responseFile  /home/weblogic/wls.rsp  -invPtrLoc /home/weblogic/oralnst.loc

3.配置 weblogic

3.1 新建目录和配置环境变量

bash 复制代码
mkdir -p /usr/local/weblogic12/wlsInstall/user_projects/domains/pyfile
/usr/local/weblogic12/wlsInstall/wlserver/server/bin/setWLSEnv.sh

3.2 设置 weblogic 域配置

bash 复制代码
cd /usr/local/weblogic12/wlsInstall/user_projects/domains/pyfile
cp /usr/local/weblogic12/wlsInstall/wlserver/common/templates/scripts/wlst/basicWLSDomain.py ./

3.3 执行 weblogic 域的创建

bash 复制代码
/usr/local/weblogic12/wlsInstall/oracle_common/common/bin/wlst.sh basicWLSDomain.py

4.启动 weblogic

bash 复制代码
cd /usr/local/weblogic12/wlsInstall/user_projects/domains/basicWLSDomain/bin
nohup ./startWebLogic.sh &
./stopWebLogic.sh

访问页面:http://ip:7001/console/

5.端口开放

切换到 root 用户

应用 firewall 相关命令控制防火墙

1、查看 firewall 的状态

bash 复制代码
firewall-cmd --state

2、开放 7001 端口

bash 复制代码
firewall-cmd --permanent --add-port=7001/tcp

3、查看防火墙的开放的端口

bash 复制代码
firewall-cmd --permanent --list-ports

4、重启防火墙(修改配置后要重启防火墙)

bash 复制代码
firewall-cmd --reload

通过以上操作即可实现端口外部访问;

JDK 下载链接:https://www.oracle.com/kw/java/technologies/javase/javase8u211-later-archive-downloads.html

WebLogic 下载链接:https://www.oracle.com/middleware/technologies/weblogic-server-downloads.html

相关推荐
liuyunluoxiao16 分钟前
基于生产者消费者模型的线程池【Linux操作系统】
linux
CSJ2002031427 分钟前
LUMP+NFS架构的Discuz论坛部署
运维·架构
不知疲倦的仄仄1 小时前
2025最新版Docker讲解/面试/命令/容器化技术
运维·docker·容器
程序员黄老师1 小时前
Ubuntu 24.04上安装 Intelligent Pinyin 中文输入法
linux·运维·ubuntu
HONG_YANG2 小时前
ERPNext 介绍、安装和维护建议
linux
HONG_YANG2 小时前
ERPNext 搭建教程:Linux 一键部署与维护
linux
晨岳2 小时前
CentOS 安装 JDK+ NGINX+ Tomcat + Redis + MySQL搭建项目环境
java·redis·mysql·nginx·centos·tomcat
Enti7c2 小时前
什么是void,什么时候使用void类型?never和void的区别
linux·运维·ubuntu
宇钶宇夕3 小时前
S7-1200 系列 PLC 中 SCL 语言的 PEEK 和 POKE 指令使用详解
运维·服务器·数据库·程序人生·自动化
scilwb3 小时前
基于Isaac Sim场景的Coverage Path Planning 项目部署完整指南
linux