概述

weblogic有三种安装方式

  • GUI方式安装,有界面引导安装,操作简单,但Linux需要安装GUI图形界面软件,本地通过VNC工具连接。
  • 静默安装,该方式可以实现自动化安装,但需要提前准备好安装所需配置文件。
  • 控制台安装,weblogic安装程序提供控制台界面安装,就算把GUI图形界面的相关配置信息用控制台的方式展现,用户通过键盘输入进行选择。

本次安装采用控制台安装方式对weblogic进行安装配置,在启动weblogic安装程序后,安装程序会自动监测当前环境,如果非GUI环境会自动进入console模式。

和GUI安装方式相比,控制台安装不需要安装VNC工具,实在是方便很多,但需要安装人员对weblogic的安装非常的熟悉,因为一切都是通过控制台进行交互。

上传介质

  • 创建介质目录
[root]
mkdir –p /u01/installer

将以下安装介质上传至服务器介质目录下

  • wls1036_generic.jar
  • jdk-7u76-linux-x64.zip

设置主机名

[root]
hostnamectl set-hostname app1
su
hostname
app1

创建用户和用户组

[root]
groupadd  -g 1204 oinstall
useradd –u 1100 -g oinstall –m oracle
passwd oracle
输入oracle密码
chown –R oracle:oinstall /u01

1204和1100是指定组和用户的id,可以指定为其他数字,需要将u01目录权限分配给oracle用户

安装jdk

[root]
# cd /u01/installer
# unzip jdk-7u76-linux-x64.zip
# rpm -ivh jdk-7u76-linux-x64.rpm
# su - oracle
[oracle]
$ vi ~/.bash_profile
...
JAVA_HOME=/usr/java/jdk1.7.0_76
export PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME
$ java -version
java version "1.7.0_76"
Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)

安装weblogic

weblogic有三种方式

  • GUI方式安装,有界面引导安装,操作简单,但Linux需要安装GUI图形界面软件,本地通过VNC工具连接,这个步骤较为麻烦。
  • 静默安装,该方式可以实现自动化安装,但需要提前准备好安装所需配置文件。
  • 控制台安装,weblogic安装程序提供控制台界面安装,就算把GUI图形界面的相关配置信息用控制台的方式展现,用户通过键盘输入进行选择,这种方式要求对为 blogic的安装方式比较熟悉。

本次安装采用控制台安装方式对weblogic进行安装配置。

  • 启动weblogic安装程序,安装程序会自动监测当前环境,如果非GUI环境会自动进入console模式。
[oracle]
cd /u01/installer
$ java -jar  wls1036_generic.jar
Unable to instantiate GUI, defaulting to console mode.
Extracting 0%.........................100%
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
  • 确认安装(输入Next)
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]> Next
  • 选择中间件目录(/u01/oracle/Middleware)
Choose Middleware Home Directory:
---------------------------------
    "Middleware Home" = [Enter new value or use default 
"/home/oracle/Oracle/Middleware"]
Enter new Middleware Home OR [Exit][Previous][Next]> /u01/oracle/Middleware
  • 确认中间件目录,输入Next
Choose Middleware Home Directory:
---------------------------------
    "Middleware Home" = [/u01/oracle/Middleware]
Use above value or select another option:
    1 - Enter new Middleware Home
    2 - Change to default [/home/oracle/Oracle/Middleware]
Enter option number to select OR [Exit][Previous][Next]>
  • oracle安全更新,选择忽略,其他选项这里用==>标识出
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
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
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
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]> Next
  • 安装类型选择自定义(custom)
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
  • 确认安装组件,如果要去掉指定组件,输入组件后面到编号即可,这里去掉了Coherence组件,输入2
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]> 2
  • 确认jdk,如果需要更换,选择1进行更换
DK 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/java/jdk1.7.0_76[x]
   *Estimated size of installation:  744.7 MB
Enter 1 to add or >= 2 to toggle selection  OR [Exit][Previous][Next]> Next
  • 确认安装目录,直接按Enter
