Linux下命令行安装WebLogic 10.3.6
一、安装前准备工作:安装jdk,配置环境变量
二、开始安装:
1、进入安装路径:/home/weblogic
2、将安装文件wls1036_generic.jar放入安装目录
3、chmod a+x wls1036_generic.jar 赋予安装文件可执行的权限
4、执行安装命令:java -jar filename.jar -mode=console
注:如果安装文件是.bin格式的文件,安装命令为:./wls1036_generic.bin -mode=console;(你可以不加“-mode=console”的控制台文本模式,因为在你安装时无法启动图形安装界面时它会自动的进入文本控制台模式的)
5、控制台安装:
一、安装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 ...
二、配置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的使用
1、启动服务时无需输入用户名和密码
进入到你新建的域中: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控制台的登录信息,这样就很安全了。
2、启动weblogic服务
cd /home/weblogic/oracle/middleware/user_projects/domains/base_domain
./startweblogic.sh
nohup ./startweblogic.sh &(nohup命令:如果你正在运行一个进程,而且你觉得在退出帐户时该进程还不会结束,那么可以使用nohup命令。
该命令可以在你退出帐户/关闭终端之后继续运行相应的进程。nohup就是不挂起的意思( no hang up),& 就是在后台运行),如果该命令无法执行,可换成
sudo nohup ./startweblogic.sh &
3、停止weblogic服务
cd /home/weblogic/oracle/middleware/user_projects/domains/base_domain
./stopweblogic.sh
找台服务器 启动浏览器 输入 http://10.85.31.242:7001/console
输入用户名、密码登录后一直在首页转圈,这是因为linux下jdk的bug造成的,修改下配置即可:
修改 $java_home/jre/lib/security/java.security 文件,
替换securerandom.source=file:/dev/random
为 securerandom.source=file:/dev/./urandom。对所有使用jvm的应用生效。
上一篇: 你猜猜我有多重?