准备
- Linux CentOS6.9 系统
- Weblogic 12c
- JDK 1.8
下载Weblogic Server
直接去官网下载,下载需要用户名和密码,如果没有注册一个即可
解压
解压获得到fmw_12.2.1.0.0_wls.jar文件
安装Weblogic Server
准备
- 如果没有安装JDK,需要安装,保证环境变量正确
新建用户组weblogic
1#groupadd weblogic新建用户weblogic 并修改用户密码
添加用户,并用-g参数来制定 web用户组12#useradd -g weblogic weblogic#passwd 密码切换到weblogic用户
- 准备安装目录 1/opt/weblogic
安装
创建响应文件wls.rsp
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950[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 HomeORACLE_HOME=/opt/weblogic/middleware#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 PasswordMYORACLESUPPORT_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 configurationDECLINE_SECURITY_UPDATES=true#Set this to true if My Oracle Support Password is specifiedSECURITY_UPDATES_VIA_MYORACLESUPPORT=false#Provide the Proxy HostPROXY_HOST=#Provide the Proxy PortPROXY_PORT=#Provide the Proxy UsernamePROXY_USER=#Provide the Proxy PasswordPROXY_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=创建Loc文件 oraInst.loc
1234# vi /opt/weblogic/oraInst.locinventory_loc=/opt/weblogic/oraInventoryinst_group=weblogic保证所需要得目录weblogic用户要用读写权限
- 安装, wls.rsp,oraInst.loc必须指定绝对路径1# java -jar fmw_12.2.1.0.0_wls.jar -silent -responseFile /opt/weblogic/wls.rsp -invPtrLoc /opt/weblogic/oraInst.loc
|
|
看到上面的日志表示安装成功
创建domain
准备脚本
12# cd /opt/weblogic/middleware/wlserver/common/templates/scripts/wlst/# cp basicWLSDomain.py create_domain.py修改create_domain.py脚本
设置密码
1234找到# Please set password here before using this script, e.g. cmo.setPassword('value')添加cmo.setPassword('密码')删除其他暂时用不到的
123# Create a JMS Server.到# Write the domain and close the domain template.
执行脚本
|
|
等待成功…
启动server
|
|
问题
在创建domain和启动server特别慢的时候,需要修改或添加环境配置
修改JAVA_HOME/lib/security目录下java.security
|
|
或添加环境变量
|
|
结语
安装好weblogic才是第一步,后续还有很多要学习的