Choose Product Installation Directories:
----------------------------------------
Middleware Home Directory: [/u01/oracle/Middleware]
Product Installation Directories:
    "WebLogic Server" = [Enter new value or use default 
"/u01/oracle/Middleware/wlserver_10.3"]
Enter new WebLogic Server OR [Exit][Previous][Next]>
  • 开始安装,安装完毕后按回车键结束
Installing files..
0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]
Performing String Substitutions... 
Installation Complete
Congratulations! Installation is complete.

至此便完成了weblogic的安装,安装目录为/u01/oracle/Middleware下。

创建domain

安装weblogic只是将weblogic软件放到中间件目录下,并创建好相关目录,并不能运行,domain才是weblogic的运行时环境,weblogic依托domain才能运行,同样,我们这次依然采用console方式对domain进行创建。

  • 启动安装程序
cd /u01/oracle/Middleware/wlserver_10.3/common/bin/
./config.sh
Unable to instantiate GUI, defaulting to console mode.
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /u01/oracle/Middleware/wlserver_10.3/common/lib/libjni.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
  • 选择创建新domain
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]> 1
  • 选择基于模版创建还是基于weblogic自身组件创建,这里选择基于weblogic自身组件创建
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 existing 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]> 1
  • 选择需要安装的组件,在创建server的时候会默认部署已选择的组件,直接按Enter默认
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]>
  • 指定domain名称,这里指定为portal_domain
Edit Domain Information:
------------------------
    |  Name  |    Value    |
   _|________|_____________|
   1| *Name: | base_domain |
Enter value for "Name" OR [Exit][Previous][Next]> portal_domain
Edit Domain Information:
------------------------
    |  Name  |     Value     |
   _|________|_______________|
   1| *Name: | portal_domain |
Use above value or select another option:
    1 - Modify "Name"
    2 - Discard Changes
Enter option number to select OR [Exit][Previous][Next]>
  • 选择domain目录,默认即可
Select the target domain directory for this domain:
---------------------------------------------------
    "Target Location" = [Enter new value or use default 
"/u01/oracle/Middleware/user_projects/domains"]
Enter new Target Location OR [Exit][Previous][Next]>
  • 设置管理员账号和密码
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

需要修改指定属性只要输入属性前面对应的编号即可,这里不详述

  • 选择模式,如果是开发环境建议选择开发模式,如果是生产环境建议选择生产模式。
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
  • 选择JDK,和安装weblogic时一样
Java SDK Selection:
-------------------
 ->1|Sun SDK 1.7.0_76 @ /usr/java/jdk1.7.0_76
   2|Other Java SDK
Enter index number to select OR [Exit][Previous][Next]>
  • 配置可选项,如果这边不做设置,新建的domain只包含一个Adminserver,需要在console或者通过其他方式创建ManagerServer,这里可以直接创建ManagerServer,我们直接在这里创建server即可。
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]> 2

选择2,配置Managed Server等信息

  • 输入Manager Server相关信息,包括名称端口号等
Configure Managed Servers:
--------------------------
Add or delete configuration information for Managed Servers. A typical 
production environment has one or more Managed Servers. Each Managed Server 
is an instance of WebLogic Server used to host enterprise applications.
    | Name* | Listen address* | Listen port | SSL listen port | SSL enabled |
   _|_______|_________________|_____________|_________________|_____________|
===> Enter name for a new  OR [Exit][Previous][Next]> app_server1
Configure Managed Servers:
--------------------------
Add or delete configuration information for Managed Servers. A typical 
production environment has one or more Managed Servers. Each Managed Server 
is an instance of WebLogic Server used to host enterprise applications.
    |   Name*   |  Listen address*  |Listen port|SSL listen port|SSL enabled|
   _|___________|___________________|___________|_______________|___________|
 1->|app_server1|All Local Addresses|   7003    |      N/A      |   false   |
Use above value or select another option:
    1 - Modify "Name"
    2 - Modify "Listen address"
    3 - Modify "Listen port"
    4 - Modify "SSL enabled"
    5 - Done
Enter option number to select OR [Exit][Previous][Next]> Next

需要修改指定属性只要输入属性前面对应的编号即可,这里不详述

  • 配置集群,这里不做集群配置,安装单节点服务器
