卸载weblogic
find /opt/weblogic3/Oracle/ -name deinstall.sh
./deinstall.sh -silent
安装步骤
1.创建weblogic组
groupadd weblogic
2.创建weblogic用户
useradd -g weblogic weblogic
3.为用户创建密码
passwd weblogic
4.拷贝weblogic安装包到/usr/local/src/weblogic/下,修改文件的权限
chown -R weblogic:weblogic /usr/local/src/weblogic/
5.切换到weblogic用户
su - weblogic
6.解压安装包
7.在/usr/local/src/weblogic/目录下新建文件wsl.rsp,输入内容(设置安装存放路径为:/usr/local/src/weblogic/oracle):
[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=/usr/local/src/weblogic/oracle
INSTALL_TYPE=WebLogic Server
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=
8.在/usr/local/src/weblogic/ 目录下新建文件oraInst.loc,输入内容:
inventory_loc=/usr/local/src/weblogic/oraInventory
inst_group=weblogic
9.执行安装操作(命令必须为绝对路径)
java -jar fmw_12.2.1.4.0_wls.jar -silent -responseFile /usr/local/src/weblogic/wsl.rsp -invPtrLoc /usr/local/src/weblogic/oraInst.loc
出现如下内容,安装成功
Launcherlogfileis /tmp/OraInstall2018-12-15_02-15-57PM/launcher2018-12-15_02-15-57PM.log.
Extracting the installer . . . . Done
Checking if CPU speed is above 300 MHz. Actual 2394.455 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 4095 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Checking temp space: must be greater than 300 MB. Actual 3195 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2018-12-15_02-15-57PM
Log: /tmp/OraInstall2018-12-15_02-15-57PM/install2018-12-15_02-15-57PM.log
*****************************************************
Distribution Name : Oracle Fusion Middleware 12c WebLogic and Coherence Developer
Distribution Version : 12.2.1.3.0
Oracle Inventory : /usr/local/src/weblogic/oraInventory
Oracle Home : /usr/local/src/weblogic/wls12213
Java Home : /usr/java/jdk1.8.0_11
Validations are enabled for this session.
Verifying data
Copying Files
Percent Complete : 10
Percent Complete : 20
Percent Complete : 30
Percent Complete : 40
Percent Complete : 50
Percent Complete : 60
Percent Complete : 70
Percent Complete : 80
Percent Complete : 90
10.新建域目录
mkdir -p /usr/local/src/weblogic/oracle/user_projects/domains/h5_domain/
11.在/usr/local/src/weblogic创建域脚本create_domain.rsp,输入内容:
read template from "/usr/local/src/weblogic/oracle/wlserver/common/templates/wls/wls.jar";
set JavaHome "/usr/java/jdk1.8.0_77";
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";
//Create Machine
//create Machine "h5" as Machinename;
//use templates default weblogic user
find User "weblogic" as u1;
set u1.password "weblogic";
write domain to "/usr/local/src/weblogic/oracle/user_projects/domains/h5_domain/";
// The domain name will be "h5-domain"
close template;
12.加速创建域,找到使用的jdk的如下文件:(按需操作)
find / -name java.security
将securerandom.source=file:/dev/urandom 修改为
securerandom.source=file:/dev/./urandom
13.执行创建域脚本
cd /usr/local/src/weblogic/oracle/wlserver/common/bin
./config.sh -mode=silent -silent_script=/usr/local/src/weblogic/create_domain.rsp -logfile=/usr/local/src/weblogic/create_domain.log
出现如下内容,创建成功
WARNING: This is a deprecated script. Please invoke the config.sh script under oracle_common/common/bin.
<< read template from "/usr/local/src/weblogic/oracle/wlserver/common/templates/wls/wls.jar"
>> succeed: read template from "/usr/local/src/weblogic/oracle/wlserver/common/templates/wls/wls.jar"
<< set config option JavaHome to "/usr/java/jdk1.8.0_11"
>> succeed: set config option JavaHome to "/usr/java/jdk1.8.0_11"
<< set config option ServerStartMode to "prod"
>> succeed: set config option ServerStartMode to "prod"
<< find Server "AdminServer" as AdminServer
>> succeed: find Server "AdminServer" as AdminServer
<< set AdminServer attribute ListenAddress to ""
>> succeed: set AdminServer attribute ListenAddress to ""
<< set AdminServer attribute ListenPort to "7010"
>> succeed: set AdminServer attribute ListenPort to "7010"
<< set AdminServer attribute SSL!Enabled to "true"
>> succeed: set AdminServer attribute SSL!Enabled to "true"
<< set AdminServer attribute SSL!ListenPort to "7002"
>> succeed: set AdminServer attribute SSL!ListenPort to "7002"
<< find User "weblogic" as u1
>> succeed: find User "weblogic" as u1
<< set u1 attribute Password to "********"
>> succeed: set u1 attribute Password to "********"
<< write Domain to "/usr/local/src/weblogic/oracle/user_projects/domains/h5_domain/"
..................................................
>> succeed: write Domain to "/usr/local/src/weblogic/oracle/user_projects/domains/h5_domain/"
<< close template
>> succeed: close template
14.切换到安全目录下新装控制台用户名和密码(启动以后会出现此目录)
cd /usr/local/src/weblogic/oracle/user_projects/domains/h5_domain/servers/AdminServer/
mkdir security
cd security/
vi boot.properties
设置用户名密码
username=weblogic
password=weblogic
15.启动weblogic
cd /usr/local/src/weblogic/oracle/user_projects/domains/h5_domain/bin
./startWebLogic.sh
在浏览器输入URL地址 http://ip:7001/console/ ,输入在boot.properties文件中配置用户名和密码
后台启动方式:
./startWebLogic.sh
按Ctrl + z
输入bg