本次测试环境为rhel7.3+weblogic12.2.1.2+jdk1.8.0_121
weblogic安装的的用户和组为weblogic.weblogic
weblogic安装目录为/home/weblogic/oracle
jdk安装目录为/usr/java/jdk1.8.0_121/
一:首先是依赖包的检测,官网给出的依赖包如下
binutils-2.23.52.0.1
compat-libcap1-1.10
compat-libstdc++-33-3.2.3.x86_64
compat-libstdc++-33-3.2.3.i686
gcc-4.8.2
gcc-c++-4.8.2
glibc-2.17.x86_64
glibc-2.17.i686
glibc-devel-2.17.x86_64
libaio-0.3.109.x86_64
libaio-devel-0.3.109.x86_64
libgcc-4.8.2.x86_64
libgcc-4.8.2.i686
libstdc++-4.8.2.x86_64
libstdc++-4.8.2.i686
libstdc++-devel-4.8.2.x86_64
ksh
make-3.82
sysstat-10.1.5
numactl-2.0.9.x86_64
numactl-devel-2.0.9.x86_64
motif-2.3.4-7.x86_64
motif-devel-2.3.4-7.x86_64
rpm -q binutils compat-libcap1 compat-libstdc++ gcc gcc-c++ glibc glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel ksh make sysstat numactl numactl-devel motif motif-devel
配置好本地yum源后
yum install compat-libcap1 compat-libstdc++ gcc gcc-c++ glibc-devel libaio-devel libstdc++-devel ksh numactl numactl-devel motif motif-devel
二:安装weblogic软件
1:配置响应文件
vi /home/weblogic/response/wls.rsp
[ENGINE]
Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/home/weblogic/oracle
INSTALL_TYPE=WebLogic Server
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=<SECURE VALUE>
DECLINE_SECURITY_UPDATES=true
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=<SECURE VALUE>
COLLECTOR_SUPPORTHUB_URL=
vi /home/weblogic/response/oraInst.loc
inventory_loc=/home/weblogic/oraInventory
inst_group=weblogic
export MW_HOME=/home/weblogic/oracle
export WLS_HOME=$MW_HOME/wlserver
export WL_HOME=$WLS_HOME
export JAVA_HOME=/usr/java/jdk1.8.0_121/
export PATH=$JAVA_HOME/bin:$PATH
安装
java -jar fmw_12.2.1.0.0_wls.jar -silent -responseFile /home/weblogic/response/wls.rsp -invPtrLoc /home/weblogic/response/oraInst.loc
2:创建域
①:通过响应文件创建
vi /home/weblogic/response/create_domain.rsp
read template from "/home/weblogic/oracle/wlserver/common/templates/wls/wls.jar";
set JavaHome "/usr/java/jdk1.8.0_121/";
set ServerStartMode "dev";
find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "";
set AdminServer.ListenPort "7001";
//set AdminServer.SSL.Enabled "true";
//set AdminServer.SSL.ListenPort "8002";
//We can directly create a new managed server.
create Server "server_1" as server_1;
set server_1.ListenAddress "192.168.50.85";
set server_1.ListenPort "7011";
//set server_1.SSL.Enabled "true";
//set server_1.SSL.ListenPort "8004″;
//Create Machine
create Machine "Machinename_1" as Machinename;
//use templates default weblogic user
find User "weblogic" as u1;
set u1.password "weblogic123";
//create a new user
create User "weblogic2" as u2;
set u2.password "weblogic123";
write domain to "/home/weblogic/oracle/user_projects/domains/base_domain/";
// The domain name will be "demo-domain"
./config.sh -mode=silent -silent_script=/home/weblogic/response/create_domain.rsp -logfile=/home/weblogic/response/creat_domain.log
②:通过wlst-tool创建
./wlst.sh
readTemplate('/home/weblogic/oracle/wlserver/common/templates/wls/wls.jar')
cd('Servers/AdminServer')
cmo.setListenAddress('192.168.50.85')
setOption('ServerStartMode','prod')
set('ListenPort',7001)
create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled','True')
set('ListenPort',7002)
cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('weblogic123')
setOption('ServerStartMode','prod')
setOption('OverwriteDomain','true')
writeDomain('/home/weblogic/oracle/user_projects/domains/base_domain')
closeTemplate()
exit()