Configure Clusters:
-------------------
Add or delete configuration information for clusters. A cluster consists of 
multiple server instances working together to provide increased scalability 
and reliability.
    |Name*|Cluster messaging...|Multicast add...|Multicast ...|Cluster add...|
   _|_____|____________________|________________|_____________|______________|
Enter name for a new Cluster OR [Exit][Previous][Next]>
  • 配置Machine,这里配置的是非Unix Machine,这次安装的环境是Linux系统,因此跳过该步骤,下一步对machine进行配置。
Configure Machines:
-------------------
Add or delete machines. A machine hosts one or more WebLogic Server 
instances. The Admin Server and Node Manager use this machine definition to 
start remote servers.
    | Name* | Node manager listen address | Node manager listen port |
   _|_______|_____________________________|__________________________|
===> Enter name for a new Machine OR [Exit][Previous][Next]> Next
  • 配置Uninx Machine,只有把server加到machine里才能在控制台进行重启等操作,machine和nodemanager是对应的。
Add or delete machines. A machine hosts one or more WebLogic Server 
instances. The Admin Server and Node Manager use this machine definition to 
start remote servers.
    | Name |
   _|______|
===> Enter name for a new Unix Machine OR [Exit][Previous][Next]> app1
<------------------- Fusion Middleware Configuration Wizard ------------------>
Configure Unix Machines:
------------------------
Add or delete machines. A machine hosts one or more WebLogic Server 
instances. The Admin Server and Node Manager use this machine definition to 
start remote servers.
    |             Name             |   Value   |
   _|______________________________|___________|
   1|            *Name:            |   app1    |
   2|    Post bind GID enabled:    |   false   |
   3|        Post bind GID:        |  nobody   |
   4|    Post bind UID enabled:    |   false   |
   5|        Post bind UID:        |  nobody   |
   6| Node manager listen address: | localhost |
   7|  Node manager listen port:   |   5556    |
Use above value or select another option:
    1 - Modify "Name"
    2 - Modify "Post bind GID enabled"
    3 - Modify "Post bind GID"
    4 - Modify "Post bind UID enabled"
    5 - Modify "Post bind UID"
    6 - Modify "Node manager listen address"
    7 - Modify "Node manager listen port"
===> Enter option number to select OR [Exit][Reset][Accept]>
  • 将server挂载到machine上
Assign Servers to Machines:
---------------------------
Assign each WebLogic Server instance to the machine on which it runs. 
    Machine
    |_____Unix Machine
         |_____app1 [1.1] 
         
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]>
  • 开始创建domain
Creating Domain...
0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]
<strong>* Domain Created Successfully! *</strong>

服务器启动

AdminServer启动

第一次启动AdminServer需要通过命令直接启动,不能后台启动,因为第一次需要输入管理员账号和密码,weblogic进行初始化后,可以在配置文件里设置用户名和密码,下次就可以直接后台启动。

[oracle]
cd /u01/oracle/Middleware/user_projects/domains/bin
./startWeblogic.sh
...
输入用户名密码

启动成功后(出现Running Mode),登录控制台(http://ip:7001/console)查看服务器状态。

如果状态正常,回到后台,按Ctrl+C停止服务器。

[oracle]
cd /u01/oracle/Middleware/user_projects/domains/servers/AdminServer
mkdir -p security
cd security
cat <<EOF > boot.properties
username=webogic
password=welcome1

在AdminServer/security/目录下创建boot.properties文件并指定好用户名密码,下次就不需要输入用户名密码,这样可以通过后台启动weblogic。

[oracle]
cd /u01/oracle/Middleware/user_projects/domains/bin
nohup ./startWeblogic >admin 2>&1 &

NodeManager启动

在创建domain的时候创建了machine,指定machine的NodeManager必须启动才能通过console对服务器进行管理。

[oracle]
cd /u01/oracle/Middleware/wlserver_10.3/server/bin
nohup ./startNodeManager.sh >node.out 2>&1 &

ManagerServer启动

NodeManager启动后,可以通过console对managed server进行启动。

Trackback

no comment untill now

Add your comment now