Friday, August 19, 2016

How To Install Oracle WebLogic Server 12.2.1.1.0 Using Silent Mode ?

Summary 

     1) Create OS User and Group
     2) Create Required Directories
     3) Assign The Ownership and Permission To Directories
     4) Install the JDK and Export The JAVA_HOME in .bash_profile
     5) Prepare The Response file.
     6) Create The File oraInst.loc And add inventory_loc and inst_group
     7) Start The WebLogic Server Binaries Installation Using Silent Mode
     8) Create WebLogic Domain Using WLST.


1. Create OS User and Group

       groupadd -g 54321 oinstall
       useradd -u 54322 -g oinstall oracle
       passwd oracle













2. Create Required Directories 

       mkdir -p /oracle/Middleware
       mkdir -p /jdk/jvm


3. Assign The Ownership and Permission To Directories 

     chown -R oracle:oinstall /oracle
     chown -R oracle:oinstall /jdk
     chmod 775 /oracle
     chmod 775 /jdk






4. Install the JDK and Export The JAVA_HOME in .bash_profile

      su - oracle
      tar -zxvf jdk-8u92-linux-x64.tar.gz


export JAVA_HOME=/jdk/jvm/jdk1.8.0_92
export PATH=$JAVA_HOME/bin:$PATH


5. Prepare The Response file.

Create response file with below content (Note: change the ORACLE_HOME as per your environment need)


-----------------------------------------------------------------------------------------------------------
[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true

#My Oracle Support User Name
MOS_USERNAME=

#My Oracle Support Password
MOS_PASSWORD=<SECURE VALUE>

#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=

#Proxy Server Name to connect to My Oracle Support
SOFTWARE_UPDATES_PROXY_SERVER=

#Proxy Server Port
SOFTWARE_UPDATES_PROXY_PORT=

#Proxy Server Username
SOFTWARE_UPDATES_PROXY_USER=

#Proxy Server Password
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>

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

#Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples.
INSTALL_TYPE=Complete with Examples

#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=

---------------------------------------------------------------------------------------------------------------


6. Create The File oraInst.loc And add inventory_loc and inst_group


Create The File /etc/oraInst.loc using root user And The Below Content Into It.

inventory_loc=/home/oracle
inst_group=oinstall 



7. Start The WebLogic Server Binaries Installation Using Silent Mode

Use below command for installing weblogic binaries in silent mode

 java -jar fmw_12.2.1.1.0_wls.jar -silent -responseFile /oracle/setup/wls12211.rsp -invPtrLoc /etc/oraInst.loc -force



8. Create WebLogic Domain Using WLST.

       a) Create the python script wls_prod_domain with below content

----------------------------------------------------------------------------------------------------------
# Select the template to use for creating the domain

selectTemplate('Basic WebLogic Server Domain','12.2.1.1')
loadTemplates()

# Set the listen address and listen port for the Administration Server

cd('/Servers/AdminServer')
set('ListenAddress','192.168.142.128')
set('ListenPort',7001)

#Enable SSL on the Administration Server and set the SSL listen address and Port

create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled','false')
set('ListenPort', 7002)

# Set the domain password for the WebLogic Server administration user

cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('welcome1')

# If the domain already exists, overwrite the domain

setOption('OverwriteDomain','true')

# write the domain and close the template

writeDomain('/oracle/Middleware/user_projects/domains/prod_domain')
closeTemplate()
exit()

---------------------------------------------------------------------------------------------------------------


   b) Execute below WLST command for creating prod_domain.

         java weblogic.WLST wls_prod_domain.py



    c) Start the weblogic server using below command 

          cd /oracle/Middleware/user_projects/domains/prod_domain/bin
          nohup ./startWebLogic.sh &


    d) Access The weblogic console using below URL



No comments:

Post a Comment