2017년 11월 22일 수요일

Jboss EAP 7.0.0 패치 방법

데모환경

OS version: CentOS Linux Release 7.3

Jboss EAP version: Jboss EAP 7.0.0 GA

Jboss EAP Server Home: /was/jboss/jboss-eap-7.0

Patch Info: 7.0.8 patch

Browser: google chrome













Jboss version, Patch 정보 확인

Command Line Interface 사용(이하 CLI)
$ ./jboss-cli.sh --controller=127.0.0.1:9990 –connect

[standalone@192.168.56.101:9990 /] patch info  # 버전확인

Version:             7.0.0.GA

Cumulative patch ID: base    

One-off patches:     none    


[standalone@192.168.56.101:9990 /] patch --help # 명령어 옵션 확인

SYNOPSIS

    patch <action> <action_arguments>*

  where <action> can be

    apply           - apply a patch

    history         - display the patching history

    info            - information about the active patches

    rollback        - rollback a patch that has been applied

    inspect         - fetch and print key information from the patch.xml of the specified patch file 


[standalone@192.168.56.101:9990 /] patch apply /installFile/jboss-eap-7.0.8-patch.zip # 명령어 및 패치파일 적용

{

    "outcome" : "success",

    "response-headers" : {

        "operation-requires-restart" : true,

        "process-state" : "restart-required"

    }

}

[standalone@192.168.56.101:9990 /] shutdown --restart=true # 재기동으로 확실하게 적용

[standalone@192.168.56.101:9990 /] patch rollback --reset-configuration=false # 패치 되돌리기


{


    "outcome" : "success",


    "response-headers" : {


        "operation-requires-restart" : true,

        "process-state" : "restart-required"

    }

}
[standalone@192.168.56.101:9990 /] shutdown --restart=true # 재기동으로 확인


JBoss 기동시 맨 아래 버전 정보가 나온다.


01:12:20,849 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.0.0.GA (WildFly Core 2.1.2.Final-redhat-1) started in 5868ms - Started 267 of 553 services (371 services are lazy, passive or on-demand)



2017년 11월 14일 화요일

아파치 directory 접근제어 설정

아파치에 < Directory path>   </Directory> 지시어는 해당 Directory 내에 웹문서에 대해서 접근을 허용할것인지 거부할것인지에 대한 설정이 가능하다


Options: 파일과 디렉토리들에 대한 접근제어 설정
AllowOverride: 접근에 대해서 허용할것인지 거부할것인지에 대한 설정


ex)
 <Directory />
    Options FollowSymLinks
    AllowOverride All
    Require all denied
</Directory>


option에 대한 상세 정보는 httpd document를 참조
https://httpd.apache.org/docs/2.4/mod/core.html#options


AllowOverride 에 대한 상세 정보는 httpd document를 참조
https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride


설정은 되도록 document로 확인하는게 제일 정확함


.htaccess파일 설정을 통해서 특정 사용자 또는 그룹만 접근이 가능하도록 설정하고
패스워드도 지정한다.


.htaccess 설정
AuthType Basic
AuthName "Password Required"
AuthUserFile /opt/web/httpd/password
Require user testuser


Password 설정
$APACHE_HOME/bin/htpasswd -c <경로> user
(./htpasswd -c /opt/web/httpd/password testuser)
위와 같이 하면 파일이 생기고 내용을 보면 암호화가 되어 있다
cat password
testuser:$apr1$BuzGGfmi$vc2phJaZWJqgG3LDux5gQ/


AllowOverride 테스트
AllowOverride All 설정

인증이 필요하다고 나온다. (.htaccess와 password에서 설정아 id/pw를 입력하면 페이지호출가능)


AllowOverride AuthConfig 설정
All 설정과 동일하게 인증이 필요하다고 나온다 .


AllowOverride None 설정
인증없이 바로 웹페이지 호출


만약 AllowOverride All 설정하고 .htaccess 파일이 없다면....어떤지 궁금하다
.htaccess 파일명을 변경해서 아파치 재기동
AllowOverride None 설정과 동일하다
AllowOverride All 은 .htaccess  파일에 의해서 접근제어가 되는듯 하다