Following the installation of Oracle Fusion Middleware components, it is advisable to configure those as Windows operating system services. A typical WebLogic installation has the script for installing or removing Node Manager as a Windows service under the DOMAIN_HOME\bin directory. However, for both the WebLogic Admin Server and the managed server, you will need to create scripts.
Let’s explore how to accomplish this task by registering the Admin Server, Node Manager, and a managed server (such as WLS_FORMS) in this practice. Remember to invoke Windows Command Prompt as Administrator while performing these steps.
1. Node Manager
a. Update the nodemanager.properties file to include the below –
CrashRecoveryEnabled=true
StartScriptEnabled=true
b. Run the batch script –
C:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain\bin\installNodeMgrSvc
c. From Windows services.MSc, you can find the Node Manager service component created
d. Change its startup properties to be run as a user with admin privileges
e. Start the Node Manager service
2. WebLogic Admin Server
a. Create a batch file under DOMAIN_HOME\bin with the contents shown
C:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain\bin\installWlsAdminSvc.cmd
SETLOCAL
set WL_HOME=D:\Oracle\Middleware\Oracle_Home\wlserver
set DOMAIN_NAME=FormsDomain
set USERDOMAIN_HOME=D:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain
set SERVER_NAME=AdminServer
set MEM_ARGS=-Xms128m -Xmx512m
call "D:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain\bin\setDomainEnv.cmd"
call "D:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"
ENDLOCAL
b. Create a corresponding uninstall batch file as well
C:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain\bin\uninstallWlsAdminSvc.cmd
echo off
SETLOCAL
set WL_HOME=D:\Oracle\Middleware\Oracle_Home\wlserver
set DOMAIN_NAME=FormsDomain
set USERDOMAIN_HOME=D:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain
set SERVER_NAME=AdminServer
call "D:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain\bin\setDomainEnv.cmd"
call "D:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\uninstallSvc.cmd"
ENDLOCAL
c. Run the script to install WebLogic Admin Windows service
d. Before starting the service, modify its properties as was done for Node Manager
3. Forms Managed Server
a. Create a batch file under DOMAIN_HOME\bin; you will need to pass WebLogic credentials
C:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain\bin\installFormsSvc.cmd
echo off
SETLOCAL
set WL_HOME=C:\Oracle\Middleware\Oracle_Home\wlserver
set DOMAIN_NAME=FormsDomain
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain
set SERVER_NAME=WLS_FORMS
set ADMIN_URL=http://127.0.0.1:7001
set WLS_USER=weblogic
set WLS_PW=password
set MEM_ARGS=-Xms256m -Xmx1024m
call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\FormsDomain\bin\setDomainEnv.cmd"
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"
ENDLOCAL
b. Create a corresponding batch file to uninstall the WLS_FORMS service
c. Run the script to register the Forms managed server as Windows service
d. Before starting the service, modify its properties. In this example, the Forms service is configured to be started manually from Windows services