1. Install JDK software
1) jdk version selection
Since the class file compiled by jdk is a binary file, the first four bytes are magic bits, and the fifth to sixth bytes correspond to minor and major. The minor and major of the class file can be viewed through ultraedit or java's own programming tools (javap -v [ServiceImpl.class] or javap -verbose [ServiceImpl.class] can be replaced with the compiled class file when using it).
major | minor | Java platform version |
45 | 3 | 1.0 |
45 | 3 | 1.1 |
46 | 0 | 1.2 |
47 | 0 | 1.3 |
48 | 0 | 1.4 |
49 | 0 | 1.5 |
50 | 0 | 1.6 |
51 | 0 | 1.7 |
52 | 0 | 1.8 |
2. Install weblogic software
2.1) Graphical interface installation
If you check the automatic configuration wizard in step 9, it will automatically jump to the domain creation wizard interface, as follows:
Configure the console login account password:
Domain Mode Selection:
Configure listening port and address IP
2.2) Character interface installation
--to be improved
3. Start the service
3.1) Find starWebLogic.cmd under the WebLogic Server installation path, double-click to start, and start the service
cd C:\Apps\Middleware\wls12\user_projects\domains\example_domain
Double-click the "starWebLogic.cmd" file to start
--Prompt for console account and password (production mode)
4. Login console window
Enter in the address bar: http://win2012:7002/console, press Enter; enter the WebLogic Server management console login interface, enter the user name and password
After successful login, enter the main interface of the WebLogic Server management console
5. The administrator account password is required to be entered every time the production mode is started--solution
5.1) Create a boot.properties file in security\ boot.properties in the domain directory. example:
username=weblogic
password=weblogic
Here you only need to specify the username and password (corresponding to the username and password when you created the domain). And you don't have to worry about the leakage of username and password. After starting Weblogic for the first time, the system will automatically encrypt the relevant content.
5.2) Modify the JAVA_OPTIONS parameter in startWebLogic.cmd/sh: Example:
startWebLogic.cmd under windows:
JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.management.username=weblogic -Dweblogic.management.password=weblogic
startWebLogic.sh under linux/unix
JAVA_OPTIONS="$JAVA_OPTIONS -Dweblogic.management.username=weblogic -Dweblogic.management.password=weblogic"
6. In the Windows environment, register it as a service method
cmd --> set MW_HOME=C:\Apps\Middleware\wls12 set DOMAIN_NAME=example_domain set SERVER_NAME=AdminServer set USERDOMAIN_HOME=C:\Apps\Middleware\wls12\user_projects\domains\example_domain
installSvc.cmd
installSvc.cmd execution process
C:\Apps\Middleware\wls12\wlserver\server\bin>installSvc.cmd C:\Apps\Middleware\wls12\wlserver\server\bin>set CLASSPATH=C:\Java\JDK18~1.0_1\lib\tools.jar;C:\Apps\MIDDLE~1\wls12\wlserver\server\lib\weblogic.jar;C:\Apps\MIDDLE~1\wls12\oracle_common\modules\net.sf.antcontrib_1.1.0.0_1-0b3\lib\ant-contrib.jar;C:\Apps\MIDDLE~1\wls12\wlserver\modules\features\oracle.wls.common.nodemanager.jar;C:\Apps\MIDDLE~1\wls12\wlserver\server\bin;C:\Java\JDK18~1.0_1\lib\dt.jar;C:\Java\JDK18~1.0_1\lib\tools.jar *************************************************** * To start WebLogic Server, use the password * * assigned to the system user. The system * * username and password must also be used to * * access the WebLogic Server console from a web * * browser. * *************************************************** C:\Apps\Middleware\wls12\wlserver\server\bin>rem *** Set Command Line for service to execute within created JVM C:\Apps\Middleware\wls12\wlserver\server\bin>set CMDLINE="-server -Xms32m -Xmx200m -Xverify:none -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -classpath \"C:\Java\JDK18~1.0_1\lib\tools.jar;C:\Apps\MIDDLE~1\wls12\wlserver\server\lib\weblogic.jar;C:\Apps\MIDDLE~1\wls12\oracle_common\modules\net.sf.antcontrib_1.1.0.0_1-0b3\lib\ant-contrib.jar;C:\Apps\MIDDLE~1\wls12\wlserver\modules\features\oracle.wls.common.nodemanager.jar;C:\Apps\MIDDLE~1\wls12\wlserver\server\bin;C:\Java\JDK18~1.0_1\lib\dt.jar;C:\Java\JDK18~1.0_1\lib\tools.jar\" -Dweblogic.Name=AdminServer -Dweblogic.management.username= -Dweblogic.ProductionModeEnabled= -Djava.security.policy=\"C:\Apps\MIDDLE~1\wls12\wlserver\server\lib\weblogic.policy\" weblogic.Server" C:\Apps\Middleware\wls12\wlserver\server\bin>rem *** Set up extrapath for win32and win64 platform separately C:\Apps\Middleware\wls12\wlserver\server\bin>set WLSVC_EXE_TO_USE=wlsvcx64 C:\Apps\Middleware\wls12\wlserver\server\bin>if "false" == "true" (set EXTRAPATH=C:\Apps\MIDDLE~1\wls12\wlserver\server\native\win\32;C:\Apps\MIDDLE~1\wls12\wlserver\server\bin;C:\Java\JDK18~1.0_1\jre\bin;C:\Java\JDK18~1.0_1\bin;C:\Apps\MIDDLE~1\wls12\wlserver\server\native\win\32\oci920_8 set WLSVC_EXE_TO_USE=wlsvc) C:\Apps\Middleware\wls12\wlserver\server\bin>if "false" == "true" ( set EXTRAPATH=C:\Apps\MIDDLE~1\wls12\wlserver\server\native\win\64\;C:\Apps\MIDDLE~1\wls12\wlserver\server\bin;C:\Java\JDK18~1.0_1\jre\bin;C:\Java\JDK18~1.0_1\bin;C:\Apps\MIDDLE~1\wls12\wlserver\server\native\win\64\oci920_8 set WLSVC_EXE_TO_USE=wlsvc64 ) C:\Apps\Middleware\wls12\wlserver\server\bin>if "true" == "true" ( set EXTRAPATH=C:\Apps\MIDDLE~1\wls12\wlserver\server\native\win\x64\;C:\Apps\MIDDLE~1\wls12\wlserver\server\bin;C:\Java\JDK18~1.0_1\jre\bin;C:\Java\JDK18~1.0_1\bin;C:\Apps\MIDDLE~1\wls12\wlserver\server\native\win\x64\oci920_8 set WLSVC_EXE_TO_USE=wlsvcx64 ) C:\Apps\Middleware\wls12\wlserver\server\bin>rem *** Install the service C:\Apps\Middleware\wls12\wlserver\server\bin>"C:\Apps\MIDDLE~1\wls12\wlserver\server\bin\wlsvcx64" -install -svcname:"wlsvc example_domain_AdminServer" -svcdescription:""WebLogicServer"" -javahome:"C:\Java\JDK18~1.0_1" -execdir:"C:\Apps\Middleware\wls12\user_projects\domains\example_domain" -maxconnectretries:"" -host:"" -port:"" -extrapath:"C:\Apps\MIDDLE~1\wls12\wlserver\server\native\win\x64\;C:\Apps\MIDDLE~1\wls12\wlserver\server\bin;C:\Java\JDK18~1.0_1\jre\bin;C:\Java\JDK18~1.0_1\bin;C:\Apps\MIDDLE~1\wls12\wlserver\server\native\win\x64\oci920_8" -password:"" -cmdline:"-server -Xms32m -Xmx200m -Xverify:none -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -classpath \"C:\Java\JDK18~1.0_1\lib\tools.jar;C:\Apps\MIDDLE~1\wls12\wlserver\server\lib\weblogic.jar;C:\Apps\MIDDLE~1\wls12\oracle_common\modules\net.sf.antcontrib_1.1.0.0_1-0b3\lib\ant-contrib.jar;C:\Apps\MIDDLE~1\wls12\wlserver\modules\features\oracle.wls.common.nodemanager.jar;C:\Apps\MIDDLE~1\wls12\wlserver\server\bin;C:\Java\JDK18~1.0_1\lib\dt.jar;C:\Java\JDK18~1.0_1\lib\tools.jar\" -Dweblogic.Name=AdminServer -Dweblogic.management.username= -Dweblogic.ProductionModeEnabled= -Djava.security.policy=\"C:\Apps\MIDDLE~1\wls12\wlserver\server\lib\weblogic.policy\" weblogic.Server"wlsvc example_domain_AdminServer installed. C:\Apps\Middleware\wls12\wlserver\server\bin>ENDLOCAL --# 启动服务 C:\Apps\Middleware\wls12\wlserver\server\bin> net start "wlsvc example_domain_AdminServer"
7. Create server through console
7.1) Create server
-- lock and edit first
7.2) Start server0
cd C:\Apps\Middleware\wls12\user_projects\domains\example_domain\bin
startManagedWebLogic.cmd Server-0 http://192.168.10.143:7002
Precautions:
1) The jdk version problem causes the installation to fail--use the 1.7 version jdk instead