[原创链接地址:(https://blog.csdn.net/weixin_36065860/article/details/100075427)
yum -y install wget lrzsz
seteforce 0
systemctl stop firewalld
wget http://learning.happymmall.com/jdk/jdk-7u80-linux-x64.rpm
rpm -qa | grep jdk
rz 导入
wls1036_generic.jar
rpm -ivh jdk-7u80-linux-x64.rpm
java -version
vi /etc/profile
JAVA_HOME=/root/jdk1.7.0_80
PATH=PATH
CLASSPATH=.:JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
source /etc/profile
groupadd weblogic
useradd -g weblogic weblogic
passwd weblogic
vi /etc/sudoers
复制填入一行
weblogic ALL=(ALL) ALL
vi /etc/security/limits.conf
weblogic soft nofile 102400
weblogic hard nofile 102400
weblogic soft nproc 102400
weblogic hard nproc 102400
ulimit -a
mkdir weblogic
chown -R weblogic:weblogic weblogic
chmod a+x wls1036_generic.jar
mkdir -p home/weblogic
mv wls1036_generic.jar home/weblogic
su - weblogic
java -jar wls1036_generic.jar
Unable to instantiate GUI, defaulting to console mode.
Extracting 0%....................................................................................................100%
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Welcome:
--------
This installer will guide you through the installation of WebLogic 10.3.6.0\.
Type "Next" or enter to proceed to the next prompt. If you want to change data entered previously, type "Previous". You may quit the installer at any time by typing "Exit".
Enter [Exit][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Middleware Home Directory:
---------------------------------
"Middleware Home" = [Enter new value or use default
"/home/weblogic11g/Oracle/Middleware"]
//填写安装路径
Enter new Middleware Home OR [Exit][Previous][Next]> /weblogic/Oracle/Middleware
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Middleware Home Directory:
---------------------------------
"Middleware Home" = [/weblogic/Oracle/Middleware]
Use above value or select another option:
1 - Enter new Middleware Home
2 - Change to default [/home/weblogic11g/Oracle/Middleware]
//回车确认路径,1是重新填写,2是默认路径
Enter option number to select OR [Exit][Previous][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Register for Security Updates:
------------------------------
Provide your email address for security updates and to initiate configuration manager.
1|Email:[]
2|Support Password:[]
3|Receive Security Update:[Yes]
//选择3,把YES修改成NO,不接受安全更新
Enter index number to select OR [Exit][Previous][Next]> 3
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Register for Security Updates:
------------------------------
Provide your email address for security updates and to initiate configuration manager.
"Receive Security Update:" = [Enter new value or use default "Yes"]
//修改成No
Enter [Yes][No]? No
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Register for Security Updates:
------------------------------
Provide your email address for security updates and to initiate configuration manager.
"Receive Security Update:" = [Enter new value or use default "Yes"]
** Do you wish to bypass initiation of the configuration manager and
** remain uninformed of critical security issues in your configuration?
// 确认刚刚的修改
Enter [Yes][No]?Yes
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Register for Security Updates:
------------------------------
Provide your email address for security updates and to initiate configuration manager.
1|Email:[]
2|Support Password:[]
3|Receive Security Update:[No]
//修改后显示为No.直接回车
Enter index number to select OR [Exit][Previous][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Install Type:
--------------------
Select the type of installation you wish to perform.
->1|Typical
| Install the following product(s) and component(s):
| - WebLogic Server
| - Oracle Coherence
2|Custom
| Choose software products and components to install and perform optional
|configuration.
//选择安装的类型,回车选择1默认的安装类型
Enter index number to select OR [Exit][Previous][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
JDK Selection (Any * indicates Oracle Supplied VM):
---------------------------------------------------
JDK(s) chosen will be installed. Defaults will be used in script string-substitution if installed.
1|Add Local Jdk
2|/usr/local/jdk1.6.0_45[x]
*Estimated size of installation: 690.2 MB
//选择使用的JDK,这里默认的是系统的1.6,没有问题
Enter 1 to add or >= 2 to toggle selection OR [Exit][Previous][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Product Installation Directories:
----------------------------------------
Middleware Home Directory: [/weblogic/Oracle/Middleware]
Product Installation Directories:
1|WebLogic Server: [/weblogic/Oracle/Middleware/wlserver_10.3]
2|Oracle Coherence: [/weblogic/Oracle/Middleware/coherence_3.7]
//显示即将安装的路径信息
Enter index number to select OR [Exit][Previous][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
The following Products and JDKs will be installed:
--------------------------------------------------
WebLogic Platform 10.3.6.0
|_____WebLogic Server
| |_____Core Application Server
| |_____Administration Console
| |_____Configuration Wizard and Upgrade Framework
| |_____Web 2.0 HTTP Pub-Sub Server
| |_____WebLogic SCA
| |_____WebLogic JDBC Drivers
| |_____Third Party JDBC Drivers
| |_____WebLogic Server Clients
| |_____WebLogic Web Server Plugins
| |_____UDDI and Xquery Support
| |_____Evaluation Database
|_____Oracle Coherence
|_____Coherence Product Files
*Estimated size of installation: 690.3 MB
//显示即将安装的包和JDKs
Enter [Exit][Previous][Next]> 直接回车
Aug 26, 2019 4:09:15 PM java.util.prefs.FileSystemPreferences$2 run
INFO: Created user preferences directory.
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Installing files..
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]
Performing String Substitutions...
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Configuring OCM...
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]
Creating Domains...
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Installation Complete
Congratulations! Installation is complete.
//显示安装过程
Press [Enter] to continue or type [Exit]> 直接回车
//安装完毕
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Clean up process in progress ...
创建weblogic域
安装完成后需要创建WebLogic domain,下面是创建过程:
[weblogic11g@gztvtest weblogic]$ cd Oracle/Middleware/wlserver_10.3/common/bin/
[weblogic11g@gztvtest bin]$ ll
total 112
-rwxr-x---. 1 weblogic11g weblogic 22803 Aug 26 16:09 commEnv.sh
-rwxr-x---. 1 weblogic11g weblogic 2124 Aug 26 16:09 config_builder.sh
-rwxr-x---. 1 weblogic11g weblogic 2276 Aug 26 16:09 config.sh
-rwxr-x---. 1 weblogic11g weblogic 2581 Aug 26 16:09 pack.sh
-rwxr-x---. 1 weblogic11g weblogic 2150 Aug 26 16:09 setPatchEnv.sh
-rwxr-x---. 1 weblogic11g weblogic 4084 Aug 26 16:09 startDerby.sh
-rwxr-x---. 1 weblogic11g weblogic 4090 Aug 26 16:09 startManagedWebLogic.sh
-rwxr-x---. 1 weblogic11g weblogic 1450 Aug 26 16:09 stopDerby.sh
-rwxr-x---. 1 weblogic11g weblogic 2089 Aug 26 16:09 unpack.sh
-rwxr-x---. 1 weblogic11g weblogic 3300 Aug 26 16:09 upgrade.sh
-rwxr-x---. 1 weblogic11g weblogic 31219 Aug 26 16:09 wlscontrol.sh
-rwxr-x---. 1 weblogic11g weblogic 13740 Aug 26 16:09 wlsifconfig.sh
-rwxr-x---. 1 weblogic11g weblogic 786 Aug 26 16:09 wlst.sh
执行脚本config.sh
[weblogic11g@gztvtest bin]$ ./config.sh
Unable to instantiate GUI, defaulting to console mode.
<------------------- Fusion Middleware Configuration Wizard ------------------>
Welcome:
--------
Choose between creating and extending a domain. Based on your selection,
the Configuration Wizard guides you through the steps to generate a new or
extend an existing domain.
->1|Create a new WebLogic domain
| Create a WebLogic domain in your projects directory.
2|Extend an existing WebLogic domain
| Use this option to add new components to an existing domain and modify |configuration settings.
//默认1创建新的WebLogic domain,2是增加一个WebLogic domain
Enter index number to select OR [Exit][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>
Select Domain Source:
---------------------
Select the source from which the domain will be created. You can create the
domain by selecting from the required components or by selecting from a
list of existing domain templates.
->1|Choose Weblogic Platform components
| You can choose the Weblogic component(s) that you want supported in
|your domain.
2|Choose custom template
| Choose this option if you want to use an existing template. This
|could be a custom created template using the Template Builder.
//1是默认使用weblogic组件,2是选择自定义
Enter index number to select OR [Exit][Previous][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>
Application Template Selection:
-------------------------------
Available Templates
|_____Basic WebLogic Server Domain - 10.3.6.0 [wlserver_10.3]x
|_____Basic WebLogic SIP Server Domain - 10.3.6.0 [wlserver_10.3] [2]
|_____WebLogic Advanced Web Services for JAX-RPC Extension - 10.3.6.0 [wlserver_10.3] [3]
|_____WebLogic Advanced Web Services for JAX-WS Extension - 10.3.6.0 [wlserver_10.3] [4]
//显示weblogic支持的组件
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>
Edit Domain Information:
------------------------
| Name | Value |
_|________|_____________|
1| *Name: | base_domain |
//填写domain的名字
Enter value for "Name" OR [Exit][Previous][Next]> cbossdomain
<------------------- Fusion Middleware Configuration Wizard ------------------>
Edit Domain Information:
------------------------
| Name | Value |
_|________|_____________|
1| *Name: | cbossdomain |
Use above value or select another option:
1 - Modify "Name"
2 - Discard Changes
//1 修改名字,2,放弃修改
Enter option number to select OR [Exit][Previous][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>
Select the target domain directory for this domain:
---------------------------------------------------
"Target Location" = [Enter new value or use default
"/weblogic/Oracle/Middleware/user_projects/domains"]
//显示创建的domains路径位置
Enter new Target Location OR [Exit][Previous][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This user is the
default administrator used to start development mode servers.
| Name | Value |
_|_________________________|_________________________________________|
1| *Name: | weblogic |
2| *User password: | |
3| *Confirm user password: | |
4| Description: | This user is the default administrator. |
Use above value or select another option:
1 - Modify "Name"
2 - Modify "User password"
3 - Modify "Confirm user password"
4 - Modify "Description"
//1修改名字 2.修改密码 3确认密码 4修改描述
Enter option number to select OR [Exit][Previous][Next]> 2
<------------------- Fusion Middleware Configuration Wizard ------------------>
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This user is the
default administrator used to start development mode servers.
"*User password:" = []
//输入密码
Enter new *User password: OR [Exit][Reset][Accept]>abc123
<------------------- Fusion Middleware Configuration Wizard ------------------>
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This user is the
default administrator used to start development mode servers.
| Name | Value |
_|_________________________|_________________________________________|
1| *Name: | weblogic |
2| *User password: | ******** |
3| *Confirm user password: | |
4| Description: | This user is the default administrator. |
Use above value or select another option:
1 - Modify "Name"
2 - Modify "User password"
3 - Modify "Confirm user password"
4 - Modify "Description"
5 - Discard Changes
//3确认密码
Enter option number to select OR [Exit][Previous][Next]> 3
<------------------- Fusion Middleware Configuration Wizard ------------------>
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This user is the
default administrator used to start development mode servers.
"*Confirm user password:" = []
//确认密码
Enter new *Confirm user password: OR [Exit][Reset][Accept]> abc123
<------------------- Fusion Middleware Configuration Wizard ------------------>
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This user is the
default administrator used to start development mode servers.
| Name | Value |
_|_________________________|_________________________________________|
1| *Name: | weblogic |
2| *User password: | ******** |
3| *Confirm user password: | ******** |
4| Description: | This user is the default administrator. |
Use above value or select another option:
1 - Modify "Name"
2 - Modify "User password"
3 - Modify "Confirm user password"
4 - Modify "Description"
5 - Discard Changes
Enter option number to select OR [Exit][Previous][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>
Domain Mode Configuration:
--------------------------
Enable Development or Production Mode for this domain.
->1|Development Mode
2|Production Mode
//选择2生产模式,默认1是开发模式
Enter index number to select OR [Exit][Previous][Next]> 2
<------------------- Fusion Middleware Configuration Wizard ------------------>
Java SDK Selection:
-------------------
->1|Sun SDK 1.6.0_45 @ /usr/local/jdk1.6.0_45
2|Other Java SDK
//选择SDK,1默认本地1.6
Enter index number to select OR [Exit][Previous][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>
Select Optional Configuration:
------------------------------
1|Administration Server [ ]
2|Managed Servers, Clusters and Machines [ ]
3|RDBMS Security Store [ ]
这里不做配置,做集群配置在管理页面做
Enter index number to select OR [Exit][Previous][Next]> 直接回车
备注:
可以在命令行中配置管理服务器、受管服务器、集群和计算机,此处选择在控制台中配置
安装完毕
<------------------- Fusion Middleware Configuration Wizard ------------------>
Creating Domain...
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]
**** Domain Created Successfully! ****
[weblogic11g@gztvtest bin]$
配置AdminServer后台运行,并优化JVM参数
- 第一次前台运行AdmininServer
[weblogic11g@gztvtest bin]$ cd /weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/bin/
[weblogic11g@gztvtest bin]$ ll
total 48
drwxr-x---. 2 weblogic11g weblogic 4096 Aug 26 17:13 nodemanager
drwxr-x---. 2 weblogic11g weblogic 4096 Aug 26 17:13 server_migration
drwxr-x---. 2 weblogic11g weblogic 4096 Aug 26 17:13 service_migration
-rwxr-x---. 1 weblogic11g weblogic 13251 Aug 26 17:13 setDomainEnv.sh
-rwxr-x---. 1 weblogic11g weblogic 3193 Aug 26 17:13 startManagedWebLogic.sh
-rwxr-x---. 1 weblogic11g weblogic 5694 Aug 26 17:13 startWebLogic.sh
-rwxr-x---. 1 weblogic11g weblogic 2406 Aug 26 17:13 stopManagedWebLogic.sh
-rwxr-x---. 1 weblogic11g weblogic 1974 Aug 26 17:13 stopWebLogic.sh
执行./startWebLogic.sh,前台运行要输入账号密码
[weblogic11g@gztvtest bin]$ ./startWebLogic.sh
.
.
JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=256m
.
WLS Start Mode=Production
.
CLASSPATH=/weblogic/Oracle/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/weblogic/Oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/jdk1.6.0_45/lib/tools.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/weblogic/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/weblogic/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/weblogic/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/weblogic/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar:/usr/local/jdk1.6.0_45//lib/tools.jar:/usr/local/jdk1.6.0_45//lib/dt.jar
.
PATH=/weblogic/Oracle/Middleware/wlserver_10.3/server/bin:/weblogic/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/usr/local/jdk1.6.0_45/jre/bin:/usr/local/jdk1.6.0_45/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/jdk1.6.0_45//bin:/bin:/home/weblogic11g/bin
.
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http://hostname:port/console *
***************************************************
starting weblogic with Java version:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
Starting WLS with line:
/usr/local/jdk1.6.0_45/bin/java -server -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -da -Dplatform.home=/weblogic/Oracle/Middleware/wlserver_10.3 -Dwls.home=/weblogic/Oracle/Middleware/wlserver_10.3/server -Dweblogic.home=/weblogic/Oracle/Middleware/wlserver_10.3/server -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/weblogic/Oracle/Middleware/patch_wls1036/profiles/default/sysext_manifest_classpath:/weblogic/Oracle/Middleware/patch_ocp371/profiles/default/sysext_manifest_classpath weblogic.Server
Enter username to boot WebLogic server:
当出现以下内容时表示启动成功
0:0:0:0:1>
- 配置AdminServer后台运行
Ctrl + c结束前台运行的AdminServer,首次运行AdminServer后,会自动在cbossdomain目录下创建servers/AdminServer目录
[weblogic11g@gztvtest cbossdomain]$ ll
total 40
drwxr-x---. 2 weblogic11g weblogic 4096 Aug 26 17:13 autodeploy
drwxr-x---. 5 weblogic11g weblogic 4096 Aug 26 17:13 bin
drwxr-x---. 10 weblogic11g weblogic 4096 Aug 26 17:23 config
drwxr-x---. 2 weblogic11g weblogic 4096 Aug 26 17:13 console-ext
-rw-r-----. 1 weblogic11g weblogic 462 Aug 26 17:13 fileRealm.properties
drwxr-x---. 2 weblogic11g weblogic 4096 Aug 26 17:13 init-info
drwxr-x---. 2 weblogic11g weblogic 4096 Aug 26 17:13 lib
drwxr-x---. 2 weblogic11g weblogic 4096 Aug 26 17:13 security
drwxr-----. 3 weblogic11g weblogic 4096 Aug 26 17:23 servers
-rwxr-x---. 1 weblogic11g weblogic 277 Aug 26 17:13 startWebLogic.sh
[weblogic11g@gztvtest cbossdomain]$ pwd
/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain
创建文件然后编辑
[weblogic11g@gztvtest AdminServer]$ pwd
/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/servers/AdminServer
[weblogic11g@gztvtest AdminServer]$ mkdir security
[weblogic11g@gztvtest AdminServer]$ cd security/
[weblogic11g@gztvtest security]$ vi boot.properties
username=weblogic
password=abc12345678
- 优化JVM参数
[weblogic11g@gztvtest bin]$ pwd
/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/bin
[weblogic11g@gztvtest bin]$ vi startWebLogic.sh
[weblogic11g@gztvtest bin]$ vi setDomainEnv.sh
startWebLogic.sh会调用setDomainEnv.sh,所以优先级比setDomainEnv.sh高
此处选择修改startWebLogic.sh
(1)trap ‘stopAll’ 1 2 3 15上方加入代码:MEM_ARGS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m"
SAVE_CLASSPATH=""
MEM_ARGS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m"
trap 'stopAll' 1 2 3 15
(2)如果应用程序需要在网页中显示验证码,则增加JVM参数-Djava.awt.headless=true
将SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"修改为
SAVE_JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.awt.headless=true"
- 后台启动weblogic
[weblogic11g@gztvtest bin]$ nohup ./startWebLogic.sh & //记录会保存到自动创建的nohup.out文件中
[1] 19314
[weblogic11g@gztvtest bin]$ nohup: ignoring input and appending output to `nohup.out'
之前编辑的密码文件已经变成加密格式了
/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/servers/AdminServer/security
[weblogic11g@gztvtest security]$ cat boot.properties
#Mon Aug 26 17:50:20 CST 2019
password={AES}tSv1+qpUFx6otq0Hi83+/IyLhKozU1s7VXN18wzZfXA\=
username={AES}HON39b8L8+lnF8gSCYT5QGH3VWCAg+SSuitGUmuAFko\=
后台关闭weblogic:
[weblogic11g@gztvtest bin]$ nohup ./stopWebLogic.sh & //记录会保存到自动创建的nohup.out文件中
在浏览器输入网址:
http://192.168.1.220:7001/console
打开控制台,并输入用户名weblogic和密码abc12345678: