사용자 도구

사이트 도구


service:was:weblogic:install

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
service:was:weblogic:install [2007/06/16 08:03]
mattabu
service:was:weblogic:install [2009/01/03 02:25] (현재)
starlits
줄 2: 줄 2:
  
 ===== Install Debian Packages ===== ===== Install Debian Packages =====
-Weblogic 9, 10 의 경우에는 아래 패키지를 먼저 설치해야 한다.+Weblogic 9, 10 의 경우에는 아래 패키지를 먼저 설치해야 정상적으로 동작한다.
 <code> <code>
 # apt-get install gnome # apt-get install gnome
 </code> </code>
 +  * gnome 을 설치하면 상당히 많은 패키지가 설치되는데 이중에 딱 필요한 패키지만 추출해내는 작업이 필요하다.
  
 ===== Create Account weblogic on Linux ===== ===== Create Account weblogic on Linux =====
줄 192: 줄 193:
 Configure Administrative Username and Password: Configure Administrative Username and Password:
 ----------------------------------------------- -----------------------------------------------
-Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode servers.+Create a user automatically assigned to the Administrative Role.  
 +This user is the default administrator used to start development mode servers.
     |          Name                        Value              |     |          Name                        Value              |
    _|_________________________|_________________________________|    _|_________________________|_________________________________|
줄 210: 줄 212:
 Configure Administrative Username and Password: Configure Administrative Username and Password:
 ----------------------------------------------- -----------------------------------------------
-Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode servers.+Create a user automatically assigned to the Administrative Role.  
 +This user is the default administrator used to start development mode servers.
     "*User password:" = []     "*User password:" = []
 Input new *User password: OR [Exit][Reset][Accept]> weblogic Input new *User password: OR [Exit][Reset][Accept]> weblogic
줄 218: 줄 221:
 Configure Administrative Username and Password: Configure Administrative Username and Password:
 ----------------------------------------------- -----------------------------------------------
-Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode servers.+Create a user automatically assigned to the Administrative Role.  
 +This user is the default administrator used to start development mode servers.
     |          Name                        Value              |     |          Name                        Value              |
    _|_________________________|_________________________________|    _|_________________________|_________________________________|
줄 237: 줄 241:
 Configure Administrative Username and Password: Configure Administrative Username and Password:
 ----------------------------------------------- -----------------------------------------------
-Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode servers.+Create a user automatically assigned to the Administrative Role.  
 +This user is the default administrator used to start development mode servers.
     |          Name                        Value              |     |          Name                        Value              |
    _|_________________________|_________________________________|    _|_________________________|_________________________________|
줄 297: 줄 302:
 ===== Start Admin Server ===== ===== Start Admin Server =====
 <code bash> <code bash>
-$ cd /home/weblogic/bea/user_projects/domains/mydomain +$ cd /home/weblogic/bea/user_projects/domains/mydomain/bin 
-$ nohup ./startWebLogic.sh > /home/weblogic/bea/logs/nohupA.out &+$ nohup ./startWebLogic.sh > /home/weblogic/bea/logs/nohupA.log &
 </code> </code>
  
 ===== Shutdown Admin Server ===== ===== Shutdown Admin Server =====
 <code bash> <code bash>
-$ cd /home/weblogic/bea/user_projects/domains/mydomain+$ cd /home/weblogic/bea/user_projects/domains/mydomain/bin
 $ ./stopWebLogic.sh $ ./stopWebLogic.sh
 </code> </code>
줄 314: 줄 319:
 ==== Create ==== ==== Create ====
 Console 메뉴에서 mydomain > Servers 를 선택하고, Configure a new Server... 를 클릭한다. Console 메뉴에서 mydomain > Servers 를 선택하고, Configure a new Server... 를 클릭한다.
-Name 에 적당한 이름(MyServer-1)을 입력하고, 필요한 경우 Listen Address 를 입력하고, Listen Port를 원하는 값으로 입력한다.+Name 에 적당한 이름(Server-0)을 입력하고, 필요한 경우 Listen Address 를 입력하고, Listen Port를 원하는 값으로 입력한다.
 마지막으로 Create 버튼을 클릭한다. 그러면 메뉴에서 mydomain > Servers 아래에 자신이 부여한 이름으로 Managed Server 가 생성된다. 마지막으로 Create 버튼을 클릭한다. 그러면 메뉴에서 mydomain > Servers 아래에 자신이 부여한 이름으로 Managed Server 가 생성된다.
  
