third服务器搭建, 以10.151 .0 .159 服务器为例
1.首先在admin主管服务器上新建服务器名称
1.1
1.2
1.3.server_third_0_169
1.4
1.5 激活更改
1.6 更改代码路径
1.6.1
1.6.2
1.6.3
1.6.4
2.shell控制台 配置domain third
2.1.目录操作
[ weblogic@iZzm09z3d7ic7nihelcd5gZ bin] $ pwd
/ weblogic/ bea/ wlserver_10. 3 / common/ bin
[ weblogic@iZzm09z3d7ic7nihelcd5gZ bin] $ ls - la
total 120
drwxrwxr- x 2 weblogic weblogic 4096 Apr 24 11 : 19 .
drwxrwxr- x 11 weblogic weblogic 4096 Apr 24 11 : 19 . .
- rwxr- x-- - 1 weblogic weblogic 22721 Apr 24 11 : 19 commEnv. sh
- rwxr- x-- - 1 weblogic weblogic 2110 Apr 24 11 : 19 config_builder. sh
- rwxr- x-- - 1 weblogic weblogic 2262 Apr 24 11 : 19 config. sh
- rwxr- x-- - 1 weblogic weblogic 2567 Apr 24 11 : 19 pack. sh
- rwxr- x-- - 1 weblogic weblogic 2150 Apr 24 11 : 19 setPatchEnv. sh
- rwxr- x-- - 1 weblogic weblogic 4070 Apr 24 11 : 19 startDerby. sh
- rwxr- x-- - 1 weblogic weblogic 4076 Apr 24 11 : 19 startManagedWebLogic. sh
- rwxr- x-- - 1 weblogic weblogic 1436 Apr 24 11 : 19 stopDerby. sh
- rwxr- x-- - 1 weblogic weblogic 2075 Apr 24 11 : 19 unpack. sh
- rwxr- x-- - 1 weblogic weblogic 3286 Apr 24 11 : 19 upgrade. sh
- rwxr- x-- - 1 weblogic weblogic 31205 Apr 24 11 : 19 wlscontrol. sh
- rwxr- x-- - 1 weblogic weblogic 13740 Apr 24 11 : 19 wlsifconfig. sh
- rwxr- x-- - 1 weblogic weblogic 772 Apr 24 11 : 19 wlst. sh
[ weblogic@iZzm09z3d7ic7nihelcd5gZ bin] $ sh config. sh
2.2.开始搭建
开始搭建(单独一个页面)
3.创建启动 查看 停止脚本
3.1 创建目录
[weblogic@iZzm09z3d7ic7nihelcd5gZ bin]$ mkdir -p /weblogic/webapp/third/server_third_0_169
[weblogic@iZzm09z3d7ic7nihelcd5gZ bin]$ mkdir -p /weblogic/webapp/third/config
3.2 创建本机特殊Properties文件
[ weblogic@iZzm09z3d7ic7nihelcd5gZ config] $ pwd
/ weblogic/ webapp/ third/ config
[ weblogic@iZzm09z3d7ic7nihelcd5gZ config] $ touch serverConfig. properties
serverConfig. properties文件具体内容可以参考其他的服务器以及本机特殊需求;
也可以直接上传该文件到config目录下面
[ weblogic@iZzm09z3d7ic7nihelcd5gZ server_third_0_169] $ pwd
/ weblogic/ webapp/ third/ server_third_0_169
[ weblogic@iZzm09z3d7ic7nihelcd5gZ server_third_0_169] $
start.sh
#clear cache of server_167
cd / weblogic/ bea/ user_projects/ domains/ third/ servers/ server_third_0_169/ tmp/ _WL_user
if [ $? - eq 0 ] ; then
rm - Rf *
fi
cd / weblogic/ bea/ user_projects/ domains/ third/ servers/ server_third_0_169/ stage
if [ $? - eq 0 ] ; then
rm - Rf *
fi
echo "clear cache server_third_0_234, sucessfull"
DOMAIN_HOME= "/weblogic/bea/user_projects/domains/third"
cd ${ DOMAIN_HOME} / bin
nohup . /startManagedWebLogic. sh server_third_0_169 http: / / 10.151 .0 .140 : 9001 >> ${ DOMAIN_HOME} / logs/ wls. log 2 > & 1 &
stop.sh
DOMAIN_HOME= "/weblogic/bea/user_projects/domains/third"
cd ${ DOMAIN_HOME} / bin
nohup . /stopManagedWebLogic. sh server_third_0_169 t3: / / 10.151 .0 .140 : 9001 weblogic eservice95549 >> ${ DOMAIN_HOME} / logs/ wls. log 2 > & 1 &
#i= 0
#for x in `ps - ef | grep java | grep thirdapi_180_dat| awk '{print $2}' `
#do
#kill - 9 "$x"
#let "i++"
#done
#echo "server_50_184 already shutdown successfully!"
view.sh
cd /
tail - f / weblogic/ bea/ user_projects/ domains/ third/ logs/ wls. log
4.配置boot.prpoerties文件
4.1. boot.properties文件的作用
主要是登录主控服务器( admin) 服务器的控制台;
设置username和password
4.2.从来没有启动过受管理服务器的前提下,下面的文件夹,没有servers文件夹
[ weblogic@iZzm09z3d7ic7nihelcd5gZ third] $ pwd
/ weblogic/ bea/ user_projects/ domains/ third
[ weblogic@iZzm09z3d7ic7nihelcd5gZ third] $ ls - la
total 48
drwxr- x-- - 9 weblogic weblogic 4096 Jun 21 11 : 38 .
drwxr- x-- - 3 weblogic weblogic 4096 Jun 21 11 : 28 . .
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 11 : 28 autodeploy
drwxr- x-- - 5 weblogic weblogic 4096 Jun 21 11 : 38 bin
drwxr- x-- - 9 weblogic weblogic 4096 Jun 21 11 : 38 config
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 11 : 28 console- ext
- rw- r-- -- - 1 weblogic weblogic 462 Jun 21 11 : 38 fileRealm. properties
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 11 : 38 init- info
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 11 : 28 lib
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 11 : 38 security
- rw- r-- -- - 1 weblogic weblogic 765 Jun 21 11 : 38 startManagedWebLogic_readme. txt
- rwxr- x-- - 1 weblogic weblogic 257 Jun 21 11 : 38 startWebLogic. sh
[ weblogic@iZzm09z3d7ic7nihelcd5gZ third] $
5.创建logs日志
[ weblogic@iZzm09z3d7ic7nihelcd5gZ third] $ cd / weblogic/ bea/ user_projects/ domains/ third/
[ weblogic@iZzm09z3d7ic7nihelcd5gZ third] $ mkdir logs
[ weblogic@iZzm09z3d7ic7nihelcd5gZ third] $ ls - la
total 60
drwxr- x-- - 12 weblogic weblogic 4096 Jun 21 22 : 50 .
drwxr- x-- - 3 weblogic weblogic 4096 Jun 21 13 : 50 . .
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 13 : 50 autodeploy
drwxr- x-- - 5 weblogic weblogic 4096 Jun 21 14 : 02 bin
drwxr- x-- - 10 weblogic weblogic 4096 Jun 21 14 : 04 config
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 13 : 50 console- ext
- rw- r-- -- - 1 weblogic weblogic 462 Jun 21 14 : 04 fileRealm. properties
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 14 : 02 init- info
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 13 : 50 lib
drwxrwxr- x 2 weblogic weblogic 4096 Jun 21 22 : 50 logs
drwxr- x-- - 2 weblogic weblogic 4096 Jun 21 14 : 02 security
drwxr-- -- - 4 weblogic weblogic 4096 Jun 21 14 : 04 servers
- rw- r-- -- - 1 weblogic weblogic 765 Jun 21 14 : 02 startManagedWebLogic_readme. txt
- rwxr- x-- - 1 weblogic weblogic 257 Jun 21 14 : 02 startWebLogic. sh
drwxr-- -- - 2 weblogic weblogic 4096 Jun 21 14 : 04 tmp
[ weblogic@iZzm09z3d7ic7nihelcd5gZ third] $ cd logs/
[ weblogic@iZzm09z3d7ic7nihelcd5gZ logs] $ touch wls. log
[ weblogic@iZzm09z3d7ic7nihelcd5gZ logs] $
服务器启动较慢, 时区问题
添加
行数 400 多行 JAVA_OPTION附近
- Duser. timezone= GMT+ 08 - Djava. security. egd= file: / dev/ . /urandom - DUseSunHttpHandler= true
7.至此,服务器搭建完成