Linux centos7 Weblogic12.2安裝部署
環境準備:
jdk-8u221-linux-x64.tar.gz
fmw_12.2.1.4.0_wls_Disk1_1of1.zip
Weblogic12.2安裝部署步驟:
一、添加weblogic用戶,並設置密碼
useradd weblogic
passwd weblogic
2、添加用戶sudo權限修改 /etc/sudoers
vi /etc/sudoers
# User privilege specification
root ALL=(ALL) ALL
username ALL=(ALL) ALL 例如: weblogic ALL=(ALL) ALL
二、配置JDK1.8
#切換用戶
su weblogic
#解壓縮
#tar xvf jdk-8u221-linux-x64.tar.gz
#配置環境變量:vi .bash_profile
export JAVA_HOME=/home/weblogic/jdk1.8.0_221
export PATH=.:$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
[weblogic@mongo-svr8 ~]$ java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
三、安裝weblogic
1. 創建響應文件 wls.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= |
2' 創建Loc文件 oraInst.loc
inventory_loc=/home/weblogic/oraInventory inst_group=weblogic |
3、執行安裝
[weblogic@mongo-svr8 ~]$ java -jar fmw_12.2.1.4.0_wls.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc -ignoreSysPrereqs
-silent 表明使用靜默安裝的方式
-responseFile 指定響應文件的路徑
-invPtrLoc 指定安裝清單文件路徑
-ignoreSysPrereqs 忽略一些輸出(可以不加此選項)
安裝的時候會進行校驗,如jdk版本檢查,cpu速度,交換空間大小,臨時空間大小等,複製會顯示百分比進度條,時間較長,耐心等待。
Oracle Fusion Middleware 12c WebLogic Server 和 Coherence 12.2.1.4.0 的 安裝 已成功完成。
日誌已成功複製到/home/weblogic/oraInventory/logs。----->說明weblogic已經安裝成功了。
4. 創建域文件和創建域
4.1、創建域目錄
[weblogic@mongo-svr8 ~]$ mkdir -p /home/weblogic/oracle/Middleware/user_projects/domains/base_domain
4.2、創建:create_domain.rsp響應文件
//讀取模板,需要修改的路徑 read template from "/home/weblogic/oracle/wlserver/common/templates/wls/wls.jar"; //需要修改jdk路徑 set JavaHome "/home/weblogic/jdk1.8.0_221"; 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/oracle/Middleware/user_projects/domains/base_domain";
// The domain name will be "demo-domain"
close template; |
4.3、創建域
[weblogic@mongo-svr8 ~]$ cd /home/weblogic/oracle/wlserver/common/bin
[weblogic@mongo-svr8 bin]$ ./config.sh -mode=silent -silent_script=/home/weblogic/create_domain.rsp -logfile=/home/weblogic/create_domain.log
啓動weblogic
創建好域之後,生成了啓動weblogic的腳本
[weblogic@mongo-svr8 oracle]$ cd /home/weblogic/oracle/Middleware/user_projects/domains/base_domain [weblogic@mongo-svr8 base_domain]$ ls autodeploy bin common config console-ext fileRealm.properties init-info lib nodemanager resources security startWebLogic.sh |
設置啓動時的密碼,否則需要手動輸入
mkdir -p /home/weblogic/oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/security
cat > /home/weblogic/oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/security/boot.properties <<'EOF'
username=weblogic
password=weblogic123
EOF
手動啓動weblogic
[weblogic@mongo-svr8 oracle]$ cd /home/weblogic/oracle/Middleware/user_projects/domains/base_domain
[weblogic@mongo-svr8 base_domain]$ ./startWebLogic.sh
訪問10.1.1.31:7001/console
參考:
https://blog.csdn.net/huangbaokang/article/details/89338558
https://www.wanghaiqing.com/article/f5d711ba-22ee-464e-a47d-269034988c97/