weblogic安装

发布时间 2023-06-16 11:37:57作者: BINGYANGW

1. 安装jdk

# 配置环境变量
vim /etc/profile

# JAVA_HOME,jdk解压后路径
export JAVA_HOME=/opt/jdk1.8.0_291
export PATH=$PATH:$JAVA_HOME/bin

# 使配置的环境变量生效
source /etc/profile

2. 创建用户

# 创建目录
/home/weblogic
# 创建组
groupadd weblogic
# 创建用户
useradd -g weblogic -d /home/weblogic/ weblogic
# 设置密码
passwd weblogic

3. 上传安装包

4. 更改目录拥有者

chown -R weblogic:weblogic /home/weblogic/

5. 安装包赋予可执行权限

chmod 700  安装包

6. 开始安装

# 切换用户
su weblogic
# 安装
java -jar wls1036_generic.jar -mode=console
# 欢迎界面 回车继续、exit退出安装

<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Welcome:
--------

This installer will guide you through the installation of WebLogic 10.3.6.0. 
Type "Next" or enter to proceed to the next prompt.  If you want to change data entered previously, type "Previous".  You may quit the installer at any time by typing "Exit".


Enter [Exit][Next]>  
# 选择安装目录  1.输入新的目录  2.默认路径
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Choose Middleware Home Directory:
---------------------------------

    "Middleware Home" = [/home/weblogic/Oracle/Middleware]

Use above value or select another option:
    1 - Enter new Middleware Home
    2 - Change to default [/home/weblogic//Oracle/Middleware]
    

Enter option number to select OR [Exit][Previous][Next]> /home/weblogic
# 1.修改新目录,2.修改到默认路径,直接回车就行
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Choose Middleware Home Directory:
---------------------------------

    "Middleware Home" = [/home/weblogic/Oracle/Middleware]

Use above value or select another option:
    1 - Enter new Middleware Home
    2 - Change to default [/home/weblogic//Oracle/Middleware]


    ** Invalid input, only integer selection or page movement command are 
    ** accepted: ["/home/weblogic"]


Enter option number to select OR [Exit][Previous][Next]> 

# 是否注册一些更新  选择3  在选择No,再Yes后,第三条Yes会变成No,再回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Register for Security Updates:
------------------------------

Provide your email address for security updates and  to initiate configuration manager.

   1|Email:[]
   2|Support Password:[]
   3|Receive Security Update:[Yes]


Enter index number to select OR [Exit][Previous][Next]> 

# 安装方式,1.典型安装   2.自定义安装  选择2
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Choose Install Type:
--------------------

Select the type of installation you wish to perform. 

 ->1|Typical
    |  Install the following product(s) and component(s):
    | - WebLogic Server
    | - Oracle Coherence

   2|Custom
    |  Choose software products and components to install and perform optional 
    |configuration.



Enter index number to select OR [Exit][Previous][Next]> 2

# 选择需要安装的组件,这里默认不选 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Choose Products and Components:
-------------------------------

    Release 10.3.6.0
    |_____WebLogic Server [1] x
    |    |_____Core Application Server [1.1] x
    |    |_____Administration Console [1.2] x
    |    |_____Configuration Wizard and Upgrade Framework [1.3] x
    |    |_____Web 2.0 HTTP Pub-Sub Server [1.4] x
    |    |_____WebLogic SCA [1.5] x
    |    |_____WebLogic JDBC Drivers [1.6] x
    |    |_____Third Party JDBC Drivers [1.7] x
    |    |_____WebLogic Server Clients [1.8] x
    |    |_____WebLogic Web Server Plugins [1.9] x
    |    |_____UDDI and Xquery Support [1.10] x
    |    |_____Server Examples [1.11] 
    |    |_____Evaluation Database [1.12] x
    |_____Oracle Coherence [2] x
         |_____Coherence Product Files [2.1] x
         |_____Coherence Examples [2.2] 

    *Estimated size of installation: 690.2 MB


Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> 

# 选择安装的jdk,直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

JDK Selection (Any * indicates Oracle Supplied VM):
---------------------------------------------------

JDK(s) chosen will be installed.  Defaults will be used in script string-substitution if installed.

   1|Add Local Jdk
   2|/opt/jdk1.8.0_291[x]


   *Estimated size of installation:  690.2 MB


Enter 1 to add or >= 2 to toggle selection  OR [Exit][Previous][Next]> 

# 两个组件和组件的安装目录,直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Choose Product Installation Directories:
----------------------------------------

Middleware Home Directory: [/home/weblogic/Oracle/Middleware]

Product Installation Directories:


   1|WebLogic Server: [/home/weblogic/Oracle/Middleware/wlserver_10.3]
   2|Oracle Coherence: [/home/weblogic/Oracle/Middleware/coherence_3.7]



Enter index number to select OR [Exit][Previous][Next]> 
# 接下来这些组件会进行安装,直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

The following Products and JDKs will be installed:
--------------------------------------------------

    WebLogic Platform 10.3.6.0
    |_____WebLogic Server
    |    |_____Core Application Server
    |    |_____Administration Console
    |    |_____Configuration Wizard and Upgrade Framework
    |    |_____Web 2.0 HTTP Pub-Sub Server
    |    |_____WebLogic SCA
    |    |_____WebLogic JDBC Drivers
    |    |_____Third Party JDBC Drivers
    |    |_____WebLogic Server Clients
    |    |_____WebLogic Web Server Plugins
    |    |_____UDDI and Xquery Support
    |    |_____Evaluation Database
    |_____Oracle Coherence
         |_____Coherence Product Files

    *Estimated size of installation: 690.3 MB


Enter [Exit][Previous][Next]> 

# 安装完成
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Installation Complete


Congratulations! Installation is complete.


Press [Enter] to continue or type [Exit]> 

问题

问题1: 切换weblogic用户出现 -bash-4.2$

原因是在用useradd添加普通用户时,有时会丢失家目录下的环境变量文件,丢失文件如下

cp /etc/skel/.bashrc  /home/weblogic
cp /etc/skel/.bash_profile   /home/weblogic

问题2: 先更改目录拥有者后上传weblogic安装包,上传的安装包拥有者还是root

解决:再修改一遍拥有者,或者先上传安装包,再修改目录拥有者

chown -R weblogic:weblogic /home/weblogic/