-==== Execute ====+ 
 +==== Startup ====
 서버를 생성했다고 해서 끝이 난 것이 아니고, Shell Command 상에서 해당 Managed Server 를 실행해주어야 한다. 서버를 생성했다고 해서 끝이 난 것이 아니고, Shell Command 상에서 해당 Managed Server 를 실행해주어야 한다.
 <code bash> <code bash>
-$ nohup ./startManagedWebLogic.sh MyServer-http://localhost:7001 &+$ cd /home/weblogic/bea/user_projects/domains/mydomain/bin 
 +$ nohup ./startManagedWebLogic.sh Server-http://localhost:7001 > /home/weblogic/bea/logs/nohupM0.log & 
 +</code> 
 +만약 Managed Server 가 실행되지 않는다면, 운영모드인지 확인하고, 
 +cd /home/weblogic/bea/user_projects/domains/mydomain/ 에 boot.properties 파일이 있는지 확인한다. 
 +boot.properties 파일이 없다면 아래내용을 입력한후 저장하고, Managed Server 를 실행시킨다. 
 +<code> 
 +username=사용자아이디 
 +password=비밀번호
 </code> </code>
 +
 +
 +
  
 ==== Shutdown ==== ==== Shutdown ====
 <code bash> <code bash>
-$ /home/weblogic/bea/jdk142_11/bin/java  +$ /home/weblogic/bea/jdk150_06/bin/java  
--classpath /home/weblogic/bea/weblogic81/server/lib/weblogic.jar weblogic.Admin +-classpath /home/weblogic/bea/wlserver_10.0/server/lib/weblogic.jar weblogic.Admin 
 -url t3://localhost:7001  -url t3://localhost:7001 
 -username 아이디  -username 아이디 
--password 비밀번호 FORCESHUTDOWN MyServer-1+-password 비밀번호 FORCESHUTDOWN Server-
 +</code> 
 +또는 
 +<code> 
 +$ cd /home/weblogic/bea/domains/test_domain/bin 
 +$ ./stopManagedWeblogic.sh Server-0 t3://localhost:7001 아이디 비밀번호
 </code> </code>
  
 ==== Start & Shutdowon 정리 ==== ==== Start & Shutdowon 정리 ====
-위와 같이 Weblogic Admin, Managed Server 를 시작,종료가 상당히 번거로운것을 알 수 있다. 이를 좀 더 간편하게 하기 위해서 동길이가 제작한 스크립트를 소개한다. 물론 허락은 받지 않았지만, 조만간 허락을 받도록 하겠다. 적당히 잘 수정해서 쓰면 편할 것이다.+  * 위와 같이 Weblogic Admin, Managed Server 를 시작,종료가 상당히 번거로운것을 알 수 있다. \\ 이를 좀 더 간편하게 하기 위해서 동길이가 제작한 스크립트를 소개한다. \\ 물론 허락은 받지 않았지만, 조만간 허락을 받도록 하겠다. 적당히 잘 수정해서 쓰면 편할 것이다.
 <code bash> <code bash>
 #!/bin/sh #!/bin/sh
 +
 +# desc : weblogic admin/manage service start/stop scripts
 +# starlits@adminschool.net
 +
  
 ############################################################### ###############################################################
줄 463: 줄 489:
 </code> </code>
  
