IMBAzxt / projectInfo

项目相关
0 stars 0 forks source link

WEBLOGIC #2

Open IMBAzxt opened 7 years ago

IMBAzxt commented 7 years ago

weblogic启动\停用

su - weblogic

$ cd $ ./start.sh -- 启动 $ ./stop.sh -- 停用

Oracle

su - oracle

$ sqlplus /nolog -- 是以不连接数据库的方式启动sql*plus $ connect /as sysdba -- 是以DBA身份连接到oracle $ startup -- 启动实例

/data/weblogic/weblogic12/domain/domain1/servers/AdminServer/tmp/_WL_user/CEAIR-1.0-SNAPSHOT/85nkp8/war/WEB-INF/classes/

nohup /data/weblogic/domains/domain1/bin/startWebLogic.sh & nohup /data/weblogic/domains/domain1/bin/startManagedWebLogic.sh &

/data/weblogic/domains/domain1/servers/AdminServer/logs

wls:/offline> readTemplate('/data/weblogic/weblogic12/wlserver/common/templates/wls/wls.jar') WARNING: The readTemplate is deprecated. Use selectTemplate followed by loadTemplates in place of readTemplate. wls:/offline/base_domain>cd('Servers/AdminServer') wls:/offline/base_domain/Server/AdminServer>cmo.setListenAddress('192.168.1.239') wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 'prod') Error: set() failed. Do dumpStack() to see details. wls:/offline/base_domain/Server/AdminServer>setOption('ListenPort', 'prod') Error: Config option " ListenPort " not allowed. wls:/offline/base_domain/Server/AdminServer>setOption('ServerStartMode', 'prod') wls:/offline/base_domain/Server/AdminServer>set('ListenPort','7001') Error: set() failed. Do dumpStack() to see details. wls:/offline/base_domain/Server/AdminServer>set('ListenPort',7001)
wls:/offline/base_domain/Server/AdminServer>create('AdminServer','SSL') Proxy for AdminServer: Name=AdminServer, Type=SSL wls:/offline/base_domain/Server/AdminServer>cd('SSL/AdminServer') wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('Enabled','True') wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('ListtenPort',7002) Error: set() failed. Do dumpStack() to see details. wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('ListenPort',7002) wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>cd('/') wls:/offline/base_domain>cd('Security/base_domain/User/weblogic') wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('kg/wbl/12') wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('ServerStartMode','prod') wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain','true') wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/data/weblogic/weblogic12/domain/domain1') wls:/offline/domain1/Security/domain1/User/weblogic>closeTemplate() wls:/offline>exit()

IMBAzxt commented 7 years ago

startWebLogic.sh

第一种,这种方法最常用:

键入 nohup ./startWebLogic.sh &

第二种,当上面的sh需要与用户交互(比如需要输入用户名,口令),可以这样:

键入 ./startWebLogic.sh

进行交互操作 ...

按下 "ctrl + z" 输入 "bg" 程序进入后台运行

提问:CTRL-Z和CTRL-C区别? 回答: CTRL-Z和CTRL-C都是中断命令,但是他们的作用却不一样. CTRL-C是强制中断程序的执行, 而CTRL-Z的是将任务中断,但是此任务并没有结束,他仍然在进程中他只是维持挂起的状态,用户可以使用fg/bg操作继续前台或后台的任务,fg命令重新启动前台被中断的任务,bg命令把被中断的任务放在后台执行. 例如: 当你vi一个文件是,如果需要用shell执行别的操作,但是你又不打算关闭vi,因为你得 存盘推出,你可以简单的按下CTRL-Z,shell会将vi进程挂起~,当你结束了那个shell操作之后,你可以用fg命令继续vi你的文件.不是很方便么?!

Linux/Unix 区别于微软平台最大的优点就是真正的多用户,多任务。因此在任务管理上也有别具特色的管理思想。我们知道,在 Windows 上面,我们要么让一个程序作为服务在后台一直运行,要么停止这个服务。而不能让程序在前台后台之间切换。而 Linux 提供了 fg 和 bg 命令,让你轻松调度正在运行的任务。 假设你发现前台运行的一个程序需要很长的时间,但是需要干其他的事情,你就可以用 Ctrl-Z ,终止这个程序,然后可以看到系统提示: [1]+ Stopped /root/bin/rsync.sh 然后我们可以把程序调度到后台执行:(bg 后面的数字为作业号)

bg 1

[1]+ /root/bin/rsync.sh & 用 jobs 命令查看正在运行的任务:

jobs

[1]+ Running /root/bin/rsync.sh & 如果想把它调回到前台运行,可以用

fg 1

/root/bin/rsync.sh 这样,你在控制台上就只能等待这个任务完成了。 & 将指令丢到后台中去执行 [ctrl]+z 將前台任务丟到后台中暂停 jobs 查看后台的工作状态 fg %jobnumber 将后台的任务拿到前台来处理 bg %jobnumber 将任务放到后台中去处理 kill 管理后台的任务.