웹서버 제품 설치전 요구사항 목록, Install 절차,
그리고 Uninstall에 대해 제시합니다.
|
|
|
|
Compaq Tru64 4.0d, 4.0e*, 4.0f* |
Alpha |
|
|
Hewlett-Packard HP-UX 11.0, 11.0 64-bit* |
PA-RISC |
|
|
Silicon Graphics** SGI IRIX 6.5.6 |
MIPS |
|
|
Sun Solaris 2.6, 7*, 8 |
SPARC |
|
|
Windows NT 4.0 |
Pentium |
|
|
RedHat Linux 2.2.12 with glibc 2.1.2 (RedHat 6.1) |
x86 |
|
|
IBM AIX 4.3.3 |
Power PC |
|
|
|
|
|
|
|
Windows NT 4.0 SP6A |
|
Patch kit 3, Patch kit 4, Patch kit 5, Patch kit 6 |
Solaris 2.6, 7*, 8 (SPARC ) |
JDK 1.2.2_01 or higher |
HP-UX 11.0, 11.0 64-bit* (PA-RISC ) |
JDK 1.2.2.02 |
Windows NT 4.0 (Pentium) |
JDK of 1.2.2_01 or higher |
IBM AIX 4.3.3 (Power PC) |
JDK 1.2.2. |
Compaq Tru64 4.0d, 4.0e*, 4.0f* (Alpha) |
JDK 1.2.2-3 or higher |
Linux 2.2.12 with glibc 2.1.2 (RedHat 6.1) (x86) |
JDK of 1.2.2 or higher |
Silicon Graphics** SGI IRIX 6.5.6 (MIPS) |
|
Solaris 2.6, 7, 8, 9 (UltraSPARC ) |
Solaris VM Java version 1.2.2 (build Solaris_JDK_1.2.2_010, native threads, sunwjit) |
HP-UX 11.0, 11.0 64-bit, 11i (PA-RISC ) |
Java version 1.2.2.10 Classic VM (build 1.2.2.10-01/09/14-PA_RISC2.0, native threads, HP) |
Windows NT 4.0 SP6a, Windows 2000 Server SP2(Pentium ) |
Java version 1.2.2 Classic VM (build JDK-1.2.2_010, native threads, symcjit) |
Red Hat Linux 6.2 ,
kernel 2.2.14-12, glibc 2.1.3-15
Red Hat Linux 7.1 2.96-79,
glibc-2.2.2-10, libncurses.so.4
(X86) |
Java version 1.2.2 Classic VM (build Linux_JDK_1.2.2_RCA, native threads, sunwjit) |
Sun ONE Web Server를 설치하기 전 root로 로그인 하여야 합니다.. Root로 로그인 해야 한다.
- 1024보다 아래의 포트로는 Sun ONE Web Server를 설치할 수 없습니다.
- 서버를 설치하는 방법중 Expression installation이 있는데 root로 로그인 하지 않으면 Expression installation을 할 수 없습니다.
1. 설치 파일을 둘 임시 디렉토리를 생성합니다.
2. 이 디렉토리에 압축된 설치 파일을 copy 합니다.
3. 압축을 풉니다.
- CD 일 경우 : tar –xvf filename.tar
- Download 받았을 경우 : gzip –dc filename.tar.gz | tar xvf -
4. 압축을 풀고 그 디렉토리에 다음 파일들이 있는지 확인 합니다.
: LICENSE.txt , README.txt , setup , and setup.inf ……
Install하는 과정에서, 3가지 installation방법 중에서 하나를 선택할 수 있습니다. : Express, Typical Or Custom . 대부분 Typical or Custom으로 설치하고 또 권장하고 있습니다. Express로 설치하려면 반드시 root로 로그인 해야 합니다.
Typical or Custom Installation
1. 설치파일의 압축을 풀어놓은 디렉토리로 이동합니다.
2. 설치를 시작하기 위해 ./setup을 타이핑 합니다.
3. 아래 표가 설치되는 과정을 나타낸 것입니다.
[lovet jhchoi:~/install/iws6.0 ]ls
./ README.txt install.inf setup.inf template.inf
../ WebServer/ installWrapper* LICENSE.txt setup*
template.inf_backup
|
●설치파일의 압축을 풀어놓은 디렉토리로 이동하고 설치를 시작한다. :./setup |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
--------------------------------------------------------------------
Welcome to the iPlanet Web Server installation program. This program will install iPlanet Server Products and the iPlanet Console on your computer.
It is recommended that you have "root" privilege to install the software
Tips for using the installation program:
-Pess "Enter" to choose the default and go to the next screen
-Type "Control-B" to go back to the previous screen
-Type "Control-C" to cancel the installation program
-You can enter multiple items using commas to separate them. For example: 1, 2, 3
Would you like to continue with installation? [Yes]:
|
●install을 계속하기위해 yes한다.
- Enter : default 를 받아들이는 옵션
- Ctrl+B : install중 전화면으로
돌아간다.
- Ctrl+C : install 을 중단한다.
- 다양한 값들을 ,로 구분한다.
(for example 1,2,3 )
-
|
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
--------------------------------------------------------------------------------
BY INSTALLING THIS SOFTWARE YOU ARE CONSENTING TO BE BOUND BY
AND ARE BECOMING A PARTY TO THE AGREEMENT FOUND IN THE
LICENSE.TXT FILE. IF YOU DO NOT AGREE TO ALL OF THE TERMS
OF THIS AGREEMENT, PLEASE DO NOT INSTALL OR USE THIS SOFTWARE.
|
● License에 동의할 것인지를 묻는다. No를 선택하면 설치를 중단한다
License을 읽고자 한다면 install을 중단하고 설치 디렉토리에 있는 LICENSE.txt를 읽고 다시 install 한다.
|
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
Choose an installation type:
1. Express installation
Allows you to quickly install the servers using the most
common options and pre-defined defaults. Useful for quick
evaluation of the products.
2. Typical installation
Allows you to specify common defaults and options.
3. Custom installation
Allows you to specify more advanced options. This is
recommended for experienced server administrators only.
To accept the default shown in brackets, press the Enter key.
Choose an installation type [2]: |
● install type 을 묻는다.
Install type으로 Express, Typical
그리고 Custom이 있는데,
대부분 Typical or Custom으로 설치하고 또 권장하고 있다.
Express로 설치하려면 반드시 root로 로그인 해야 한다.
(디폴트 값인 typical을 선택한다) |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
--------------------------------------------------------------------------------------
This program will extract the server files and install them
into a directory you specify. That directory is called the
server root in the product documentation and will contain
the server programs, the Administration Server, and the server
configuration files.
To accept the default shown in brackets, press the Enter key.
Install location [/usr/iplanet/servers]: |
● 웹 서버가 설치될 디렉토리를 묻는다.
/usr/netscape/servers라고 하면
웹 서버는
/usr/netscape/servers에 설치된다.
|
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
--------------------------------------------------------------------------------------
iPlanet Web Server components:
Components with a number in () contain additional
subcomponents which you can select using subsequent screens.
1. iPlanet Web Server, Enterprise Edition (5)
Specify the components you wish to install [All]: |
●모든 components를 선택한다.
Press Enter. |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
--------------------------------------------------------------------------------------
iPlanet Web Server, Enterprise Edition components:
Components with a number in () contain additional
Subcomponents which you can select using subsequent
screens.
1. Server Core
2. Java Runtime Environment
3. Java Support
4. Search and Indexing Support
5. SNMP Support
Specify the components you wish to install [1, 2, 3, 4, 5]: |
●install할 subcomponents를 선택한다.추후에 필요한 것은 다시 설치 가능하다.
Press enter!
1.Server Core: Administration
Server와 첫번째 iws의 instance를 설치하는 것
2.Java Runtime Environment :
java를 사용할 계획이라면 JRE or JDK를 반드시 설치해야 한다.
3.Java Support : Java Servlet을 사용할 계획이라면 이 subcomponent
를 설치한다.
4.Search and Indexing Support.
5.SNMP Support.: server를 모니터하기 위해 SNMP를 사용할 계획이라면 이것을 설치해야 한다. |
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
--------------------------------------------------------------------------------------
Enter the fully qualified domain name of the computer
on which you're installing server software. Using the form
<hostname>.<domainname>
Example: eros.airius.com.
To accept the default shown in brackets, press the Enter key.
Computer name [love.daou.co.kr]: |
●host와 domain name이다.
지정하거나 혹은 디폴트 값을 받아 들인다. |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
--------------------------------------------------------------------------------------
Choose a Unix user and group to represent the iPlanet server
in the user directory. The iPlanet server will run as this user.
It is recommended that this user should have no privileges
in the computer network system. The Administration Server
will give this group some permissions in the server root
to perform server-specific operations.
If you have not yet created a user and group for the iPlanet
server,create this user and group using your native UNIX
system utilities.
To accept the default shown in brackets, press the Return key.
System User [nobody]:nsuser |
● iPlanet Web Server를 동작시킬 시스템상의 등록된 사용자를 넣는다. 이때 사용되는 사용자 계정은 시스템 내에서 다른 어떠한 권한도 가지고 있지 않은 계정이어야
한다.
앞에서 생성한 nsuser를 입력한다.
|
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
--------------------------------------------------------------------------------------
Choose a Unix user and group to represent the iPlanet server
in the user directory. The iPlanet server will run as this user.
It is recommended that this user should have no privileges
in the computer network system. The Administration Server
will give this group some permissions in the server root
to perform server-specific operations.
If you have not yet created a user and group for the iPlanet
server,create this user and group using your native UNIX
system utilities.
To accept the default shown in brackets, press the Return key.
System User [nsuser]:
System Group[nobody];nsgroup |
● iPlanet Web Server를 동작시킬 시스템상의 등록된 사용자 그룹을 넣는다. 이때 사용되는 사용자 그룹은 시스템 내에서 다른 어떠한 권한도 가지고 있지 않은 그룹이어야
한다.
앞에서 생성한 nsgroup을 입력한다 |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
The iWS Administration Server is separate from the other web servers on the system and should not be confused with the Mission Control Admin Server. It is recommended that the iWS Administration Server run with a different user id than those used by the other web servers on the machine.
The Administration Server user is the only user able to write web server configuration files. If the iWS Administration Server is run as "root",,the administration GUI can be used to start and stop web servers.
Run iWS Administration Server as [root]: |
● Administration Server를 운영할 사용자를 입력한다. 서버 관리자는 새로운 서버를 설치할 수도 있고 설치된 서버를 실행 시킬 수도 있어야 한다. 만일 파일 시스템으로의 접근권한을 갖고 있지 않은 사용자를 설정한다면 새로운 서버의 설치 또는 실행은 성공하지 못할 것이다. |
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
The iWS Administration Server requires its own administrative user name and password for GUI access. When you access the iWS Administration Server GUI, it will prompt you for the administrative user name and password.
Please select a user name and password now.
iWS Admin Server User Name [admin]: |
● 인증하기 위한 Admin 의 name을 입력한다.
웹 브라우저로 웹 서버에 접근할 때 로그인 창이 뜨는데 그때
입력하는 user_name과 password 이다 |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
The iWS Administration Server requires its own administrative user name and password for GUI access. When you access the iWS Administration Server GUI, it will prompt you for the
administrative user name and password.
Please select a user name and password now.
iWS Admin Server User Name [admin]:
iWS Admin Server Password:
iWS Admin Server Password (again): |
●인증하기 위한 Admin 의 패스워드를 입력한다. |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
The iWS Administration Server also listens to a different port (with
restricted access). Pick a port number between 1024 and 65535 on which to run your iWS Administration Server. It must be different than the Mission Control Admin Port and your web
server port.
iWS Admin Server Port [8888]: |
● Admin server의 포트 번호를 입력한다. (1024 ~ 65535 사이의 포트 번호를 입력한다.)Default는 8888이고 이미 사용되고 있는 포트 번호는 사용할 수 없다. |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
Pick a port number between 1024 and 65535 on which to run your Web Server.
You should NOT use a port number on which you plan to run other servers.
Web Server Port [80]: |
● Web Service(HTTP) 포트를 지정한다. 기본포트는 80번이다 |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
Enter content root for the Web Server.
Web Server Content Root [/usr/iplanet/servers/docs]; |
● Web server의 content file들의 root 디렉토리를 묻는 것이다. Content file들의 디렉토리를 default가 아닌 다른 곳으로 하고자 한다면 그 디렉토리의 절대 경로를 여기에 적어준다 |
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
Java support in the Web Server requires either a Java Runtime
Environment (JRE) or a Java Development Kit (JDK) of version 1.2 or greater.
While a default JRE is provided, you may use any JDK with the Web Server.
Do you want to use your own JDK [No]: |
●설치 되어있는 JDK의 경로를 잡아줄 것인지를 묻는다. 여기서 설정하는 것도 가능하고, Server설치가 끝난 후 경로 설정을 하는 것도 가능
하다.
-jsp를 사용한다면 반드시 JDK를 설치해야한다. |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
Java support in the Web Server requires either a Java Runtime
Environment (JRE) or a Java Development Kit (JDK) of version 1.2 or greater.
You have either opted to use your own JDK or decided not to install the default JRE, in which case you must provide your
own JDK.
Please enter the absolute path to your JDK directory.
JDK Directory: |
●JDK가 설치 되어있는 경로를 묻는 것이다. (JDK는 이미 설치 되어있어야 한다.) |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
On most systems, the JDK libraries can be found in the /jre/lib
subdirectory of the JDK directory. Unless your system has special requirments, hit enter and leave this entry blank.
JDK LIBPATH: |
●JDK의 LIBPATH
JDK디렉토리 아래 디폴트 경로에 있다면 Enter !
(libraries가 다른 경로에 있다면
패스를 적어주어야 한다.) |
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
On most systems, the classes for the JDK libraries can be found in the /lib subdirectory of the JDK directory. Unless your
system has special requirments, hit enter and leave this entry
blank.
JDK CLASSPATH: |
|
|
|
Sun Netscape Alliance
iPlanet Web Server Installation/Uninstallation
-------------------------------------------------------------------------------------
Extracting Server Core...
Extracting Java Runtime Environment...
Extracting Java Support...
Extracting Search and Indexing Support...
Extracting SNMP Support...
Extracting Upgrade Files...
Server Core installed successfully.
mmJava Runtime Environment installed successfully.
mmJava Support installed successfully.
mmSearch and Indexing Support installed successfully.
mmSNMP Support installed successfully.
mmm
Press Return to continue... |
|
4. 설치가 끝나면 iPlanet Web Server가 설치된 디렉토리(server-root)로 이동합니다.
5. /server-root/https-admserv 로 가서 Adminserver를 start 합니다.
# [Server-root/https-admserv] : ./start
6. URL을 써서 설치한 iPlanet Web Server로 이동합니다.
http://server_name:administration_port
user name과 password를 입력합니다.
1.server root ( 설치된 디렉토리)로 가서 ./uninstall 을 실행합니다.
2.uninstall할 모든 components를 선택하고 Enter .
NOTE uninstall program은 서버의 모든 파일을 지우는 것은 아닙니다. 예를 들어 key, certificate, 환경파일, 로그들, ACL파일들 그리고 document root등은 지워지지 않으므로 uninstall한 후 수동으로 지워주어야 합니다.
웹서버 버전확인, 도큐먼트설정, 로그 설정, JDK 설정, JSP/Servlet설정, CGI설정, PHP설정, 인증서 설치, Weblogic연동방법에 대해 제시합니다.
I. 버전확인
Admin server에 접속한 뒤 Select Server에서 서버를 고른 후 Manage를 버튼을 누르면 Server On/Off 창으로 넘어갑니다. 그 곳에서 About this server 라는 hyperlink를 누르면 자세한 버전 정보를 확인할 수 있습니다.
웹 서버를 start할 경우 서버 버전과 관련된 정보를 error log에 기록하므로 logs 디렉토리의 errors 화일을 통해 확인할 수 있습니다.
(3) telnet command에서 확인하는 방법
- 3.x 버전 : 웹서버 설치 root 디렉토리/bin/https/ns-httpd -vi
- 4.x 버전 : 웹서버 설치 root 디렉토리/bin/https/bin/ns-httpd -v
- 6.x 버전 : 웹서버 설치 root 디렉토리/bin/https/bin/ns-httpd -v
- 6.x 버전 : 웹서버 root 디렉토리/start –version
2. Document 설정
(1) S1WS 4.1 일 경우
Server Manager화면의 Contents Mgmt 탭 – Primary Document Directory 메뉴에서 Primary Document의 경로를 변경 할 수 있습니다.
(2) S1WS 6.0 일 경우
Class Manager화면의 Contents Mgmt 탭 – Primary Document Directory 메뉴에서 Primary Document의 경로를 변경 할 수 있습니다.
3. Directory Indexing
Server Manager화면의 Contents Mgmt 탭 – Document Preference 메뉴에서
(6.0일 경우 Class Manager화면의 Contents Mgmt 탭 - Document Preference)
Index Filenames : 이 부분에 처음에 보여질 index 페이지를 설정 할 수 있습니다. 이곳에 index.html을 등록 하시면 index.html 페이지가 처음 불려지게 됩니다.
index.html뒤에 , 로 구분하여 home.html을 등록해 주면 index.html을 찾지 못했을 경우 index.html다음에 등록된 home.html을 찾게 됩니다.
처음 보여질 페이지를 index.jsp 나 기타 다른 페이지로 하고자 할 경우 Index
Filenames : 이 부분에 등록 하면 됩니다.
Index Filenames : 부분에 등록된 파일을 찾을 수 없을 경우
아래의 Directory Indexing부분의 설정에 따라 보여지는 내용이 달라 집니다.
Fancy 나 Simple로 설정하실 경우 Index Filenames : 부분에 등록된 파일을 찾을 수 없을 경우에 Document root 디렉토리에 있는 파일 항목들을 보여주게 됩니다.
그러나 None으로 설정 하시면 파일들을 나열해서 보여 주지 않고, 대신 특정 웹 페이지를 보이도록 하실 수 있습니다.
None로 설정 하시고 File to use for error response when indexing is none: 부분에 보여줄 에러 페이지를 등록 합니다.( 절대 경로로 등록 합니다.) 이 부분에 error.html을 등록 하셨다면 Index Filenames : 부분에 등록된 파일을 찾을 수 없을 경우 파일들을 다 보여 주지 않고 error.html을 보여주게 됩니다.
4. Log rotate 설정
웹 서버 로그를 rotate시키는 방법은 Internal 데몬방식과 Cron-Based 방식 2개가 있습니다.
(1) internal 데몬 로그 rotate
S1WS 4.1일 경우 access로그만 rotate됩니다. 6.0에서는 access 와 error 모두 rotate 됩니다. 설정하는 절차는 다음과 같습니다.
1) Server Manager화면으로 갑니다.
2) Status 탭을 누르시고 왼쪽의 메뉴 중 Archive Log를 누르시면 아래와 같은 화면이 나옵니다. (6.0 일 경우 server manager / logs / Archive log에서 설정하며 방법은 4.1과 동일 합니다.)
3) Internal daemon log rotation 을 선택하시고 하루 중 로그를 rotate시킬 시간을 정하신 후 rotate되는 간격을 설정합니다. Rotation interval의 default값은 30분입니다. ( 예: rotate start time 1:30 am rotate interval 1440이라 하였을 경우 하루 중 오전 1시 30분에 로그를 rotate하여 20020106.access와 같은 형태로 로그 파일을 생성하고 그 후 하루 간격으로 로그를 rotate하여 access 남깁니다.)
4) OK 버튼을 누릅니다.
5) 오른쪽 상단의 apply버튼을 누른 후 apply change합니다.
( 6.0 일 경우 Load Configuration 하여도 적용 됩니다.)
(2) Cron-Based 로그 rotate
S1WS 4.1, S1WS6.0 모두 access 와 error log 가 rotate 됩니다.
1) Cron based log rotation을 선택 하시고 rotate시킬 시간대를 선택합니다.
( 예 : 12:00 am을 선택 하시면 하루 중 12 :00 am에만 로그가 rotate됩니다.
하루 중 12:00 시와 2:00시에 rotate시키고자 한다면 12시를 선택한 후
ctrl 버튼을 누르고 2:00을 선택하시면 됩니다. )
그리고 특정 요일에는 rotate시키지 않으신 다면 특정 요일에 대한 체크를
풀어 주시면 됩니다.
2) OK 버튼을 누릅니다. 아래와 같은 화면으로 이동 합니다.
3) Server Manager링크를 클릭 합니다. 아래 화면으로 이동하게 됩니다.
Start 버튼을 눌러 cron 데몬을 on시킵니다.
오른쪽 상단의 apply버튼을 누른 후 apply change합니다
5. JDK 설정
Servlet은 웹서버에 내장된 jre만으로 실행이 가능합니다. 그러나 JSP를 실행시켜야 할 경우에는 jdk를 반드시 설치해야 하며, 설치된 jdk를 웹서버에 연동시켜 주어야합니다.
방법 :
Admin Server에서 Global Settings 탭을 선택하고 Configure JRE/JDK Paths 항목을 열어 JDK콤보 버튼을 클릭하고 JDK가 설치된 패스를 입력한 후 OK버튼을 클릭합니다.
https-admserv에서 stop/start해야 적용 됩니다.
예:
/usr/java1.2.2 에 JDK가 설치되었다면 JDK Path: 항목에 "/usr/java1.2.2" 를 입력하고 아래 lib path와 Class path는 공란으로 둡니다.
주의1 :
웹서버에서 JDK 패스 설정시 base directory (JDK가 설치된 처음디렉토리 ex:/usr/java1.2.2) 아래에 있는 기타 디렉토리를 입력하거나 특정 클레스 파일을 설정했을 경우 JSP가 정상적으로 동작하지 않을 수 있습니다.
잘못된 패스설정의 예
* /usr/java1.2.2/lib
* /usr/java1.2.2/bin
* /usr/java1.2.2/tools.jar
반드시 jdk가 설치된 디렉토리까지만 잡아 주셔야 합니다. .
예) /usr/java1.2.2 까지만..
|
주의 2:
JDK 연동 정보는 https-admserv에 들어 갑니다..
만약 JDK를 잘못 연동 하였을 경우 웹 서버가 start되지 않을 수 있습니다.
따라서 JDK 연동 전에 start-jvm 파일을 백업 받아 놓으시고 만약 JDK가 연동 정보가 잘못되어 start 되지 않을 경우 백업해 놓은 start-jvm으로 rollback 시킬 수 있도록 합니다.. |
6. JSP/Servlet 설정
1. JSP실행 하기
1) JSP를 실행하기 위해서는 JDK를 설치 하여 웹 서버와 연동 하여야 합니다.
2) JDK가 제대로 연동 되었다면 JSP파일들은 Document Directory 어디에 두어도 상관없이 실행 됩니다.
2. Servlet 실행 하기
Servlet 은 웹 서버에 내장된 JRE 만으로도 실행 되므로 JDK를 설치 하지 않아도 됩니다. 단, Servlet 파일들이 존재하는 디렉토리를 Servlet 디렉토리로 등록해 주어야 합니다.
- Legacy Servlet 탭 – Configure Servlet Directory
(S1WS4.1일 경우 Servlets 탭 – Servlet 디렉토리) 에서 servlet 파일들이 존재 하는 디렉토리를 등록합니다.
7. CGI 설정
cgi파일을 실행할때 , 이 파일이 cgi파일임을 인식하는 2가지 있습니다.
1. programs 탭의 CGI Directory 에다 cgi-bin 디렉토리를 만들고 여기에 cgi 파일들을 두면 이 디렉토리 아래에 있는 모든 파일들을 cgi로 인식하여 실행하게 됩니다.
2.
1) preference 탭의 MIME types에 magnus-internal/cgi cgi,exe,bat 으로 설정되어 있는지 확인 합니다.
2) Programs 탭의 CGI File Type 의 Activate CGI as a file type? 을 yes로 설정합니다.
이렇게 하면 확장자가 .cgi나 exe , bat인 파일들은 모두 cgi로 인식하겠다는 것이므로 cgi 가 어느 디렉토리에 있든지 확장자만 제대로 되어있다면 cgi로 인식하여 실행됩니다.
그러므로 같은 디렉토리에 cgi파일과 기타 다른 파일들이 같이 있어도 됩니다.
8. PHP 설정
PHP 와 Netscape Enterprise Server 3.x / iPlanet WebServer 4.x, 6.0 연동
(Solaris 기준)
(1) php3.x와 연동하기 (WebServer 3.x와 4.x 동일)
1) 아래의 표를 참고하여 PHP와 Redirect를 모두 다운로드 합니다.
2) tar.gz로 되어있는 php의 압축을 풉니다.
(예를 들어 /usr/local/bin/php_install 에 압축을 풉니다.)
3) 압축을 푼 디렉토리에 가서 ./configure(자동) 또는 /.setup(수동)중 하나를 실행하여 환경 구성 합니다.
4) make 와 make install로 컴파일 및 설치를 합니다.
5) 설치가 끝나면 /usr/local/bin/php_/php-3.0.18에 php3.ini-dist라는 파일이 있는데 이것을 /usr/local/lib/ 디렉토리에 php.ini라는 파일의 이름으로 복사 후 php.ini를 수정하는데 아래와 같이 PHP 파일을 사용할 디렉토리(웹서버의 Document Root등)를 지정합니다.
예) doc_root=/usr/local/bin/php/examples
6) redirect.tar 압축을 풀고 Makefile을 열고 설치된 웹서버의 nsapi 경로를 아래와 같이 지정한 뒤 저장합니다.
예) INCLUDEDIR=/웹서버설치디렉토리/include (web server 3.x)
INCLUDEDIR=/웹서버설치디렉토리/plugins/include (web server 4.x)
CC_CMD=cc –DSOLARIS (컴파일러가 cc)
CC_CMD=gcc –DSOLARIS (컴파일러가 gcc)
7) make 라고 실행하면 redirect-cgi.c 파일이 redirect_cgi.so로 컴파일 되면서 현재 위치에 생성됩니다. (이때 cc 혹은 gcc 컴파일러가 없으면 안됩니다.)
8) 생성된 redirect_cgi.so를 6번에서 설정된 INCLUDEDIR의 위치에 복사합니다.
9) 이제 웹서버의 브라우저에 들어가셔서 Programs 탭 밑에 CGI File Type 에 가셔서 Activate CGI as a file type? 스위치를 on으로 설정하고 save and apply 를 합니다.
10) Server preference밑에 Mine types에 가셔서 Content-Type란에 magnus-internal/php 라고 적어 주시고 File Suffix 란에 pthml,php3 라고 적어 주십시오. ( 또는 /웹서버설치디렉토리/https-<servername>/config/mime.types 파일을 열고 수정합니다.)
11) /웹서버설치디렉토리/https-<servername>/config/obj.conf 파일을 열고 Init fn=load-types mime-types=mime.types의 아래줄에 다음과 같이 추가합니다. 이때 shlib는 redirect_cgi.so가 위치한 곳인 INCLUDEDIR을 지정합니다.
Init fn="load-modules" shlib="/INCLUDEDIR/redirect_cgi.so" funcs=
"redirect_cgi" |
12) ObjecType fn="type-by-extension" 이라는 줄 밑에 다음과 같이 edit 하십시오.
13) 웹 브라우져를 통해 Admin 서버에 들어가 웹 서버를 선택한 후 오른쪽 위에 Apply 버튼 선택 후 다시 Save&Apply하고 다시 웹 서버를 stop/start하면 php 화일이 정상적으로 수행되는지 확인하십시오.
(2) php4.x와 연동하기 (WebServer 3.x와 4.x 동일, 6.0은 아래 7번 주의)
1) 컴파일 전에 gcc를 설치하여 다음과 같이 library path를 잡아주십시오.
예) c shell일 경우 .cshrc 파일 내에 아래와 같이 2줄을 설정합니다.
setenv LD_LIBRARY_PATH /gcc/설치/디렉토리/
setenv LD_FLAGS -L/gcc/설치/디렉토리/
2) php를 down받아 tar.gz로 되어있는 php의 압축을 풉니다.
3) 컴파일하기 위해 다음과 같은 옵션을 사용합니다.
예) /opt/netscape/server4 에 web server를 install 한 경우 :
./configure --with-mysql=/usr/local/mysql --with-nsapi=/opt /netscape/server4 --enable-track-vars --enable-libgcc |
Mysql 사용시
4) make;make install을 합니다.
5) 위의 과정을 수행하면 libphp4.so 파일이 /opt/netscape/server4/bin 에 성됩니다. (위의 경로로 install 한 경우)
6) /opt/netscape/server4/httpd-<servername>/config/mime.types 파일을 열어 add하세요 type=magnus-internal/x-httpd-php exts=php
7) /opt/netscape/server4/httpd-<servername>/config/obj.conf 파일을 열어 편집합니다. (WebServer Version이 6.0일 경우는 아래의 회색 부분 “load-types”부분만 편집한다.
(/opt/netscape/server4/httpd-<servername>/config/magnus.conf)
Init f n=”load-types” mime-types=”mime.types” (다음에 추가 )
Init fn="load-modules" funcs="php4_init,php4_close,php4_execute,php4_auth_trans" (공백 없음) shlib="/usr/netscape/server4/bin/libphp4.so" Init fn=php4_init errorString="Failed to initialize PHP!" |
ObjectType fn=”force-type” type=”text/plain” (다음에 추가)
Service fn="php4_execute" type="magnus-internal/x-httpd-php" |
(맨 마지막 줄에 추가)
<Object name=”x-httpd-php”>
ObjectType fn="force-type" type="magnus-internal/x-httpd-php" Service fn="php4_execute"
</Object> |
8) 웹서버를 stop/start 후 php화일이 정상적으로 수행되는지 확인하세요.
9.인증서 설치
web server에 SSL을 설정하는 전체과정 |
1. 서버의 키 페어(공용, 전용키)를 생성합니다. (CSR 생성)
2. 인증 기관에 인증서 발급을 요청 합니다.
3. 인증 기관에서 발급받은 인증 서를 웹 서버에 설치합니다.
4. 웹 서버에 설치한 인증서를 Enable 하기 (SSL 설정) |
** 설치전 알아 둘 사항 **
서버 인증서의 종류는 글로벌서버인증서(Global Server Certificate)와 시큐어 서버인증서(Secure Server Certificate)로 나뉘어집니다.
- 글로벌서버인증서는 128bit로 SSL통신을 하기 위해서는 클라이언트 브라우저가 128bit를 지원해야 하며, 지원하지 않는 브라우저는 통신이 되지 않습니다. 단 Step-UP 기술을 지원하는 Netscape 클라이언트(Netscape Navigator 4.0이상/explore 5.5이상 )나 SGC(Server Gated Cryptography) 확장을 사용하는 클라이언트 응용프로그램을 사용해야 합니다.
- 시큐어 서버인증서는 서버와 클라이언트 모두 128비트를 지원해야 128비트 통신이 가능하며 둘 중 하나가 128bit를 지원 않는다면 브라우저 bit수에 의존적인 통신을 합니다.
- 인증서는 http://www.crosscert.com 에서 발급 받으실 수 있습니다.
1. CSR 생성 하기
우선 Browser에서 http://Servername:AdminPort로 관리 창으로 접속해서, SSL을 적용시킬 서버를 선택하고 manage버튼을 눌러 server manager화면으로 이동 합니다.
또는 SSL통신을 할 새로운 서버를 추가하여 SSL을 설정하실 수 있습니다.
(SSL통신을 하는 서버의 기본 포트는 443 포트입니다.)
1) 서버의 Key-Pair(비밀키)를 생성합니다.
Server manager화면에서 Security 탭을 선택 하시고 서버의 key-pair를 생성하기 위해 Create Database 메뉴를 선택합니다.
2) 서버에서 CSR(현재 서버의 인증에 필요한 정보를 가지는 암호화된 문서)을 생성합니다.
예)
-----BEGIN NEW CERTIFICATE REQUEST----
MIIBCTCBtAIBADBPMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHRmxvcmlkYTEYMBYGA1UEChMPRXllcyBvbiBUaGUgV2ViMRQwEgYDVQQDFAt3d3cuZXR3Lm5ldDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQCeojtjnHqg0GTxp+XZ56RaSe1iZWpumXjU6Sx7v1FdXzsY1oLOQa090Jtnu1WsQRHh0yDS+45oncjKm1zCG/IZAgMBAAGgADANBgkqhkiG9w0BAQQFAANBAFBj9g+NiUh8YWPrFGntgf4miUd/wqUshptjJy4PjdsD3ugy
5svvuh3G//PpGh2aYXIjHpJXTUBQyzxSEIINYtc=
-----END NEW CERTIFICATE REQUEST-----
위의 CSR을 복사하여 thawte나 verisign 홈페이지에서 등록신청 할 때 넣어 줍니
다.
3) 인증 기관(thawte)에 접속해서 인증 서를 발급 신청
인증기관(http://www.crosscert.com )에 접속해서 테스트 ID 혹은 실제 ID를 발급 신청할 경우 CSR을 요구합니다. 이때 앞에서 생성했던 CSR을 붙이고 다음에 관리자의 정보나 결제방식과 법인 등록번호 등을 기재해서 신청을 마치면, 신청한 E-mail로 등록 확인서와 PIN# 번호가 오며 이 번호로 등록 신청여부를 알 수 있습니다.
2. 인증기관에서 인증 서 발급 받기
www.crosscert.com에 접속하여 발급 받고자 하는 인증서를 선택합니다.
1) 인증서 신청 ( 서버 인증서 신청 단계 미리 보기 입니다. )
2) 신청하기 전에 아래의 내용을 검토하시고 다음 단계로 넘어 갑니다.
3) 인증서를 신청하기 전 도메인이 등록 되어 있는지 확인하십시오.
4) 인증서를 설치하고자 하는 서버의 CSR이 생성되어 있어야 인증서 신청이 가능 합니다. CSR을 이미 생성 하였는지 확인하는 단계입니다.
5) 서버에서 생성한 CSR을 아래의 필드에 넣습니다.
----BEGIN 부터 END ---까지 넣어야 하며, 뒤에 공백 혹은 빈 라인이 들어가지 않아야 합니다.
6) CSR에서 추출한 정보가 맞는 확인하시고, 아래의 공백에 인증서를 신청하는 곳의 정확한 정보를 입력합니다.
7) 등록이 완료되었으니 내용을 확인하시고, 발급을 원한다면 승인버튼을 누릅니다.
8) 인증서 신청이 완료 되었습니다. 인증서는 신청 후 인증서가 발급되기까지 아래의 확인 심사 작업이 진행 되므로 약 2~3일 걸릴 수 있습니다.
3. 발급 받은 인증 서를 웹 서버 설치 하기
l OK를 누르면 확인을 위해 Certificate Information이 나오고 Add Server Certificate 버튼을 누르면 등록이 됩니다.
4. Secure Socket Layer(SSL) 적용과 사용
4-1. SSL 적용
1) SSL 적용
SSL을 설정 할 서버의 server manager화면에서 preference 메뉴에서 Edit Listen Socket을 선택합니다.SSL을 설정 할 포트에 대해 security를 on으로 설정합니다. (SSL의 기본 포트는 443 포트입니다.)
443 포트에 대해 security 가 on되어 있다면 443포트 Listen socket을 사용하는 virtual Server들은 SSL 통신을 하게 됩니다.
만약 글로벌 인증 서를 설치하였을 경우 40bit혹은 56 bit의 브라우저에서도
SSL통신이 가능하도록 설정하여야 합니다.
위의 그림에서처럼 Listen Socket의 SSL을 on 하면 Attributes링크가 생깁니다. Attributes을 누르면 아래와 같은 화면이 나오고 아래 화면에서
SSL3/TLS를 눌러 40,56 bit에 대해 활성화 시켜 줍니다.
2) SSL 사용
l SSL이 적용되면 서버를 start 할 때 마다 key-pair password를 입력해야 합니다.
- 서버 시작 시 암호를 매번 암호를 적어야 하는 불편을 해결하기 위해서는 start script 에 ./$PRODUCT_BIN –d $PRODUCT_SUBDIR/config $@ 이라는 부분의 바로 뒤에 </server-설치root/alias/pass 라고 적어 주시면 전체라인이 ./$PRODUCT_BIN –d $PRODUCT_SUBDIR/config $@ <server-설치root/alias/pass 이 됩니다.
그리고 pass라는 파일을 만들어 key-pair password를 적어주면 됩니다.
- 혹은 start파일을 열어 ./$PRODUCT_BIN –d $PRODUCT_SUBDIR/config $@ 를 다음과 같이 수정 합니다.
echo “패스워드”|./$PRODUCT_BIN –d $PRODUCT_SUBDIR/config $@
l SSL 이 적용된 서버는 URL 상에서 http대신 https를 사용하여 주면 됩니다.
https://host.domain:port#
https의 default port number인 443 을 사용 할 경우 URL에 포트를 생략하여 주셔도 됩니다.
4-2. 한 개의 도메인으로 여러 개의 웹서버 사용
Verisign에는 같은 도메인 이름으로 여러 개의 웹 서버를 동시에 사용하려면 웹 서버 마다 각각의 인증서를 받을 것을 추천하고 있지만 host.domanname 이름이 같으면 하나의 인증서를 발급 하여 여러 개의 웹 서버에게 설치하여 동시에 사용할 수 있습니다.
Key-pair 설정시 server_root/alias/ 디렉토리에 https-<webservername>-hostname-key3.db라는 파일이 생성되고 인증서 설치시 server_root/alias/https-<webservername>-hostname-cert7.db라는 파일이 생성됩니다. 이 파일을 복사하여 https-<사용할 서버이름>-hostname-key3.db와 https-<사용할 서버이름>-hostname-cert7.db로 만들면 됩니다.
4-3. 인증서 삭제
브라우저의 웹 서버 관리자 창에서 인증서를 삭제하고자 하는 웹 서버 인스턴스를 선택하여 Security| Manage Certificate을 클릭합니다.
Server Name에 Server-Cert와 type에 Own이라고 되어 있는 곳에 클릭하여 Delete Certificate 버튼을 클릭합니다.
10. WebLogic 연동
1) iPlanet API 파일 복사하기
Wlserver6.0\bin 디렉터리 안의 libproxy.so(sun 기준임, hp일 경우
libproxy.sl, nt일 경우 proxy36.dll) 을 IPLANET의 PLUGINS 디렉터리에 복사
합니다.
2) magnus.conf 에 다음을 추가 합니다.
Init fn=”load-moules” funcs=”wl-proxy, wl-init” Shlib=/netscape
/plugins /SHARED_LIBRARY
Init fn=”wl-init”
예)
Init fn=”load-moules” funcs=”wl-proxy, wl-init”Shlib=/netscape/plugins
/libproxy.so
Init fn=”wl-init” |
3) obj.conf 에 다음을 추가 합니다.
<Object name="weblogic" ppath="*/weblogic/*">
Service fn=wl-proxy WebLogicHost=203.231.15.91 WebLogicPort=7001
PathTrim="/weblogic"
</Object>
<Object name="si" ppath="*/servletimages/*">
Service fn=wl-proxy WebLogicHost=203.231.15.91 WebLogicPort=7001
</Object>
<Object name=default>
NameTrans fn="NSServletNameTrans" name="servlet"
NameTrans fn="pfx2dir" from="/servlet" dir="/home/
webserver/iws60sp2/docs/servlet" name="ServletByExt"
NameTrans fn=pfx2dir from=/mc-icons dir="/home/webserver/iws60sp2/ns-icons" name="es-internal"
NameTrans fn="pfx2dir" from="/manual" dir="/home/webserver/
iws60sp2/manual/https" name="es-internal"
NameTrans fn=document-root root="$docroot"
Service method=(GET|HEAD|POST|PUT) type=text/jsp fn=wl-proxy <- 연결
WebLogicHost=203.231.15.91 WebLogicPort=7001
PathCheck fn=unix-uri-clean
PathCheck fn="check-acl" acl="default"
PathCheck fn=find-pathinfo
PathCheck fn=find-index index-names="index.html,home.html"
ObjectType fn=type-by-extension
ObjectType fn=force-type type=text/plain
Service type="magnus-internal/jsp" fn="NSServletService"
Service method=(GET|HEAD) type=magnus-internal/imagemap fn=imagemap
Service method=(GET|HEAD) type=magnus-internal/directory fn=index-
common
Service method=(GET|HEAD|POST) type=*~magnus-internal/* fn=send-file
AddLog fn=flex-log name="access"
</Object>
<Object name=cgi>
ObjectType fn=force-type type=magnus-internal/cgi
Service fn=send-cgi user="$user" group="$group" chroot="$chroot" dir="$dir" nice="$nice"
</Object>
<Object name="servlet">
ObjectType fn=force-type type=text/html
Service fn="NSServletService"
</Object>
<Object name="jsp092">
ObjectType fn="type-by-extension"
ObjectType fn="change-type" type="magnus-internal/jsp092" if-type="
magnus-internal/jsp"
Service fn="NSServletService" type="magnus-internal/jsp092"
</Object>
<Object name="ServletByExt">
ObjectType fn=force-type type=magnus-internal/servlet
Service type="magnus-internal/servlet" fn="NSServletService"
</Object>
<Object name="es-internal">
PathCheck fn="check-acl" acl="es-internal"
</Object>
**** tunnel 설정 하지 않을 경우에는 이 부분을 생략 합니다. ****
<Object name="tunnel" ppath="*/HTTPClnt*">
Service fn=wl-proxy WebLogicHost=203.231.15.91 WebLogicPort=7001
</Object> |
4) MIME type 수정 하기
IPLANET 디렉터리에서 사용하고자 하는 서버 디렉터리에 있는 config디렉터리에 있는 mime.types파일을 수정합니다.
/maguns-internal/jsp exts=jsp를 text/jsp exts=jsp로 수정한다.
magnus.conf, obj.conf, mime.types 를 수정 한 후 서버를 stop/start 합니다. iPlanet 의 jsp/servlet을 disable 시킵니다. 관리 브라우져를 열고 Server
Manager화면의 java 탭을 선택 합니다. Enable Java Globally 와 Enable Java for class defaultclass 를 disable 합니다.
11. Password 변경하기
command line에서 web server 설치 root에 있는 https-adminserv/config 디렉토리로 이동하신 다음, vi 편집기로 admpw를 여시면 아래와 같은 형태의 내용을 볼 수 있습니다.
admin:{SHA}0DPiKuNIrrVmD8IUCuw1hQxNqZc=
내용 중에 "admin:"뒤에 있는 암호화된 문자들을 지우고 server를 restart 시킨 다음 admin으로 접속할 때 password를 지정하지 않고 접속하면 됩니다.
접속 후 초기화면 상단에 있는 Preferences 탭을 누르신 다음 왼쪽 3번째 메뉴의 Superuser Access Control에 들어가시면 그 곳에서 admin password를 입력하여 Administrator Server의 password를 재설정 할 수 있습니다.
웹서버의 성능향상을 위한 튜닝 방법에 대해 제시합니다.
1. 웹서버 튜닝
웹 서버의 최적화된 성능을 위해 기본적으로 확인, setting 해야 하는 항목들입니다.
1) OS 패치
OS 패치 제대로 되어 있는지 반드시 확인 합니다.
2) OS 커널 파라메터
os의 커널 파라메터 튜닝 – os별 커널 파라메터는 http://docs.iplanet.com에서 확인 하실 수 있습니다. OS엔지니어에게 문의하셔서 적정값으로 셋팅하시기를 바랍니다.
Parameter |
Default Value |
Tuning Value |
File |
rlim_fd_max |
1024 |
8192 |
/etc/system |
rlim_fd_cur |
64 |
8192 |
sq_max_size |
2 |
0 |
tcp_time_wait_interval |
240000 |
30000 |
/etc/rc2.d/S69inet |
tcp_conn_request_max_q |
128 |
1024 |
tcp_conn_request_max_q0 |
1024 |
4096 |
tcp_ip_abort_interval |
480000 |
60000 |
tcp_keepalive_interval |
7200000 |
900000 |
tcp_rexmit_interval_initial |
3000 |
3000 |
tcp_rexmit_interval_max |
240000 |
10000 |
tcp_rexmit_interval_min |
200 |
3000 |
tcp_smallest_anon_port |
32768 |
1024 |
tcp_slow_start_initial |
1 |
2 |
tcp_xmit_hiwat |
8129 |
32768 |
tcp_recv_hiwat |
8129 |
32768 |
적용 명령어 :
#set rlim_fd_max=8192 : /etc/system
#ndd -set /dev/tcp tcp_close_wait_interval 60000 : /etc/rc2.d/S69inet
Parameter |
Default Value |
Tuning Value |
File |
maxfiles |
2048 |
4096 |
/stand/system |
maxfiles_lim |
2048 |
4096 |
tcp_time_wait_interval |
60000 |
60000 |
/etc/rc.confing.d/nddconf |
tcp_conn_req_max |
20 |
1024 |
tcp_ip_abort_interval |
600000 |
60000 |
tcp_keepalive_interval |
72000000 |
900000 |
tcp_rexmit_interval_initial |
1500 |
1500 |
tcp_rexmit_interval_max |
60000 |
60000 |
tcp_rexmit_interval_min |
500 |
500 |
tcp_xmit_hiwater_def |
32768 |
32768 |
tcp_recv_hiwater_def |
32768 |
32768 |
*nkthread |
2048 |
8192 |
/stand/system |
max_thread_proc |
1024 |
2048 |
*maxuser와 변경에 따라 반영됨
start 스크립터
#!/bin/sh
ulimit –n 1024
Parameter |
Default Value |
Tuning Value |
File |
rfc1323 |
0 |
0 |
/etc/rc.net |
sb_max |
1048576 |
1048576 |
tcp_sendspace |
16384 |
65536 |
tcp_recvspace |
16384 |
65536 |
udp_sendspace |
9216 |
65536 |
udp_recvspace |
41920 |
327680 |
Ipqmaxlen |
100 |
512 |
관련 명령어 :
#/usr/sbin/no –a : 디스플레이
#/usr/sbin/no -o rfc1323=0 : 수정
3) File 디스크립터
시스템의 filedescriptor수가 1024 이상이 되는지 확인 하십시오.
ulimit –a 하시어 확인 하실 수 있고(혹은 장비의 (ndd /dev/tcp) tcp_conn_
req_max 값을 확인) , 1024이하일 경우
- /https-서비스 서버/ 디렉토리의 start 파일내에
ulimit -n 1024로 설정합니다
- /etc/system 파일에서 설정할 수 있습니다. 이 경우 os를 reboot 해야 합
니다.
4) 웹 서버 튜닝 항목
https-인스턴스명/config/magnus.conf 내의 항목들 입니다.
n Rqthrottle
이 값은 S1WS6.0경우 default 128 , iws4.x 512로 처리 가능한 동시 request 수 입니다. 사용자가 많은 사이트 일 경우 이 값을 늘려 동시 처리 가능한 request수를 늘려 주도록 합니다.
n MaxProcs
S1WS는 one process, multi Thread 방식 입니다. 그러나 MaxProcs 로 여러 개의 프로세스를 동시에 수행하도록 구성할 수 있습니다. 이렇게 함으로써 웹 서버의 성능을 증가 시킬 수 있습니다. MaxProcs 2 라고 설정 하면 one Process 가 아니라 2개의 Process로 실행됩니다. 그러나 iPlanet 의 모든 확장프로그램들은 Single Process mode로 개발되어 Multiple Process mode를 지원하지 못합니다. 예로 Search Plug-in은 Multiple Process mode에서는 사용할 수 없고, Java application 을 수행 할 경우에는 Multiple Process mode를 사용 할 수 없습니다.
MaxProcs X : X는 process 개수를 뜻하며, 설정 할 수 있는 범위는 최대 cpu *2 입니다.
n KeepAliveTimeout
HTTP 1.0의 기본동작 방법은 세션 연결 후 자료전송이 끝나는 대로 세션을 끊도록 구성되어 있습니다. 이는 사용자가 여러 개의 정보를 전송 시에 재접속을 위한 오버헤드가 과도하게 발생하는 문제점이 있어 이를 개선하고자 KeepAlive라는 “접속유지”방법을 사용합니다. 이 방법은 세션 연결 후 파일전송이 끝나면 Timeout시간동안 세션을 유지함으로써 재 전송 시 접속을 위한 오버헤드를 감소시켜줍니다.(HTTP1.0은 옵션/HTTP1.1에서는 기본으로 동작합니다.) 이 항목은 해당 인스턴스의 Performance Tuning 메뉴의 Persistent Connection항목을 수정할 수 있으며, magnus.conf파일의 KeepAliveThreads 항목을 수정할 수도 있습니다.
KeepAliveTimeout은 Keep-Alive로 세션 연결 후 파일전송이 완료되고 얼마동안 세션을 유지 할 것인지를 나타내는 시간 값을 보여줍니다. 이 시간이 초과되면 세션연결은 해지 됩니다. 이 값은 default로 30초 입니다. 사용자가 많을 경우 이 값을 적게 잡아 주어 새로운 connection이 빨리 맺어 지도록 해 주어야 합니다. 그러나 이 값을 0으로 설정하면 Connection Less 상태가 되어 재 전송 시 접속 을 위한 오버헤드가 증가 하게 됩니다.(사용자가 많을 경우 이 값을 10초 정도로 설정 합니다.)
n 웹 서버에서 java application을 서비스 할 경우
https-인스턴스명/config/jvm12.conf 의 jvm.maxHeapSize값을 256M로 늘려 줍니다. ( 파일 내 단위는 byte 입니다.)
웹서버 운영시 자주 발생되는 항목에 대한 FAQ를 제시합니다.
[Q-1] 웹 서버가 start되지 않을 경우 |
[Answer]
1) logs 디렉토리의 user/group이 install시 입력한 user/group과 같은지 확인
하고, 접근 권한을 확인합니다.
chown –R myuser:mygroup ./logs
chmod 777 ./logs
2) logs 디렉토리 아래 pid란 파일이 있는지 확인합니다.
만약 있다면 삭제한 후 restart 합니다.
Server가 start 되면 logs 디렉토리 아래 pid란 파일이 생성 됩니다.
Server를 stop 되면 logs 디렉토리 아래 pid란 파일은 지워 지는데,이전에 server가 비정상적으로 종료 되면 pid가 지워지지 않고 남아 있을 수 있으며, 이때 start를 시키려고 하면 pid가 이미 존재하기 때문에 start가 되지 않습니다.
3) 아무런 메시지가 뜨지 않고 다음 프롬프트로 넘어갈 때
root로 서버를 start시키지 않았을 경우 (1024 포트 이하는 root 권한으로만 관리가 가능하므로) 이러한 상황이 될 수 있으므로 접속 권한을 체크해 보시기 바랍니다.
4) 서버가 start 되지 않으면서 stop 하면 not running으로 나올 때
ps –ef |grep server-root/https-myserver 로 daemon을 확인합니다.
./uxwdog 와 ns-httpd 데몬은 항상 짝으로 떠있어야 합니다.
(admin server 에 한해서 웹서버 3.6에서는 ns-admin –d 혼자 떠있는게 정상임) 그러므로, 이 때에는 ./uxwdog 데몬을 kill –9로 내리고 서버를 다시 start 하도록 합니다.
[Q-2] [https-hostname]: pclose() failed. (2: unknown early startup error)
[https-hostname]: failure: watchdog could not connect
to notification port (Connection refused) |
[Answer]
error를 수정하기위해서는 Web_server_root/https-[Server Id]/logs로 접근하여 "wdnotify" file을 삭제합니다.
이러한 파일이 생성 되는 이유는 웹서버를 start할때 /logs/wdnotify와 uxwdog 프로세스가 기동 되면서 생성되게 됩니다.
uxwdog이 안정적으로 기동되면 wdnotify가 없어지면서 /logs/pid에 uxwdog 프로세서 번호를 남기고 파일이 삭제되게 되는데, 기동이 정상적으로 되지 않을 경우 wdnotify는 /logs/wdnotify파일을 생성하게 된다. 이럴 경우 웹 서버는
이미 웹 서버가 실행중인 것으로 인식하고 기동하지 않게 됩니다.
* "uxwdog" daemon은 httpd 프로세서들이 잘 실행되는지 감시하고 시스템 장애등
의 문제로 인하여 다운된다면 httpd 프로세스를 다시 기동 시켜주는 역할을 합니
다.
[Q-3] pclose() failed. (2:unknown early startup error)
Config of server nonce cache failed(-8185) |
[Answer]
/tmp 디렉토리에 사용이 가능한 공간을 확보해야 합니다.
[Q-4] could not log PID to PidLog /ServerRoot/logs/pid (Permission denied)
혹은 daemon: “can’t log pid to <server-root>/https-myserver/logs/pid |
[Answer]
접근 권한 문제로 logs 디렉토리에 쓸 수 없을 때 발생 합니다.
Chmod 777 logs
[Q-5] info:successful server startup
failure:Terminating Service:Failure: Could not open statistics file ( Error Number is unknown)
pclose() failed. (2 unknown early startup error)
warning: statistics disabled (IIIegal access)
Netscape-Enterprise/3.6.3
Seminit failed (Illegal access)
Startup failure: could not bind to port 80 (permission denied)
Server exit: status 255 |
[Answer]
Server가 start 할 때 daemonstat.* 이라는 임시 파일을 /tmp에 생성하는데, 이때 서버가 이 파일을 만들거나, 파일 위에 쓰거나, 조작할 수 없을 때 발생할 수 있는 error입니다. /tmp 디렉토리가 full나지 않았는지, /tmp 디렉토리의 permission이 777이 아닌지 확인 하십시오. 또는, 서버가 실행 중이지 않을 때에도 /tmp 에 daemonstat.* 파일이 있는 경우는 그 파일을 지워주고 서버를 start 시키십시오.
[Q-6] info: successful server startup
info: Netscape-enterprise/3.6
failure : flex-rotate: error opening must cycle logfile server-root/https-myserver/logs/access before changing format ( No such file or directory) |
[Answer]
이 현상은 access log의 format line이 손상되었을 때 발생합니다. 해결 방법은 다음과 같습니다. access 파일을 지워주면 서버가 다시 start 할 때 access 파일을 생성하면서 정상적으로 start 됩니다.
[Q-7] ld.so.1: ns-httpd: fatal: relocation error: file
/opt/iws6/bin/https/lib/libns-httpd40.so: symbol __0dK__RT_CLASSG__vtbl:
referenced symbol not found |
[Answer]
S1WS 6.0은 설치 전 jre패치를 반드시 해야 합니다. jre패치가 제대로 되어있지 않다면 웹서버는 설치가 되나 start되지 않는 상황이 발생합니다.
[Q-8] "Too many open files" 라는 에러가 발생할 경우.. |
[Answer]
ulimit -a(csh일 경우)하여 file descriptor를 확인하고 64라면 file descriptor의 수를 늘려 줍니다.
- /etc/system 파일을 열고 rlim_fd_cur=1024 을 입력 한 후 reboot 합니다.
- 웹 서버의 start script을 열고 #!/bin.sh바로 아래 줄에 ulimit -n 1024 을 입력합니다.
[Q-9] "failure error accepting connection -5993 specified network name is no longer available" |
[Answer]
Network name is no longer available” 는 socket이 닫혔다는 NT 메시지로 이것은 unix에서 "connection reset by peer”메시지와 같습니다.
메시지는 페이지와 파일들을 다운로딩 하는 중에 STOP버튼을 눌렀을 때 혹은
클라이언트 쪽에서 connection을 drop시켰을 때 일어나는 것으로( i.e:
브라우저를 닫을 때) 이 메시지는 심각한 것이 아닙니다.
[Q-10] perl로 된 CGI scriptor를 실행시 다음과 같은 에러가 발생되는 경우
cgi-parse-output reports: the CGI program /path/foo.cgi did not produce
a valid header (program terminated without a valid CGI header; check for core dump or other abnormal termination) |
[Answer]
위 에러의 원인은 cgi script 의 결과가 만들어질 때 header line이 발생되기 전에 system() call에 의해 발생된 어떤 output 이 먼저 만들어져서 생기는 문제로 위 문제의 해결 방법은 다음과 같습니다.
script 의 가장 윗 부분에 다음과 같이 적어 주십시오.
$l=1;
이렇게 해주면 어떠한 output 이든지 즉시 메모리에서 flush 되므로 문제가 해결될 것입니다.
[Q-11] warning (11928): SimpleSessionManager: cannot create a new session as the limit on maximum number of sessions has already been reached:(1000)
failure (11928): Internal error: exception
thrown from the servlet service function (uri=/main.jsp):
java.lang.NullPointerException, Stack: java.lang.NullPointerException
at _0002fmain_0002ejspmain_jsp_0._jspService(Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
atom.netscape.server.http.servlet.NSServletRunner.Service(Compiled Code) |
[Answer]
총 세션 갯수가 시스템 디폴트 값을 초과한 경우 발생하는 문제로 single proce mode일경우 config 디렉토리 내의servlets.properties 또는 contexts.properties 화일을 아래와 같이 수정하여 session갯수를 늘려주고 time out과reapinterval은 줄여 적당한 값을 setting하면 됩니다.
default 값은 maxSessions=1000,timeOut=1800,reapinterval=600입니다.
servlets.properties file
servlets.sessionmgr=com.netscape.server.http.session.SimpleSessionManager
servlets.sessionmgr.initArgs=maxSessions=2500,timeOut=1000,reapinterval=300
contexts.properties file
context.global.sessionmgr=com.netscape.server.http.session.SimpleSessionManager
context.global.sessionmgr.initArgs=maxSessions=2500,timeOut=1000,reapinterval=300
그리고 OutofMemory와 관련해서는 config 디렉토리내의 jvm12.conf 화일에서 jvm.maxHeapSize 값을 128M 또는 256M 이상으로 setting 하면 됩니다.
[Q-11] resource Temporarily Unavailable |
[Answer]
process 가 socket 에 IO call 을 일으킬때 처리가 늦어지면 process 가 block 되면서 그런 메시지를 뿌립니다. 이메세지는 warning 이지 error는 아니고,OS 의 kernal parameter tuning을 하여 해결할 수 있습니다.
[Q-12] 웹서버 Start시 다음 메시지가 나온다.
failure ( 2726): StartThread failed to create thread
failure ( 2726): NSPR error code = -5974
failure ( 2726): NSPR error code = 11
failure ( 2726): error msg = Insufficient resources |
[Answer]
위 문제는 시스템 resource 부족 문제로서 system kernel 부분에 몇 가지를 수정하시면 이 문제는 없어 집니다. 그전에 먼저 os를 tuning 해 주시고, 마지막으로 아래의 system kernel 값을 변경하시면 됩니다.
max_thread_proc --> 2048
nkthread --> 8192 이상
(한번에 시스템에서 허용하는 커널 스레드의 최대값)
[Q-13] hp-ux에서 - Error mmap()ing....
failure (18170): file-cache-create: Error mmap()ing
file /local/suitespot/docs-advantage/index.html (Not enough space) |
[Answer]
위 문제와 관련 해결을 위해서는 웹 서버에 다음과 같은 셋팅을 해주어야 합니다.
/web-server-root/https-[ID]/config/magnus.conf 파일내에 MapFlags 2 라는
line을 추가해야 합니다.
[Q-14] exe 파일이 제대로 다운로드 되지 않을 때 |
[Answer]
MIME TYPE에서 application/octet-stream --> exe로 설정하십시오.
[Q-15] System.out.println이 로그에 남지 않는 문제 |
[Answer]
다음과 같은 방법으로 수행하면 foregroud로 수행하여 servlet output을
redirect 할 수 있습니다 .
방법1:
1) 다음과 같이 terminal에서 수행합니다.
./stop
./start –shell
2) 위를 수행하면 command의 위치가 /server_root/bin/https/bin 디렉토리로 이동합니다. 여기에서 다음 command를 입력합니다.
./ns-httpd -d /server_root/https-server_id/config 이렇게 하면 foregroud 상태가 되고 system.out과 System.err를 콘솔에 찍게 됩니다.
방법2:
Servlet / JSP 코드에 다음을 사용하여 error log에 찍을 수 있습니다.
*************************************************
ServletContext cont = this.getServletContext();
cont.log("Write this String");
*************************************************
위와 같이 삽입하면 Write this String이 error log에 찍히게 됩니다.
< NT에서 System.out.println을 찍는 방법 >
● S1WS 4.1일 경우 /server-root/https-서버명/config/obj.conf, S1WS6.0일 경우 /server-root/https-서버명/config/magnus.conf 파일에 아래의 라인을 입력합니다.
1) Init fn="nt-console-init" stderr=" stderr" stdout="stdout" EarlyInit="yes" stderr과 stdout에는 System.err.println과 System.out.print가 찍혀질 파일을 입력합니다.
예를 들어 System.err.println결과와 System.out.println을
C:/iPlanet/Servers/https-sky/logs/errors 파일에 찍도록 하기 위해서는
Init fn="nt-console-init" stderr="C:/iPlanet/Servers/https-sky/logs/errors"
stdout="C:/iPlanet/Servers/https-jhchoi/logs/errors" EarlyInit="yes"
와 같이 설정 하면 됩니다.
2) Init fn="nt-console-init" stderr=console stdout = console
EarlyInit="yes"
웹 서버를 재 실행합니다.
Nice article, concisely describes how to use logstash grok stuff. I was wondering how large your log volume is. And if you had any issues setting up elasticsearch to handle the volume. We have a stupid amount of log volume and had issues getting elasticsearch to handle it without building an elasticsearch cluster dedicated to logs.
Elasticsearch occupies a pretty large space in order to store these logs. unfortunately the most easy solution is to build a elasticsearch cluster. But also you can look at logstash processing and leaving out unnecessary logs, for example load balancer health checks etc…
can you expand your example in order to put the ssl_chiper and request_time in additional fields too?
my logformat looks like this:
‘$host $remote_addr – $remote_user [$time_local] “$request” ‘
‘$status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” “$http_x_forwarded_for” ‘
‘$ssl_cipher $request_time ‘
‘$gzip_ratio $upstream_addr $upstream_response_time’;
I am not able to catch any field after http_user_agent :/
This is my logstash filter
“%{IPORHOST:host} %{IPORHOST:clientip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:timestamp}\] \”%{WORD:verb} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}\” %{NUMBER:response} (?:%{NUMBER:bytes}|-) \”(?:%{URI:referrer}|-)\” %{QS:agent} %{QS:x_forwarded_for} %{USER:ssl_chiper} %{NUMBER:request_time} %{NUMBER:gzip_rato} %{IPORHOST:upstream} %{NUMBER:upstream_request_time}”
Based on my understanding from the above log format, the “%{USER:ssl_chiper}” has to be replaced by “%{QUOTEDSTRING:ssl_chiper}”. In case, you are still having issues, can you post a sample line from the log file for which it is failing.
How to create a custom field and fill it with dynamic data from the log message.
Sample log message given below. I want to add one field for “client IP” filled with client IP address, “Event ID” filled with event ID number in the below example “675″, “Username” filled with Username, “Service Name” filled with service name from the log.
Your help on this is highly appreciated.
Log:
MSWinEventLog 1 Security 15596139 Mon Aug 06 11:21:48 2012 675 Security SYSTEM User Failure Audit XXXXX1 Account Logon Pre-authentication failed: User Name: xxxxxxxxx User ID: %{S-1-5-21-1058243859-2292328430-792808483-12929} Service Name: krbtgt/XXX Pre-Authentication Type: 0×0 Failure Code: 0×19 Client Address: 10.X.X.X 15534664