weblogic测试环境安装部署--傻瓜式安装教程

测试环境weblogic部署手册

1.weblogic需要有jdk环境

1.1 通过xftp工具把jdk1.8的软件包传入到服务器的/usr/local中并解压

cd /usr/local
tar -zxf jdk-8u333-linux-x64.tar.gz
[root@hjc ~]# cd /usr/local
[root@hjc local]# ls
aegis  bin  etc  games  include  jdk-8u333-linux-x64.tar.gz  lib  lib64  libexec  sbin  share  src
[root@hjc local]# tar -zxf jdk-8u333-linux-x64.tar.gz

1.2 配置java的环境变量

在/etc/profile文件中配置环境变量
运行这个命令 vim /etc/profile后在末尾加上下面的内容,:wq保存并退出

export JAVA_HOME=/usr/local/jdk1.8.0_333
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}

1.3 重启环境变量并检查java安装成功

source /etc/profile  # 让环境变量生效
java -version # 查看jdk的版本与是否安装成功
[root@hjc local]# source /etc/profile
[root@hjc local]# java -version
java version "1.8.0_333"
Java(TM) SE Runtime Environment (build 1.8.0_333-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode)
[root@hjc local]# 

2.安装weblogic并创建用户

[root@hjc local]# ls
aegis  bin  etc  games  include  jdk1.8.0_333  jdk-8u333-linux-x64.tar.gz  lib  lib64  libexec  sbin  share  src  wls1036_generic.jar

2.1新建weblogic用户和用户密码

2.2.1新建weblogic中间件用户,使用命令:

groupadd -g 2001 weblogic  # 建组
# -m自动建立用户登入目录 -u指定id -g属组-d:指定用户登入时的启始目录-s:指定用户登入后所使用的shell
useradd -m -u 2001 -g weblogic -d /home/weblogic -s /bin/bash weblogic 
passwd weblogic #设置密码
usermod -aG wheel weblogic # 把weblogic用户添加了附加组到wheel中
[root@hjc local]# groupadd -g 2001 weblogic
[root@hjc local]# useradd -m -u 2001 -g weblogic -d /home/weblogic -s /bin/bash weblogic
[root@hjc local]# passwd weblogic
[root@hjc local]# usermod -aG wheel weblogic
[root@hjc local]# id weblogic
uid=2001(weblogic) gid=2001(weblogic) groups=2001(weblogic),10(wheel)

2.2.2增加weblogic环境变量
登录weblogic用户,修改weblogic用户下基础环境变量,在.bash_profile文件中添加umask 022

vi .bash_profile
# 写入内容
umask 022

2.3切换为weblogic用户操作

[root@hjc local]# su - weblogic
[weblogic@hjc ~]$ 

3.部署weblogic

3.1 部署目录

在weblogic用户下,新建两个规划目录,一个是webapp文件夹,用于放置应用程序,另一个是domain文件夹,用于放置weblogic部署的域

/home/weblogic/
         /webapp/<app name>/             #应用系统部署文件目录,war、ear等
         /domain/<domain name>          #weblogic域存放地址
[weblogic@hjc ~]$ mkdir webapp
[weblogic@hjc ~]$ mkdir domain
[weblogic@hjc ~]$ ls
domain  webapp

3.2安装weblogic软件

3.2.1将weblogic的安装包wls1036_generic.jar通过xftp工具上传至/home/weblogic/webapp,然后安装

[weblogic@hjc local]$ cd /home/weblogic/webapp/
[weblogic@hjc webapp]$ ls
wls1036_generic.jar
[weblogic@hjc webapp]$ java -jar wls1036_generic.jar -mode=console

安装过程:(这里的细节很多,必须注意!)

[weblogic@jxapp01 ~]$ java -jar wls1036_generic.jar -mode=console
Extracting 0%....................................................................................................100%
<-------------------- 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]> **默认**
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Middleware Home Directory:
---------------------------------
    "Middleware Home" = [Enter new value or use default 
"/home/weblogic/Oracle/Middleware"]
Enter new Middleware Home OR [Exit][Previous][Next]> **默认**
<-------------------- 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]> **3**
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Register for Security Updates:
------------------------------
Provide your email address for security updates and  to initiate configuration manager.
    "Receive Security Update:" = [Enter new value or use default "Yes"]
Enter [Yes][No]? **no**
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Register for Security Updates:
-----------------------------
Provide your email address for security updates and  to initiate configuration manager.
    "Receive Security Update:" = [Enter new value or use default "Yes"]
    ** Do you wish to bypass initiation of the configuration manager and
    **  remain uninformed of critical security issues in your configuration?
