liangsw  

一、环境

1、linux版本:CentOS7 64bit(安装略)

2、fmw_12.2.1.3.0_wls_quick.jar

3、jdk-1.8.0_91-linux-x64.tar.gz (安装略)

二、安装步骤

1、创建安装用户及授权

# Root用户执行
groupadd weblogic # 添加用户组
useradd -g weblogic weblogic  # 添加用户:useradd -g 用户组 用户名
passwd weblogic
# 授权
# chown -R 组:用户 目录
chown -R weblogic:weblogic /home/weblogic/
chmod 777 -R /home/weblogic  # 生产环境适量而设
su - weblogic

2、weblogic用户的.bash_profile文件中新增配置项

$vi .bash_profile
 
export JAVA_HOME=/home/weblogic/jdk1.7.0_79
export JRE_HOME=/home/weblogic/jdk1.7.0_79/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
export ORACLE_HOME=/home/weblogic/bea
# 使配置生效 
[weblogic@localhost ~]$ source .bash_profile

3、在/home/weblogic目录下创建文件:wsl.rsp

[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
 
ORACLE_HOME=/home/weblogic/oracle
 
#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=

4、在/home/weblogic目录下创建文件:oraInst.loc

inventory_loc=/home/weblogic/oraInventory
inst_group=weblogic

5、执行安装:

[weblogic@localhost ~]$ java -jar fmw_12.2.1.3.0_wls_quick.jar -silent -responseFile /home/weblogic/wsl.rsp -invPtrLoc  /home/weblogic/oraInst.loc

6、查看安装存放路径

[weblogic@localhost ~]$ cd wls12213/

[weblogic@localhost wls12213]$ pwd

/home/weblogic/wls12213

[weblogic@localhost wls12213]$ ll

total 20

drwxr-x---.  4 weblogic weblogic   33 Dec 15 14:19 cfgtoollogs

drwxr-x---.  5 weblogic weblogic   58 Dec 15 14:17 coherence

drwxr-x---. 19 weblogic weblogic 4096 Dec 15 14:19 inventory

drwxr-x---. 11 weblogic weblogic 4096 Dec 15 14:18 OPatch

drwxr-x---.  9 weblogic weblogic   96 Dec 15 14:17 oracle_common

-rw-r-----.  1 weblogic weblogic  133 Dec 15 14:19 oraInst.loc

drwxr-x---.  8 weblogic weblogic 4096 Dec 15 14:19 oui

-rwx------.  1 weblogic weblogic   10 Dec 15 14:16 root.sh

drwxr-x---.  7 weblogic weblogic   76 Dec 15 14:17 wlserver

7、新建域目录:

[weblogic@localhost ~]$ mkdir -p /home/weblogic/wls12213/user_projects/domains/base_domain/

8、在home/weblogic创建域脚本create_domain.rsp:

read template from "/home/weblogic/wls12213/wlserver/common/templates/wls/wls.jar";
 
set JavaHome "/usr/java/default";
set ServerStartMode "prod";
 
find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "";
set AdminServer.ListenPort "7001";
set AdminServer.SSL.Enabled "true";
set AdminServer.SSL.ListenPort "7002";
 
//Create Machine
//create Machine "base" as Machinename;
 
//use templates default weblogic user
find User "weblogic" as u1;
set u1.password "weblogic";
 
write domain to "/home/weblogic/wls12213/user_projects/domains/base_domain/";
 
// The domain name will be "demo-domain"
 
close template;

9、切换到/home/weblogic/wls12213/wlserver/common/bin目录:

[weblogic@localhost bin]$ cd /home/weblogic/wls12213/wlserver/common/bin

[weblogic@localhost bin]$ pwd

/home/weblogic/wls12213/wlserver/common/bin

[weblogic@localhost bin]$ ll

total 68

-rwxr-x---. 1 weblogic weblogic   583 Aug 10  2017 config.sh
-rwxr-x---. 1 weblogic weblogic   578 Aug 10  2017 pack.sh
-rwxr-x---. 1 weblogic weblogic   582 Aug 10  2017 unpack.sh
-rwxr-x---. 1 weblogic weblogic 35171 Aug 21  2017 wlscontrol.sh
-rwxr-x---. 1 weblogic weblogic 16286 Aug 21  2017 wlsifconfig.sh
-rwxr-x---. 1 weblogic weblogic   807 Aug 10  2017 wlst.sh

10、执行创建域脚本:

[weblogic@localhost bin]$ ./config.sh -mode=silent -silent_script=/home/weblogic/create_domain.rsp -logfile=/home/weblogic/create_domain.log

WARNING: This is a deprecated script. Please invoke the config.sh script under oracle_common/common/bin.

<< read template from "/home/weblogic/wls12213/wlserver/common/templates/wls/wls.jar"

>>  succeed: read template from "/home/weblogic/wls12213/wlserver/common/templates/wls/wls.jar"

<< set config option JavaHome to "/usr/java/default"

>>  succeed: set config option JavaHome to "/usr/java/default"

<< set config option ServerStartMode to "prod"

>>  succeed: set config option ServerStartMode to "prod"

<< find Server "AdminServer" as AdminServer

>>  succeed: find Server "AdminServer" as AdminServer

<< set AdminServer attribute ListenAddress to ""

>>  succeed: set AdminServer attribute ListenAddress to ""

<< set AdminServer attribute ListenPort to "7010"

>>  succeed: set AdminServer attribute ListenPort to "7010"

<< set AdminServer attribute SSL!Enabled to "true"

>>  succeed: set AdminServer attribute SSL!Enabled to "true"

<< set AdminServer attribute SSL!ListenPort to "7002"

>>  succeed: set AdminServer attribute SSL!ListenPort to "7002"

<< find User "weblogic" as u1

>>  succeed: find User "weblogic" as u1

<< set u1 attribute Password to "********"

>>  succeed: set u1 attribute Password to "********"

<< write Domain to "/home/weblogic/wls12213/user_projects/domains/base_domain/"

..................................................

>>  succeed: write Domain to "/home/weblogic/wls12213/user_projects/domains/base_domain/"

<< close template

>>  succeed: close template

11、启动

[weblogic@localhost ~]$ cd /home/weblogic/wls12213/user_projects/domains/base_domain/bin
[weblogic@localhost ~]$ ././startWebLogic.sh

# 根据控制台信息 输入用户名及密码;

12、参考链接:https://blog.csdn.net/u011830122/article/details/85345685 ;

posted on 2019-03-07 00:04  liangsw  阅读(394)  评论(0编辑  收藏  举报