测试环境weblogic部署手册
1.weblogic需要有jdk环境
1.1 通过xftp工具把jdk1.8的软件包传入到服务器的/usr/local中并解压
cd /usr/local
tar -zxf jdk-8u333-linux-x64.tar.gz
[root@hjc ~]# cd /usr/local
[root@hjc local]# ls
aegis bin etc games include jdk-8u333-linux-x64.tar.gz lib lib64 libexec sbin share src
[root@hjc local]# tar -zxf jdk-8u333-linux-x64.tar.gz
1.2 配置java的环境变量
在/etc/profile文件中配置环境变量
运行这个命令 vim /etc/profile后在末尾加上下面的内容,:wq保存并退出
export JAVA_HOME=/usr/local/jdk1.8.0_333
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}
1.3 重启环境变量并检查java安装成功
source /etc/profile # 让环境变量生效
java -version # 查看jdk的版本与是否安装成功
[root@hjc local]# source /etc/profile
[root@hjc local]# java -version
java version "1.8.0_333"
Java(TM) SE Runtime Environment (build 1.8.0_333-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode)
[root@hjc local]#
2.安装weblogic并创建用户
[root@hjc local]# ls
aegis bin etc games include jdk1.8.0_333 jdk-8u333-linux-x64.tar.gz lib lib64 libexec sbin share src wls1036_generic.jar
2.1新建weblogic用户和用户密码
2.2.1新建weblogic中间件用户,使用命令:
groupadd -g 2001 weblogic # 建组
# -m自动建立用户登入目录 -u指定id -g属组-d:指定用户登入时的启始目录-s:指定用户登入后所使用的shell
useradd -m -u 2001 -g weblogic -d /home/weblogic -s /bin/bash weblogic
passwd weblogic #设置密码
usermod -aG wheel weblogic # 把weblogic用户添加了附加组到wheel中
[root@hjc local]# groupadd -g 2001 weblogic
[root@hjc local]# useradd -m -u 2001 -g weblogic -d /home/weblogic -s /bin/bash weblogic
[root@hjc local]# passwd weblogic
[root@hjc local]# usermod -aG wheel weblogic
[root@hjc local]# id weblogic
uid=2001(weblogic) gid=2001(weblogic) groups=2001(weblogic),10(wheel)
2.2.2增加weblogic环境变量
登录weblogic用户,修改weblogic用户下基础环境变量,在.bash_profile文件中添加umask 022
vi .bash_profile
# 写入内容
umask 022
2.3切换为weblogic用户操作
[root@hjc local]# su - weblogic
[weblogic@hjc ~]$
3.部署weblogic
3.1 部署目录
在weblogic用户下,新建两个规划目录,一个是webapp文件夹,用于放置应用程序,另一个是domain文件夹,用于放置weblogic部署的域
/home/weblogic/
/webapp/<app name>/ #应用系统部署文件目录,war、ear等
/domain/<domain name> #weblogic域存放地址
[weblogic@hjc ~]$ mkdir webapp
[weblogic@hjc ~]$ mkdir domain
[weblogic@hjc ~]$ ls
domain webapp
3.2安装weblogic软件
3.2.1将weblogic的安装包wls1036_generic.jar通过xftp工具上传至/home/weblogic/webapp,然后安装
[weblogic@hjc local]$ cd /home/weblogic/webapp/
[weblogic@hjc webapp]$ ls
wls1036_generic.jar
[weblogic@hjc webapp]$ java -jar wls1036_generic.jar -mode=console
安装过程:(这里的细节很多,必须注意!)
[weblogic@jxapp01 ~]$ java -jar wls1036_generic.jar -mode=console
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/weblogic/Oracle/Middleware"]
Enter new Middleware Home 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]
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"]
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]
Enter index 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:[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.
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.8.0_333[x]
*Estimated size of installation: 690.2 MB
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: [/home/weblogic/Oracle/Middleware]
Product Installation Directories:
1|WebLogic Server: [/home/weblogic/Oracle/Middleware/wlserver_10.3]
2|Oracle Coherence: [/home/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
Enter [Exit][Previous][Next]> **默认**
<-------------------- 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@hjc webapp]$
3.2.2创建域
登录weblogic用户,在路径/home/weblogic/Oracle/Middleware/wlserver_10.3/common/bin,下面执行config.sh,脚本进行创建。
如果报错:./config.sh: line 103: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/java: No such file or directory,则更改commEnv.sh的第149行,在JAVA_HOME后面添加jre目录。
[weblogic@hjc bin]$ cd /home/weblogic/Oracle/Middleware/wlserver_10.3/common/bin
[weblogic@hjc bin]$ ./config.sh
<------------------- 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.
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 exising 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.
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]
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 |
Enter value for "Name" OR [Exit][Previous][Next]> **默认**
<------------------- Fusion Middleware Configuration Wizard ------------------>
Select the target domain directory for this domain:
---------------------------------------------------
"Target Location" = [Enter new value or use default
"/home/weblogic/Oracle/Middleware/user_projects/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"
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]> weblogic123
<------------------- 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]> 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]> weblogic123
<------------------- 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
Enter index number to select OR [Exit][Previous][Next]> 2
<------------------- Fusion Middleware Configuration Wizard ------------------>
Java SDK Selection:
-------------------
->1|Sun SDK 1.8.0_333 @ /usr/local/jdk1.8.0_333
2|Other Java SDK
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! ****
到这里weblogic就安装完了
4.启动weblogic服务测试
cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain
./startWebLogic.sh # 启动weblogic
[weblogic@hjc base_domain]$ cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain
[weblogic@hjc base_domain]$ ls
autodeploy bin config console-ext fileRealm.properties init-info lib security startWebLogic.sh
[weblogic@hjc base_domain]$ ./startWebLogic.sh
启动成功(这里最好设置为绵免密登录,在下方)
成功启动一次后,就会出现/home/weblogic/domain/jx_domain/servers/AdminServer目录,然后新建一个security目录,并新建文件boot.properties,写username和password行:
password=weblogic123
username=weblogic
cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers
cd AdminServer/
mkdir security
cd security/
vim boot.properties
# 在boot.properties中写入
password=weblogic123
username=weblogic
重新启动weblogic服务
cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/
./startWeblogic.sh
优化weblogic反应速度
完成这一步后,发现登录weblogic后弹出的页面反应时间会很长。所以我们还需要进行一些配置
切换回root用户通过find / -name java.security找到java.security的配置目录。然后找到
/usr/local/java/jdk1.8.0_333/jre/lib/security/java.security文件路径vim更改设置为:
把securerandom.source=file:/dev/random改为下面这个配置即可securerandom.source=file:/dev/./urandom 最后保存:wq
[root@hjc ~]# find / -name java.security
/usr/local/jdk1.8.0_333/jre/lib/security/java.security
[root@hjc ~]# vim /usr/local/jdk1.8.0_333/jre/lib/security/java.security
## 修改的内容下图所示
这样配置后进入weblogic客户端就是秒进,速度快很多很多。文章来源:https://www.toymoban.com/news/detail-448314.html
优化weblogic启动的内存
cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin
vim setDomainEnv.sh
## 修改内容如下图所示
之后,重新重启./startWeblogic.sh即可
至此!weblogic的安装部署完毕!文章来源地址https://www.toymoban.com/news/detail-448314.html
到了这里,关于weblogic测试环境安装部署--傻瓜式安装教程的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!