Enter [Yes][No]? **yes**
<-------------------- 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:[No]
Enter index number to select OR [Exit][Previous][Next]> **默认**
<-------------------- 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:[No]
Enter index number to select OR [Exit][Previous][Next]> **默认**
<-------------------- 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]> **默认**
<-------------------- 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|/usr/local/jdk1.8.0_333[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 ------------------->
Installing files..
0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]
Performing String Substitutions... 
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Configuring OCM...
0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]
Creating Domains...
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Installation Complete
Congratulations! Installation is complete.
Press [Enter] to continue or type [Exit]>**默认**
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Clean up process in progress ...
[weblogic@hjc webapp]$ 

3.2.2创建域

登录weblogic用户,在路径/home/weblogic/Oracle/Middleware/wlserver_10.3/common/bin,下面执行config.sh,脚本进行创建。
如果报错:./config.sh: line 103: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/java: No such file or directory,则更改commEnv.sh的第149行,在JAVA_HOME后面添加jre目录。

[weblogic@hjc bin]$ cd /home/weblogic/Oracle/Middleware/wlserver_10.3/common/bin
[weblogic@hjc bin]$ ./config.sh
<------------------- Fusion Middleware Configuration Wizard ------------------>
Welcome:
--------
Choose between creating and extending a domain. Based on your selection, 
the Configuration Wizard guides you through the steps to generate a new or 
extend an existing domain.
 ->1|Create a new WebLogic domain
    |    Create a WebLogic domain in your projects directory.  
   2|Extend an existing WebLogic domain
    |    Use this option to add new components to an existing domain and modify     |configuration settings. 
Enter index number to select OR [Exit][Next]> **默认**
<------------------- Fusion Middleware Configuration Wizard ------------------>
Select Domain Source:
--------------------
Select the source from which the domain will be created. You can create the 
domain by selecting from the required components or by selecting from a 
list of exising domain templates.
 ->1|Choose Weblogic Platform components
    |    You can choose the Weblogic component(s) that you want supported in 
    |your domain. 
   2|Choose custom template
    |    Choose this option if you want to use an existing  template. This 
    |could be a custom created template using the Template Builder. 
Enter index number to select OR [Exit][Previous][Next]> **默认**
<------------------- Fusion Middleware Configuration Wizard ------------------>
Application Template Selection:
-------------------------------
    Available Templates
    |_____Basic WebLogic Server Domain - 10.3.6.0 [wlserver_10.3]x
    |_____Basic WebLogic SIP Server Domain - 10.3.6.0 [wlserver_10.3] [2] 
    |_____WebLogic Advanced Web Services for JAX-RPC Extension - 10.3.6.0 [wlserver_10.3] [3] 
    |_____WebLogic Advanced Web Services for JAX-WS Extension - 10.3.6.0 [wlserver_10.3] [4] 
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> **默认**
<------------------- Fusion Middleware Configuration Wizard ------------------>
Edit Domain Information:
------------------------
    |  Name  |    Value    |
   _|________|_____________|
   1| *Name: | base_domain |
Enter value for "Name" OR [Exit][Previous][Next]> **默认**
<------------------- Fusion Middleware Configuration Wizard ------------------>

Select the target domain directory for this domain:
---------------------------------------------------
    "Target Location" = [Enter new value or use default 
"/home/weblogic/Oracle/Middleware/user_projects/domains"]
Enter new Target Location OR [Exit][Previous][Next]> **默认**
<------------------- Fusion Middleware Configuration Wizard ------------------>

Configure Administrator User Name and Password:
-----------------------------------------------

Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.

    |          Name           |                  Value                  |
   _|_________________________|_________________________________________|
   1|         *Name:          |                weblogic                 |
   2|     *User password:     |                                         |
   3| *Confirm user password: |                                         |
   4|      Description:       | This user is the default administrator. |
Use above value or select another option:
    1 - Modify "Name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
Enter option number to select OR [Exit][Previous][Next]> 2
<------------------ Fusion Middleware Configuration Wizard ------------------>
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.
    "*User password:" = []
Enter new *User password: OR [Exit][Reset][Accept]> weblogic123
<------------------- Fusion Middleware Configuration Wizard ------------------>

Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.

    |          Name           |                  Value                  |
   _|_________________________|_________________________________________|
   1|         *Name:          |                weblogic                 |
   2|     *User password:     |               ***********               |
   3| *Confirm user password: |                                         |
   4|      Description:       | This user is the default administrator. |

Use above value or select another option:
    1 - Modify "Name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes
Enter option number to select OR [Exit][Previous][Next]> 3
<------------------- Fusion Middleware Configuration Wizard ------------------>
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.

    "*Confirm user password:" = []
Enter new *Confirm user password: OR [Exit][Reset][Accept]> weblogic123
<------------------- Fusion Middleware Configuration Wizard ------------------>
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.
    |          Name           |                  Value                  |
   _|_________________________|_________________________________________|
   1|         *Name:          |                weblogic                 |
   2|     *User password:     |               ***********               |
   3| *Confirm user password: |               ***********               |
   4|      Description:       | This user is the default administrator. |
Use above value or select another option:
    1 - Modify "Name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes
Enter option number to select OR [Exit][Previous][Next]> **默认**
<------------------- Fusion Middleware Configuration Wizard ------------------>
Domain Mode Configuration:
--------------------------
Enable Development or Production Mode for this domain. 

 ->1|Development Mode

   2|Production Mode
Enter index number to select OR [Exit][Previous][Next]> 2
<------------------- Fusion Middleware Configuration Wizard ------------------>
Java SDK Selection:
-------------------
 ->1|Sun SDK 1.8.0_333 @ /usr/local/jdk1.8.0_333
   2|Other Java SDK
   Enter index number to select OR [Exit][Previous][Next]>**默认**
   <------------------- Fusion Middleware Configuration Wizard ------------------>
Select Optional Configuration:
------------------------------
   1|Administration Server [ ]
   2|Managed Servers, Clusters and Machines [ ]
   3|RDBMS Security Store [ ]
Enter index number to select OR [Exit][Previous][Next]> **默认**
<------------------- Fusion Middleware Configuration Wizard ------------------>
Creating Domain...
0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]
**** Domain Created Successfully! ****

到这里weblogic就安装完了

4.启动weblogic服务测试

 cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain
 ./startWebLogic.sh  # 启动weblogic
[weblogic@hjc base_domain]$ cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain
[weblogic@hjc base_domain]$ ls
autodeploy  bin  config  console-ext  fileRealm.properties  init-info  lib  security  startWebLogic.sh
[weblogic@hjc base_domain]$ ./startWebLogic.sh 

启动成功(这里最好设置为绵免密登录,在下方)
在这里插入图片描述
成功启动一次后,就会出现/home/weblogic/domain/jx_domain/servers/AdminServer目录,然后新建一个security目录,并新建文件boot.properties,写username和password行:
password=weblogic123
username=weblogic

cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers
cd AdminServer/
mkdir security
cd security/
vim boot.properties
# 在boot.properties中写入
password=weblogic123
username=weblogic

在这里插入图片描述

重新启动weblogic服务

cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/
./startWeblogic.sh

在这里插入图片描述

优化weblogic反应速度

完成这一步后,发现登录weblogic后弹出的页面反应时间会很长。所以我们还需要进行一些配置
切换回root用户通过find / -name java.security找到java.security的配置目录。然后找到
/usr/local/java/jdk1.8.0_333/jre/lib/security/java.security文件路径vim更改设置为:
把securerandom.source=file:/dev/random改为下面这个配置即可securerandom.source=file:/dev/./urandom 最后保存:wq

[root@hjc ~]# find / -name java.security
/usr/local/jdk1.8.0_333/jre/lib/security/java.security
[root@hjc ~]# vim /usr/local/jdk1.8.0_333/jre/lib/security/java.security
## 修改的内容下图所示

在这里插入图片描述
这样配置后进入weblogic客户端就是秒进,速度快很多很多。

优化weblogic启动的内存

cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin
vim setDomainEnv.sh
## 修改内容如下图所示

在这里插入图片描述
在这里插入图片描述
之后,重新重启./startWeblogic.sh即可
在这里插入图片描述
至此!weblogic的安装部署完毕!

  • 0
    点赞
  • 34
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
WebLogic是Oracle公司开发的一款Java应用服务器,用于部署和管理Java应用程序。下面是WebLogic安装部署的一般步骤: 1. 下载WebLogic安装包:从Oracle官方网站下载适合您操作系统的WebLogic安装包。 2. 安装Java Development Kit(JDK):WebLogic需要依赖JDK来运行,确保您已经安装了适合版本的JDK。 3. 解压安装包:将下载的WebLogic安装包解压到您选择的目录。 4. 运行安装程序:进入解压后的目录,找到安装程序(例如`install.exe`或`config.cmd`),运行该程序。 5. 配置安装选项:根据提示进行配置,包括选择安装类型(开发环境或生产环境)、设置域(Domain)名称和路径、设置管理员用户名和密码等。 6. 安装WebLogic:确认配置选项后,开始安装WebLogic安装过程可能需要一些时间,请耐心等待。 7. 创建域:安装完成后,可以使用WebLogic提供的配置工具创建域。域是WebLogic的基本管理单元,用于部署和管理应用程序。 8. 部署应用程序:在创建域后,可以使用WebLogic控制台或命令行工具来部署您的Java应用程序。将应用程序打包成WAR或EAR文件,然后将其部署WebLogic服务器上。 9. 启动WebLogic服务器:完成应用程序部署后,可以启动WebLogic服务器。启动后,您可以通过浏览器访问WebLogic控制台来管理和监控服务器。 10. 配置和优化:根据您的需求,可以进一步配置和优化WebLogic服务器,例如设置数据源、调整线程池大小、配置安全性等。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值