weblogic

1.新建用户组 weblogic,用户weblogic

[root@localhost ~]# groupadd weblogic
[root@localhost ~]# useradd -g weblogic weblogic
[root@localhost ~]# id weblogic
uid=1001(weblogic) gid=1001(weblogic) groups=1001(weblogic)
[root@localhost ~]# echo weblogic | passwd weblogic --stdin
Changing password for user weblogic.
passwd: all authentication tokens updated successfully.

2.如果没有安装jdk的话,还需要安装jdk

[weblogic@localhost ~]$ tar -zxvf jdk-8u162-linux-x64.tar.gz
[weblogic@localhost ~]$ mv jdk1.8.0_162 /usr/local/

[weblogic@localhost ~]$ vim  ~/.bashrc
JAVA_HOME=/usr/local/jdk1.8.0_162/
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

[weblogic@localhost ~]$ source ~/.bashrc
[weblogic@localhost ~]$ java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

-=================================================================
Slient Mode静默方式
文件详解:
1.创建 oraInst.loc 文件,内容如下

#产品清单目录
inventory_loc=/home/weblogic/oraInventory    
#用户的组名称
inst_group=weblogic

2.创建 wls.rsp 响应文件
这个文件你可以在图形界面安装时,点击保存生产该文件。本机使用的文件内容如下

[ENGINE]
#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0
[GENERIC]
#weblogic的安装路径
ORACLE_HOME=/home/weblogic/Oracle/Middleware   
#Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples.
INSTALL_TYPE=WebLogic Server

3.配置文件创建后,就可以进行安装了

[weblogic@localhost ~]$ java -jar fmw_12.2.1.3.0_wls.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc
Launcher log file is /tmp/OraInstall2019-05-29_11-09-36AM/launcher2019-05-29_11-09-36AM.log.
Extracting the installer . . . . . . . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 2501.000 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 2047 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 10963 MB    Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2019-05-29_11-09-36AM
Log: /tmp/OraInstall2019-05-29_11-09-36AM/install2019-05-29_11-09-36AM.log
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Starting check : CertifiedVersions
Expected result: One of oracle-6, oracle-7, redhat-7, redhat-6, SuSE-11, SuSE-12
Actual Result: redhat-7.0
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.


Starting check : CheckJDKVersion
Expected result: 1.8.0_131
Actual Result: 1.8.0_162
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.


Validations are enabled for this session.
Verifying data
Copying Files
Percent Complete : 10
Percent Complete : 20
Percent Complete : 30
Percent Complete : 40
Percent Complete : 50
Percent Complete : 60
Percent Complete : 70
Percent Complete : 80
Percent Complete : 90
Percent Complete : 100

The installation of Oracle Fusion Middleware 12c WebLogic Server and Coherence 12.2.1.3.0 completed successfully.
Logs successfully copied to /home/weblogic/oraInventory/logs.

4.接下来要创建域domain
首先执行setWLSEnv.sh来配置环境变量

[weblogic@localhost ~]$ /home/weblogic/Oracle/Middleware/wlserver/server/bin/setWLSEnv.sh 
CLASSPATH=/usr/local/jdk1.8.0_162/lib/tools.jar:/home/weblogic/Oracle/Middleware/wlserver/modules/features/wlst.wls.classpath.jar:.:/usr/local/jdk1.8.0_162//lib:/usr/local/jdk1.8.0_162//jre/lib:.:/usr/local/jdk1.8.0_162//lib:/usr/local/jdk1.8.0_162//jre/lib:

PATH=/home/weblogic/Oracle/Middleware/wlserver/server/bin:/home/weblogic/Oracle/Middleware/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.9.8.0.0/apache-ant-1.9.8/bin:/usr/local/jdk1.8.0_162/jre/bin:/usr/local/jdk1.8.0_162/bin:/usr/local/jdk1.8.0_162//bin:/usr/local/jdk1.8.0_162//jre/bin:/usr/local/jdk1.8.0_162//bin:/usr/local/jdk1.8.0_162//jre/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/weblogic/.local/bin:/home/weblogic/bin:/home/weblogic/Oracle/Middleware/wlserver/../oracle_common/modules/org.apache.maven_3.2.5/bin

Your environment has been set.

然后手动创建域存放的目录

[weblogic@localhost ~]$ mkdir /home/weblogic/Oracle/Middleware/user_projects/domains/my_domain -p
[weblogic@localhost ~]$ cd  /home/weblogic/Oracle/Middleware/user_projects/domains/my_domain
[weblogic@localhost my_domain]$ java -Xmx1024m -XX:MaxPermSize=256m weblogic.Server

来生成域下面的各种文件,包括管理服务器等的配置信息。
之后进入bin目录下,进行启动即可,最后就可以访问
http://ip:7001/console 进入控制台了。


简单启动脚本

[weblogic@localhost ~]$ cat /home/weblogic/startShell/startAdminServer.sh

#!/bin/bash
#
export  USER_MEM_ARGS="-Xms1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"
nohup /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin/startWebLogic.sh >> /home/weblogic/logs/AdminServer.log &
tail -f /home/weblogic/logs/AdminServer.log

[weblogic@localhost ~]$ cat startManagedServer01.sh

export USER_MEM_ARGS="-Xms4096m –Xmx4096m -XX:PermSize=256m -XX:MaxPermSize=512m"
nohup  /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin/startManagedWebLogic.sh testServer http://192.168.1.168:7002 >> /home/weblogic/logs/testServer.log &
tail -f /home/weblogic/logs/testServer.log

你可能感兴趣的:(Linux,weblogic)