1、创建weblogic用户
groupadd weblogic
useradd -g weblogic weblogic
passwd weblogic
chown -R weblogic:weblogic /home/weblogic
su weblogic
2、配置用户JDK环境变量
将jdk解压到/usr/local/java
vi ~/.bashrc
export JAVA_HOME=/usr/local/java/jdk1.8.0_152
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$PATH:$HOME/bin$JAVA_HOME/bin:$JAVA_HOME/jre/bin
source ~/.bashrc
3、安装配置文件
vi /home/weblogic/settings/oraInst.loc
inventory_loc=/home/weblogic/settings/oraInventory1
inst_group=weblogic
vi /home/weblogic/settings/wsl.rsp
[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为weblogic的安装目录
ORACLE_HOME=/home/weblogic/Middleware
#The federated oracle home locations. This should be an existing Oracle Home. Multiple values can be provided as comma seperated values
FEDERATED_ORACLE_HOMES=
#Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples.
INSTALL_TYPE=WebLogic Server
4、安装命令
两个配置文件必须决定路径
将安装包放到/home/weblogic/settings/
java -jar /home/weblogic/settings/fmw_12.1.3.0.0_wls.jar -silent -responseFile /home/weblogic/settings/wls.rsp -invPtrLoc /home/weblogic/settings/oraInst.loc
5、创建运行域准备
mkdir -p /home/weblogic/Middleware/user_projects/domains/mydomain/
vi /home/weblogic/settings/create_domain.rsp
#内容不能有空行,不能有注释行
read template from "/home/weblogic/Middleware/wlserver/common/templates/wls/wls.jar";
set JavaHome "/opt/jdk1.8.0_65";
set ServerStartMode "prod";
find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "";
set AdminServer.ListenPort "7001";
set AdminServer.SSL.Enabled "true";
set AdminServer.SSL.ListenPort "7002";
find User "weblogic" as u1;
set u1.password "Weblogic@123";
write domain to "/home/weblogic/Middleware/user_projects/domains/mydomain/";
close template;
6、创建运行域
cd /home/weblogic/Middleware/wlserver/common/bin
./config.sh -mode=silent -silent_script=/home/weblogic/settings/create_domain.rsp -logfile=/home/weblogic/settings/create_domain..log
7、启动运行域
cd /home/weblogic/Middleware/user_projects/domains/mydomain/bin
./startWeblogic.sh
#出现Running字样的时候表示启动生成
8、登录控制台
我的服务器ip是192.168.0.100
http://192.168.0.100:7001/console
9、删除运行域
rm -rf /home/weblogic/Middleware/user_projects/domains/mydomain/
vi /home/weblogic/Middleware/domain-registory.xml
#删除mydomain相关配置,就一行很好找