/ Weblogic

Como instalar o Weblogic 12c via instalação silenciosa.

Nesse post ensinarei como instalar o Weblogic 12c em modo silencioso, pois a instalação via modo-texto (console) foi removida na ultima versão.

Oracle Logo

Configuração do ambiente:

Sistema Operacional: Red Hat Enterprise Linux Server release 6.3 (Santiago)
Java: JDK 7 u79
Produto: Weblogic 12c (generic)
Usuário e grupo: weblogic / oinstall
Diretório de instalação: /app/oracle/middleware
Nome do domínio: myDomain
Admin Server: weblogic
Senha: Password#001
Porta: 7001 / 7002 (https)


Preparação para instalação:

  1. Criação do grupo e usuário owner do Weblogic.
groupadd oinstall
adduser -g oinstall weblogic
  1. Instalar do java JDK 7.
rpm -ivh jdk-7u79-linux-x64.rpm
  1. Exportar as variáveis de ambiente:
export WL_HOME=/app/oracle/middleware/wlserver
export CONFIG_JVM_ARGS=-Djava.security.egd=file:/dev/./urandom
  1. Criar arquivos que serão utilizados durante a instalação silenciosa.
mkdir /app/install

Arquivo: oraInst.loc

inventory_loc=/app/oracle/inventory
inst_group=admweb

Arquivo: Install.rsp

[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0

[GENERIC]

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/app/oracle/middleware

#Set this variable value to the Installation Type selected. e.g. Fusion Middleware Infrastructure, Fusion Middleware Infrastructure 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=

Obs: Altere o arquivo de acordo com as suas necessidades.


Instalação do produto

  1. Iniciando o processo de instalação:
java -jar fmw_12.1.3.0.0_wls.jar -silent -invPtrLoc /app/install/oraInst.loc -responseFile /app/install/Install.rsp

Saída esperada:

[weblogic@16879559ecd3 install]$ java -jar fmw_12.1.3.0.0_wls.jar -silent -invPtrLoc /app/install/oraInst.loc -responseFile /app/install/Install.rsp
Launcher log file is /tmp/OraInstall2015-07-16_01-58-16PM/launcher2015-07-16_01-58-16PM.log.
Extracting files...............
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz.   Actual 2593.787 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 967196 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 11270 MB    Passed


Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2015-07-16_01-58-16PM
Log: /tmp/OraInstall2015-07-16_01-58-16PM/install2015-07-16_01-58-16PM.log
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Starting check : CertifiedVersions
/bin/cat: /proc/sys/net/core/wmem_default: No such file or directory
Starting check : CheckJDKVersion
Expected result: 1.7.0_15
Actual Result: 1.7.0_79
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.
Validations are enabled for this session.
Verifying data......
Copying Files...
You can find the log of this install session at:
 /tmp/OraInstall2015-07-16_01-58-16PM/install2015-07-16_01-58-16PM.log
-----------20%----------40%----------60%----------80%--------100%

The installation of Oracle Fusion Middleware 12c WebLogic Server and Coherence 12.1.3.0.0 completed successfully.
Logs successfully copied to /app/oracle/inventory/logs.
[weblogic@16879559ecd3 install]$
  1. Verifique se o produto foi instalado corretamente:
ls -la /app/oracle/middleware/

Pós instalação

  1. Criando AdminServer e domínio.

Crie o arquivo createDomain.py com o seguinte conteúdo:

Arquivo: createDomain.py

readTemplate('/app/oracle/middleware/wlserver/common/templates/wls/wls.jar')
cd('Servers/AdminServer')
cmo.setListenAddress('0.0.0.0')
setOption('ServerStartMode','prod')
set('ListenPort', 7001)
create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled', 'True')
set('ListenPort', 7002)
cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('Password#001')
setOption('ServerStartMode','prod')
setOption('OverwriteDomain', 'true')
writeDomain('/app/oracle/middleware/user_projects/domains/myDomain')
closeTemplate()
exit()
```

8) Execute o script via WLST.

```
cd /app/oracle/middleware/wlserver/common/bin
./wlst.sh /app/install/createDomain.py
```

Verifique se o dominio foi criado:

```
ls -la /app/oracle/middleware/user_projects/domains/myDomain/
```

9) Inicie a AdminServer.

```
cd /app/oracle/middleware/user_projects/domains/myDomain/bin/
./startWebLogic.sh
```

10) Valide se o serviço está funcionando corretamente:

Abra o browser e digite: http://host:7001 ou https://host:7002

Abraços.