測(cè)試環(huán)境weblogic部署手冊(cè)
1.weblogic需要有jdk環(huán)境
1.1 通過(guò)xftp工具把jdk1.8的軟件包傳入到服務(wù)器的/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的環(huán)境變量
在/etc/profile文件中配置環(huán)境變量
運(yùn)行這個(gè)命令 vim /etc/profile后在末尾加上下面的內(nèi)容,: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 重啟環(huán)境變量并檢查java安裝成功
source /etc/profile # 讓環(huán)境變量生效
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并創(chuàng)建用戶
[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自動(dòng)建立用戶登入目錄 -u指定id -g屬組-d:指定用戶登入時(shí)的啟始目錄-s:指定用戶登入后所使用的shell
useradd -m -u 2001 -g weblogic -d /home/weblogic -s /bin/bash weblogic
passwd weblogic #設(shè)置密碼
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環(huán)境變量
登錄weblogic用戶,修改weblogic用戶下基礎(chǔ)環(huán)境變量,在.bash_profile文件中添加umask 022
vi .bash_profile
# 寫(xiě)入內(nèi)容
umask 022
2.3切換為weblogic用戶操作
[root@hjc local]# su - weblogic
[weblogic@hjc ~]$
3.部署weblogic
3.1 部署目錄
在weblogic用戶下,新建兩個(gè)規(guī)劃目錄,一個(gè)是webapp文件夾,用于放置應(yīng)用程序,另一個(gè)是domain文件夾,用于放置weblogic部署的域
/home/weblogic/
/webapp/<app name>/ #應(yīng)用系統(tǒng)部署文件目錄,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通過(guò)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
安裝過(guò)程:(這里的細(xì)節(jié)很多,必須注意?。?/p>
[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]> **默認(rèn)**
<-------------------- 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]> **默認(rèn)**
<-------------------- 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]> **默認(rèn)**
<-------------------- 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]> **默認(rèn)**
<-------------------- 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]> **默認(rèn)**
<-------------------- 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]> **默認(rèn)**
<-------------------- 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]> **默認(rèn)**
<-------------------- 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]> **默認(rèn)**
<-------------------- 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]>**默認(rèn)**
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Clean up process in progress ...
[weblogic@hjc webapp]$
3.2.2創(chuàng)建域
登錄weblogic用戶,在路徑/home/weblogic/Oracle/Middleware/wlserver_10.3/common/bin,下面執(zhí)行config.sh,腳本進(jìn)行創(chuàng)建。
如果報(bào)錯(cuò):./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]> **默認(rèn)**
<------------------- 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]> **默認(rèn)**
<------------------- 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]> **默認(rèn)**
<------------------- Fusion Middleware Configuration Wizard ------------------>
Edit Domain Information:
------------------------
| Name | Value |
_|________|_____________|
1| *Name: | base_domain |
Enter value for "Name" OR [Exit][Previous][Next]> **默認(rèn)**
<------------------- 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]> **默認(rèn)**
<------------------- 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]> **默認(rèn)**
<------------------- 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]>**默認(rèn)**
<------------------- 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]> **默認(rèn)**
<------------------- Fusion Middleware Configuration Wizard ------------------>
Creating Domain...
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]
**** Domain Created Successfully! ****
到這里weblogic就安裝完了
4.啟動(dòng)weblogic服務(wù)測(cè)試
cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain
./startWebLogic.sh # 啟動(dòng)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
啟動(dòng)成功(這里最好設(shè)置為綿免密登錄,在下方)
成功啟動(dòng)一次后,就會(huì)出現(xiàn)/home/weblogic/domain/jx_domain/servers/AdminServer目錄,然后新建一個(gè)security目錄,并新建文件boot.properties,寫(xiě)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中寫(xiě)入
password=weblogic123
username=weblogic
重新啟動(dòng)weblogic服務(wù)
cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/
./startWeblogic.sh
優(yōu)化weblogic反應(yīng)速度
完成這一步后,發(fā)現(xiàn)登錄weblogic后彈出的頁(yè)面反應(yīng)時(shí)間會(huì)很長(zhǎng)。所以我們還需要進(jìn)行一些配置
切換回root用戶通過(guò)find / -name java.security找到j(luò)ava.security的配置目錄。然后找到
/usr/local/java/jdk1.8.0_333/jre/lib/security/java.security文件路徑vim更改設(shè)置為:
把securerandom.source=file:/dev/random改為下面這個(gè)配置即可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
## 修改的內(nèi)容下圖所示
這樣配置后進(jìn)入weblogic客戶端就是秒進(jìn),速度快很多很多。文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-448314.html
優(yōu)化weblogic啟動(dòng)的內(nèi)存
cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin
vim setDomainEnv.sh
## 修改內(nèi)容如下圖所示
之后,重新重啟./startWeblogic.sh即可
至此!weblogic的安裝部署完畢!文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-448314.html
到了這里,關(guān)于weblogic測(cè)試環(huán)境安裝部署--傻瓜式安裝教程的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!