CentOS7.X環境單機環境weblogic12.1.3靜默安裝部署

生產搭建環境:
操做系統:CentOS7.5
內存大小:16GB
硬盤:100G
注:正文中的參數與部署路徑等,請根據實際需求修改
一、軟件準備:java


jdk-8u161-linux-x64.rpm
fmw_12.1.3.0.0_wls.jarlinux


二、jdk的環境安裝與配置
(1)建立路徑,並上傳jdk安裝包,這裏使用的是rpm包web


#mkdir /opt/software/
#rpm -ivh /opt/software/jdk-8u161-linux-x64.rpmoracle


(2)配置java環境dom


#vi /etc/profile
添加以下配置
export JAVA_HOME=/usr/java/jdk1.8.0_161
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/binjvm

#source /etc/profile
#java -versionide


#vi $JAVA_HOME/jre/lib/security/java.security
添加以下配置
securerandom.source=file:/dev/./urandom優化


三、建立weblogic的用戶與組this


#groupadd ginstall
#useradd -m -g ginstall weblogic
#passwd weblogic操作系統


四、配置系統內核參數


#vi /etc/sysctl.conf
添加優化參數
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 15728640
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
fs.file-max = 6815744


#sysctl -p
五、修改系統資源限制


#vi /etc/security/limits.conf
添加以下配置
weblogic soft nproc 16384
weblogic hard nproc 16384
weblogic soft nofile 65536
weblogic hard nofile 65536
weblogic soft stack 10240


六、修改環境變量


#vi /etc/profile
添加以下配置
if [ $USER = "weblogic" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi


#source /etc/profile
七、安裝weblogic
(1)、建立安裝目錄


#mkdir -p /weblogic/rsp/oraInventory1
#mkdir /weblogic/rsp/logs
#chown -R weblogic:ginstall /weblogic


(2)、weblogic安裝配置


#su -l weblogic
$ vi /weblogic/rsp/wls.rsp
添加以下配置內容
[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 Home
ORACLE_HOME=/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 Password
MYORACLESUPPORT_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 configuration
DECLINE_SECURITY_UPDATES=true
#Set this to true if My Oracle Support Password is specified
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
#Provide the Proxy Host
PROXY_HOST=
#Provide the Proxy Port
PROXY_PORT=
#Provide the Proxy Username
PROXY_USER=
#Provide the Proxy Password
PROXY_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=


(3)、建立應答文件


$ vi /weblogic/rsp/oraInst.loc
inventory_loc=/weblogic/rsp/oraInventory
inst_group=ginstall


(4)、開始安裝


$ cd /opt/software
$ java -jar fmw_12.1.3.0.0_wls.jar -silent -responseFile /weblogic/rsp/wls.rsp -invPtrLoc /weblogic/rsp/oraInst.loc


八、建立域,注意加粗部分,須要更改密碼


$ vi /weblogic/rsp/domain.rsp
read template from "/weblogic/middleware/wlserver/common/templates/wls/wls.jar";
set JavaHome "/usr/java/jdk1.8.0_161";
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";
//We can directly create a new managed server.
create Server "base" as BASE;
set BASE.ListenAddress "";
set BASE.ListenPort "8081";
//set BASE.SSL.Enabled "true";
//set BASE.SSL.ListenPort "8082″;
//Create Machine
create Machine "base" as Machinename;
//use templates default weblogic user
find User "weblogic" as u1;
set u1.password "password";
write domain to "/weblogic/middleware/user_projects/domains/base_domain/";
// The domain name will be "base-domain"
close template;


九、建立域操做


$ cd /weblogic/middleware/wlserver/common/bin
$ ./config.sh -mode=silent -silent_script=/weblogic/rsp/domain.rsp -logfile=/weblogic/rsp/logs/domain.log


十、配置免密登陸(加粗的password須要替換爲上述建立域時所更改的密碼)


$ mkdir -p /weblogic/middleware/user_projects/domains/base_domain/servers/AdminServer/security/
$ vi /weblogic/middleware/user_projects/domains/base_domain/servers/AdminServer/security/boot.properties
username=weblogic
password=password


十一、修改jvm參數

$ vi /weblogic/middleware/user_projects/domains/base_domain/bin/setDomainEnv.sh
#根據操做系統的內存對應修改參數值,支持使用m或g,以下爲配置8G內存
WLS_MEM_ARGS_64BIT="-Xms8192m -Xmx8192m"
#或者使用以下配置
WLS_MEM_ARGS_64BIT="-Xms8g -Xmx8g"


十二、啓動weblogic


#su - weblogic
$nohup /weblogic/middleware/user_projects/domains/base_domain/bin/startWebLogic.sh >/dev/null 2>&1 &


1三、中止weblogic


#su - weblogic
$nohup /weblogic/middleware/user_projects/domains/base_domain/bin/stopWebLogic.sh >/dev/null 2>&1 &


1四、訪問weblogic控制檯
http://IP-ADDR:7001/console

相關文章
相關標籤/搜索