-===== non-root User로 80(<1024)포트 서비스하는 방법 ===== 
-참고사이트 : http://www.linux.org.mt/article/tomcat-ports 
- 
-==== Introduction ==== 
-In Linux, as a security precaution built into the kernel, only the root user can bind to a port below 1024. Thus, any webserver, ftp server etc needs to start up as root if only to bind to their standard socket numbers. On the other hand, having a running network server as root is in itself a bad idea, so most server software only remain as root for the time it takes them to establish the initial "listening" socket, then drop to a non-privileged user for the remainder of their operation. 
- 
-Since Tomcat is written in Java, it does not have the ability to switch users like this - that's a rather platform specific thing to do. Below are a number of ways around this limitation, which allow Tomcat to serve requests received on port 80 (the standard web-server port) - or any other "privileged" port for that matter, without having to run it as the root user.  
- 
-==== The Apache solution ==== 
-I guess most people reading this article would already know of this option and have rejected it for their own reasons, but it's mentioned here for completeness' sake. 
- 
-The most common solution is to run the Apache httpd as the web server, and configuring Apache and Tomcat in such a way that while Apache takes care of the port 80 stuff and serves static pages, CGI scripts and so on, all requests for JSPs or servlets get shunted over to Tomcat for processing. This is a rather popular configuration and is described elsewhere on the Jakarta website, so I won't describe it again here.  
- 
-==== The IPTables solution ==== 
-his solution allows Tomcat to run as an independent web server, using a non-privileged user, and still respond to port 80 on the server. It requires Linux with a kernel v2.4.x and iptables installed. If you have a 2.2 kernel, check the ipchains section at the end. 
- 
-Modern Linux kernels have a very powerful infrastructure for filtering, translating and otherwise altering network packets as they arrive, get processed, or leave the computer. Frequently, this software (referred to as netfilter or iptables) is used to build firewalls or gateway configurations. If you've got any computer connected to the web, it's an extremely good idea to have a firewall in any case. 
- 
-IPTables also allows you to do nifty things like redirecting all incoming packets on, say, port 80 (the default www port) to another port such as port 8080 (Tomcat's default port). In the rest of the section, I will be using these two ports - if your configuration uses a different port, please adjust the commands accordingly. 
- 
-To do this redirection, two things are needed: To ensure that the firewall allows incoming requests to port 8080, and to redirect packets from port 80 to port 8080. 
- 
-The first step is only needed if you have configured your firewall to protect your machine (and if you haven't done so, you should). Use your firewall-configuration software to accept incoming packets of type tcp and destination-port 8080. Essentially, you need a duplicate of the standard rule(s) for port 80, using port 8080. 
- 
-The second step is to instruct IPTables to redirect all packets which arrive on port 80, to port 8080. This is done using the following command (as root):  
-<code bash> 
-# iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j REDIRECT --to-port 8080 
-</code> 
-The above command tells iptables to redirect all tcp packets with a destination port 80, coming in on network interface eth0, to the port 8080 (on the same machine). You will probably want to add this rule to the files used by your firewall configuration so that it is added automatically on booting. 
- 
-Unfortunately this will not redirect local requests, since these bypass the PREROUTING chain. Thus, any browsers or other client software running on the server itself will either have to connect directly to port 8080, or something else must be used to redirect these local requests. While some servers might not require local requests to be redirected, keep in mind that this could affect local search engine software etc. For a solution to this issue, see the redirector section below.  
- 
-==== The rinetd solution ==== 
-Another simple solution is to use a dedicated port redirector, such as rinetd. This is a tiny program that simply receives a packet and redirects it to a different address or port. Since this processes packets after they've passed through IPtables, it can handle locally-originating requests too. All you have to do is install it, create a file /etc/rinetd.conf containing the line "xx.xx.xx.xx 80 xx.xx.xx.xx 8080" (where xx.xx.xx.xx is your IP address), and start it as a service. Rinetd will catch and redirect those requests which bypass the IPtables redirection rule. 
- 
-You may wonder, why not use rinetd (or a similar port redirector) for all requests? Unfortunately rinetd has a significant problem - it makes all packets appear as if they originate on the local machine. This means that, in the web server access logs for instance, it will be impossible to differentiate between different visitors, or to set permissions based on IP addresses. 
- 
-Used together, iptables and rinetd allow tomcat to run as a non-privileged user, while still serving requests arriving via port 80. Since rinetd will only be handling locally-originating requests, it doesn't affect the originating IP-address.  
- 
-==== IPchains alternative ==== 
-Kernels prior to v2.4 had a different packet filtering infrastructure - ipchains instead of iptables. The following command should accomplish the same things as the IPtables command described, but I never tried it: 
-<code bash> 
-# ipchains -I input --proto TCP --dport 80 -j REDIRECT 8080 
-</code> 
  
-===== 그 외 ===== 
-Apache 와 연동하는 법, 클러스터 구성하는 법 등에 대해서는 필요시 다시 정리하겠다. 
-특히 클러스터를 구성을 하려면 L4가 있던지, Apache 와 연동이 되어 있어야 한다는 점은 알고 있어야겠다. 
  
service/was/weblogic/install.1181948596.txt.gz · 마지막으로 수정됨: 2007/06/16 08:03 저자 mattabu