1、创建weblogic用户
2、切换weblogic用户,进入weblogic目录
3、安装java
4、配置JAVA_HOME
vi .bash_profile
......
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export JAVA_HOME=/usr/local/jdk1.8.0_131
export JAVA_BIN=/usr/local/jdk1.8.0_131/bin
export PATH=$JAVA_HOME/jre/bin:$JAVA_BIN:$PATH
export CLASSPATH=.:JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
5、查看java -version
6、创建vi oraInst.loc
inventory_loc=/weblogic/oraInventory
inst_group=weblogic
7、创建vi wls.rsp
[ENGING]
#DONOT CHANGE THIS
ResponseFile version=1.0.0.0.0
[GENERIC]
#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/weblogic/Oracle/Middleware
#Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherece, Complete with Examples.
INSTALL_TYPE=Weblogic Server
8、文件授权 chmod 777 wls.rsp oraInst.los
9、安装weblogic12
java -jar fmw_12.2.1.3.0_wls.jar -slinet -responseFile /weblogic/wls.rsp -invPtrLoc /weblgic/oraInst.loc
10、创建域
10.1、创建域存放目录,注意读写权限
mkdir /weblogic/Oracle/Middleware/domains
10.2、进入目录创建域
cd /weblogic/Oracle/Middleware/wlserver/common/bin
./commEnv.sh
./wlst.sh
Initializing WebLogic Scripting Tool (WLST) ...
Jython scans all the jar files it can find at first startup. Depending on the system, this process may
take a few minutes to complete, and WLST may not return a prompt right away.
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline>readTemplate(' /weblogic/Oracle/Middleware/wlserver/common/templates/wls/wls.jar')
wls:/offline/base_domain>cd('Servers/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','')
wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 7001)
wls:/offline/base_domain/Server/AdminServer>cd('/')
wls:/offline/base_domain>cd('Security/base_domain/User/weblogic')
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('weblogic12c')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/weblogic/Oracle/Middleware/domains/domain')
wls:/offline/domain/Security/domain/User/weblogic>closeTemplate()
wls:/offline>exit()
12.启动weblogic
cd /usr/work/oracleProducts/domains/bin -- 进入创建的域目录bin下
./startWebLogic.sh -- 后台启动使用nohup ./startWebLogic.sh &
./stopWeblogic.sh -- 关闭weblogic