1、安裝前準備工做:java
一、建立用戶useradd weblogic;建立用戶成功linux系統會自動建立一個和用戶名相同的分組,並將該用戶分到改組中。並會在/home路徑下建立一個和用戶名相同的路徑,好比咱們建立的weblogic。linux
注:固然,你也能夠經過groupadd -g GID groupname(GID表明建立組的ID,通常大於500),而後useradd –d userhome –g GID username(userhome 表明用戶的主目錄,GID 爲前一步建立的組ID)建立用戶並將用戶分到相應的組裏面。web
二、卸載掉linux系統自帶的jdk,安裝咱們本身的jdk,建議和開發過程當中用到的jdk版本一致。瀏覽器
注:jdk的卸載和安裝參見:http://www.linuxidc.com/Linux/2016-12/138043.htm。安全
2、開始安裝:
a.?建立weblogic用戶組.?bash
useradd weblogic
passwd weblogic服務器
更改jdk版本app
二、進入安裝目錄
#cd /home
#cp jdk-7u76-linux-x64.rpm /usr/local
#cd /usr/local
給全部用戶添加可執行的權限dom
#rpm -ivh jdk-7u76-linux-x64.rpmwebapp
設置環境變量
#vi /etc/profile
打開後,在文檔最下方加上如下環境變量配置代碼:
export JAVA_HOME=/usr/java/jdk1.6.0_45
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
執行生效
#. /etc/profile
weblogic用戶
export JAVA_HOME=/usr/java/jdk1.6.0_45
export JAVA_BIN=/usr/java/jdk1.6.0_45/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
注意:export PATH=$JAVA_HOME/bin:$PATH,注意將$PATH放到最後。以避免形成新舊版本問題。
當你已經成功把jdk1.6.0_45 安裝到 /usr/java,而且配置好了系統環境變量
執行 # java -version 時就是 顯示jdk1.6.0_45,是由於你的linux系統有默認的jdk;執行
cp jdk-6u7-linux-i586.bin /usr
即將jdk複製到/usr目錄下,而後進入/usr目錄cd /usr
執行權限
chmod +x jdk-6u45-linux-x64.bin
執行安裝命令
./jdk-6u45-linux-x64.bin
一、# cd /usr/bin
# ln -s -f /usr/java/jdk1.6.0_45/jre/bin/java
# ln -s -f /usr/java/jdk1.6.0_45/bin/javac
二、接着卸載jdk-1.7.0_76,再次從新安裝。卸載方法:
先查看jdk-1.7.0_76包名
#rpm -qa | grep jdk
接着執行
#rpm -e jdk-1.7.0_76-fcs
卸載完後,再次從新安裝jdk-7u76-linux-x64.rpm 。
一、進入安裝路徑:/home/weblogic
二、將安裝文件wls1036_generic.jar放入安裝目錄
三、chmod a+x wls1036_generic.jar 賦予安裝文件可執行的權限
四、執行安裝命令:java -jar filename.jar -mode=console
注:若是安裝文件是.bin格式的文件,安裝命令爲:./wls1036_generic.bin -mode=console;(你能夠不加「-mode=console」的控制檯文本模式,由於在你安裝時沒法啓動圖形安裝界面時它會自動的進入文本控制檯模式的)
五、控制檯安裝:
1、安裝weblogic10.3.6 64位:
-bash-4.1$ java -jar wls1036_generic.jar
Unable to instantiate GUI, defaulting to console mode.沒法實例化 GUI,默認進入控制檯模式。
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
"/bea/weblogic/Oracle/Middleware"]
Enter new Middleware Home OR [Exit][Previous][Next]> /bea/weblogic/
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Middleware Home Directory:
---------------------------------
"Middleware Home" = [/bea/weblogic]
Use above value or select another option:
1 - Enter new Middleware Home
2 - Change to default [/bea/weblogic/Oracle/Middleware]
Enter option number to select OR [Exit][Previous][Next]> 1
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Middleware Home Directory:
---------------------------------
"Middleware Home" = [/bea/weblogic]
Enter new Middleware Home OR [Exit][Previous][Next]>
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Middleware Home Directory:
---------------------------------
Warning
/bea/weblogic directory is not empty. Proceed with installation?
Enter [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"]
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]> 2
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Products and Components:
-------------------------------
Release 10.3.6.0
|_____WebLogic Server [1] x
| |_____Core Application Server [1.1] x
| |_____Administration Console [1.2] x
| |_____Configuration Wizard and Upgrade Framework [1.3] x
| |_____Web 2.0 HTTP Pub-Sub Server [1.4] x
| |_____WebLogic SCA [1.5] x
| |_____WebLogic JDBC Drivers [1.6] x
| |_____Third Party JDBC Drivers [1.7] x
| |_____WebLogic Server Clients [1.8] x
| |_____WebLogic Web Server Plugins [1.9] x
| |_____UDDI and Xquery Support [1.10] x
| |_____Server Examples [1.11]
| |_____Evaluation Database [1.12] x
|_____Oracle Coherence [2] x
|_____Coherence Product Files [2.1] x
|_____Coherence Examples [2.2]
*Estimated size of installation: 690.2 MB
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> 2
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Products and Components:
-------------------------------
Release 10.3.6.0
|_____WebLogic Server [1] x
| |_____Core Application Server [1.1] x
| |_____Administration Console [1.2] x
| |_____Configuration Wizard and Upgrade Framework [1.3] x
| |_____Web 2.0 HTTP Pub-Sub Server [1.4] x
| |_____WebLogic SCA [1.5] x
| |_____WebLogic JDBC Drivers [1.6] x
| |_____Third Party JDBC Drivers [1.7] x
| |_____WebLogic Server Clients [1.8] x
| |_____WebLogic Web Server Plugins [1.9] x
| |_____UDDI and Xquery Support [1.10] x
| |_____Server Examples [1.11]
| |_____Evaluation Database [1.12] x
|_____Oracle Coherence [2]
|_____Coherence Product Files [2.1]
|_____Coherence Examples [2.2]
*Estimated size of installation: 678.7 MB
Enter number exactly as it appears in brackets to toggle selection 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/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64[x]
*Estimated size of installation: 678.7 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: [/bea/weblogic]
Product Installation Directories:
"WebLogic Server" = [Enter new value or use default
"/bea/weblogic/wlserver_10.3"]
Enter new WebLogic Server 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
*Estimated size of installation: 678.8 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 ...
2、配置domains
cd /home/weblogic/Oracle/Middleware/wlserver_10.3/common/bin
-bash-4.1$ ./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.
Enter index number to select OR [Exit][Next]> 1
<------------------- 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.
Enter index number to select OR [Exit][Previous][Next]> 1
<------------------- 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]> wlyxweb
<------------------- Fusion Middleware Configuration Wizard ------------------>
Edit Domain Information:
------------------------
| Name | Value |
_|________|_________|
1| *Name: | wlyxweb |
Use above value or select another option:
1 - Modify "Name"
2 - Discard Changes
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
"/bea/weblogic/user_projects/domains"]
Enter new Target Location OR [Exit][Previous][Next]> /wlyx/webapp/domains
<------------------- 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]> welwlyx50
<------------------- 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]> welwlyx50
<------------------- 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|N/A SDK 1.6.0_24 @ /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
2|Other Java SDK
Enter index number to select OR [Exit][Previous][Next]> 2
<------------------- Fusion Middleware Configuration Wizard ------------------>
Java SDK Selection:
-------------------
"JVM Directory" = []
Enter new JVM Directory OR [Exit][Previous][Next]> /bea/jdk/jdk1.6.0_37
<------------------- Fusion Middleware Configuration Wizard ------------------>
Java SDK Selection:
-------------------
"JVM Directory" = [/bea/jdk/jdk1.6.0_37]
Enter new JVM Directory 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]> 1
<------------------- Fusion Middleware Configuration Wizard ------------------>
Select Optional Configuration:
------------------------------
1|Administration Server [x]
2|Managed Servers, Clusters and Machines [ ]
3|RDBMS Security Store [ ]
Enter index number to select OR [Exit][Previous][Next]>
<------------------- Fusion Middleware Configuration Wizard ------------------>
Configure the Administration Server:
------------------------------------
Each WebLogic Server domain must have one Administration Server. The
Administration Server is used to perform administrative tasks.
| Name | Value |
_|__________________|_____________________|
1| *Name: | AdminServer |
2| *Listen address: | All Local Addresses |
3| Listen port: | 7001 |
4| SSL listen port: | N/A |
5| SSL enabled: | false |
Use above value or select another option:
1 - Modify "Name"
2 - Modify "Listen address"
3 - Modify "Listen port"
4 - Modify "SSL enabled"
Enter option number to select OR [Exit][Previous][Next]>
<------------------- Fusion Middleware Configuration Wizard ------------------>
Creating Domain...
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]
**** Domain Created Successfully! ****
四:weblogic的使用
一、啓動服務時無需輸入用戶名和密碼
進入到你新建的域中:cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer
而後在該文件夾下新建名爲security的文件夾:mkdir security
在剛剛新建是文件夾中新建名爲boot.properties文件:vi boot.properties
而後在該文件中輸入:
username=weblogic
password=weblogc123
保存後退出。重啓weblogic。此時你會發覺,weblogic不再會提示要求你輸入weblogic管理臺的用戶名和密碼了。
重啓後咱們來到剛剛的新建的文件夾中查看新建的文件:
cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/security
vi boot.properties發現它的內容已經變成下面這個樣子了:
#Sun Aug 04 10:23:54 CST 2013
password={AES}KWRQeICbIyJLO3zh+v+/9JeJtCzpK9ge6j4pqf9sSqA\=
username={AES}ICJVfwErXU5MOQyVPzcvVpKBkK6gI6UFlwqkkEuVgBg\=
Weblogic把它給加密了,所以只有裝Weblogic的那我的即System Admin才真正知道Weblogic控制檯的登陸信息,這樣就很安全了。
二、啓動weblogic服務
cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain
./startWeblogic.sh
nohup ./startWeblogic.sh &(nohup命令:若是你正在運行一個進程,並且你以爲在退出賬戶時該進程還不會結束,那麼可使用nohup命令。
該命令能夠在你退出賬戶/關閉終端以後繼續運行相應的進程。nohup就是不掛起的意思( no hang up))
找臺服務器 啓動瀏覽器 輸入 http://10.85.31.242:7001/console
WebLogic 12c下配置節點管理器管理受管理服務器 http://www.linuxidc.com/Linux/2015-12/126788.htm
WebLogic從新設置管理員帳號和口令 http://www.linuxidc.com/Linux/2015-08/121052.htm
CentOS 6.3安裝配置Weblogic 10 http://www.linuxidc.com/Linux/2014-02/96918.htm
Oracle WebLogic 11g 安裝部署文檔 PDF http://www.linuxidc.com/Linux/2013-04/83658.htm
Linux部署Weblogic11g http://www.linuxidc.com/Linux/2013-01/77940.htm
Oracle基礎教程之安裝與配置Weblogic單實例 http://www.linuxidc.com/Linux/2012-02/54418.htm
Linux下Weblogic卸載 http://www.linuxidc.com/Linux/2012-01/51886.htm
Weblogic多機器集羣的配置 http://www.linuxidc.com/Linux/2011-12/50577.htm
Weblogic的安裝和配置 http://www.linuxidc.com/Linux/2011-12/49082.htm
更多Oracle相關信息見Oracle 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=12