IBM HTTPServer rotatelogs log setting

로테이션

HTTPServer 로그 로테이션 설정


Test Environment

  • Test OS : CentOS 7.2
  • Test Version : IBM HTTPServer v8.5 (apache)

  1. 아파치 로그 설정(로테이션 설정)

    위치 : /IBM/HTTPServer/conf

    수정 : httpd.conf
# ErrorLog logs/error_log  
ErrorLog "|/IBM/HTTPServer/bin/rotatelogs /IBM/HTTPServer/logs/error_%Y%m%d.log 86400" 

# CustomLog logs/access_log common  
CustomLog "|/IBM/HTTPServer/bin/rotatelogs /IBM/HTTPServer/logs/access_%Y%m%d.log 86400" common  
  • 참고 형식 문자열

    %A (지역화된) 완전한 요일 이름

    %a (지역화된) 3-문자 요일 이름

    %B (지역화된) 완전한 달 이름

    %b (지역화된) 3-문자 달 이름

    %c (지역화된) 날짜와 시간

    %d 2-자리 일

    %H 2-자리 시간 (24 시간 시계)

    %I 2-자리 시간 (12 시간 시계)

    %j 3-자리 날짜수

    %M 2-자리 분

    %m 2-자리 달

    %p (지역화된) 12 시간 시계의 am/pm

    %S 2-자리 초

    %U 2-자리 주일수 (주의 첫번재 날은 일요일)

    %W 2-자리 주일수 (주의 첫번재 날은 월요일)

    %w 1-자리 요일수 (주의 첫번째 날은 일요일)

    %X (지역화된) 시간

    %x (지역화된) 날짜

    %Y 4-자리 연도

    %y 2-자리 연도

    %Z 시간대 이름

    %% 문자그대로 `%’



SSL setting

ssl setting

SSL Setting


  • Test OS : CentOS 7.2
  • Test Version : IBM HTTPServer v8.5, WebSphere v8.5

  1. httpd.conf 수정 부분

    위치 : F:\IBM\HTTPServer\conf

    파일 : \httpd.conf

    수정 : SSL 설정 부분의 주석 해제
### SSL Module Start ###
NameVirtualHost 211.1.1.1:80
NameVirtualHost 211.1.1.1:443

LoadModule ibm_ssl_module     modules/mod_ibm_ssl.so
Listen 443

<VirtualHost ad1.test.com:80>
#    ServerAdmin webmaster@dummy-host.example.com
     DocumentRoot "C:/IBM/HTTPServer/htdocs"
     ServerName ad1.test.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

<VirtualHost ad1.test.com:443>
     SSLEnable
     SSLClientAuth none
     DocumentRoot "C:/IBM/HTTPServer/htdocs"
     ServerName ad1.test.com
</VirtualHost>

SSLDisable
Keyfile "C:/IBM/kera.kdb"

# End of example SSL configuration

IBM HTTPServer의 경우 버전에 따라 취약한 프로토콜은 Disable 된다.

  1. ikeyman을 이용한 인증서 발급
  • 발급된 인증서가 있는 경우 해당 인증서 사용
  1. 콘솔상에서 가상호스트 추가 작업
  • 관리콘솔 접속 해당 위치의 추가된 포트 정보 등록

    위치: 가상 호스트 > default_host > 호스트 별명

    내용: 443 Port 를 기존 가상호스트 에 등록
  1. WebServer Restart

apachectl -t 옵션으로 conf내의 오류사항을 체크하고 기동




WebSphere에서 OS hostname 변경시 작업 사항

hosname이 변경될 경우 해당 Node의 serverindex.xml파일을 전부 변경 해주어야 한다.
* serverindex.xml 파일의 hostname수정
  ND의 경우 [WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes
  Base의 경우[WAS_HOME]/profiles/[App Profile]/config/cells/[Cell_Name]/nodes(Base의 경우 해당 AppSrv만 수정)
*ND의 경우에는 dmgr과 노드 연합을 이루고 있는 각각의 노드의 모든 serverindex.xml 수정
*serverindex.xml 파일의 기존 hostname 이 남아 있는 경우에는 구동하더라고 시작 안됨
*hostname 변경시 serverindex.xml 파일만 수정 해도 구동이 가능

 

shell script 이용해서 'target'(old_host_name) 을 $1 (new_host_name) 으로 변경

find ./AppServer -type f | xargs grep -l 'target' > f.txt
        for file in `cat f.txt`
        do
        cat $file | sed "s/target/$1/g" > f1.txt
        mv f1.txt $file
        done

그 중 IBM에서 소개하고 있는 여러가지 방법은 아래 link를 참고하면 많은 도움이 될듯하다.
The WebSphere Contrarian: Changing host names and migrating profiles in WebSphere Application Server
AdminTask 오브젝트에 대한 NodeConfigCommands 명령 그룹
추가적으로 fixpack v6.1.0.25 이상 update 권고...
PK83773: THE ADMINTASK.CHANGEHOSTNAME COMMAND INCORRECTLY MODIFIES THE MULTICAST ENDPOINTS IN SERVERINDEX.XML
fixpack v7.0.0.13 이상 update 권고.
PM13373: UNABLE TO GENERATE CERTS USING REGENDEFAULTCERT OPTION USING WSADMIN ADMINTASK.CHANGEHOSTNAME COMMAND
결론적인내용은다음과 같다.
위치: {Profile_Root}/{Profiles_name}/bin
# ./wsadmin.sh -conntype NONE -lang jython
wsadmin> AdminTask.changeHostName(‘[-nodeName <node_name> -hostName <new_host_name>]‘)
wsadmin> AdminConfig.save()
wsadmin> quit

ND edition은 #./syncNode.sh 로 처리하는 센스.
[출처] [WebSphere] hostname 변경하기|작성자 jaejeongk
[Node Name 변경]===================================================
Dmgr start
변경하고자 하는 해당 profile > bin 디렉토리 아래에서 renameNode.bat(sh) 실행(실행시 해당 node 아래 있는 프로세스 중지)
사용 예)[WAS_HOME]/profiles/[App Profile]/bin>renameNode.bat [dmgr hostname] [dmgr SOAP_CONNECTOR_ADDRESS port] [new_node_name] -username admin -password admin (보안 설정이 되어 있는 경우 해당 user와 password 입력)
[Cell Naem 변경]====================================================
* 셀이름 변경 - 아래 명시된 파일에서 기존 셀 이름으로 되어 있는 것을 찾아서 수정한다.
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells 아래 있는, 셀 이름으로 된 디렉토리 이름 수정
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/cell.xml
[WAS_HOME]/profiles/[Dmgr Profile]/bin/setupCmdLine.bat
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/security.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/variables.xml
    아래 두개는 웹 어드민 콘솔 관련 어플리케이션이다.
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/applications/isclite.ear/deployments/isclite/deployment.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/applications/isclite.ear/deployments/isclite/isclite.war/WEB-INF/components.xml
* 각 노드(프로파일)에 있는 위의 파일들(isclite.ear 아래 있는 것들 제외-이것은 어드민 콘솔 관련 어플리케이션이라서 다른 노드에는 없다) 수정

[dmgr Node name 변경]================================================
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes 아래 있는 디렉토리 이름 수정
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes/VicCellManager03/node.xml
[WAS_HOME]/profiles/[Dmgr Profile]/bin/setupCmdLine.bat
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/security.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/applications/isclite.ear/deployments/isclite/deployment.xml

[CoreGroup & NodeGroup name 변경]========================================
*코어 그룹과 노드 그룹은 기본적으로 DefaultCoreGroup, DefaultNodeGroup 이름으로 생성이 되는데, 사용자가 추가적으로 생성해 준 것이 있다면 이에 따른 파일들도 수정해 줘야 한다.
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/coregroups/DefaultCoreGroup/coregroup.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodegroups/DefaultNodeGroup/nodegroup.xml

[etc name 변경]======================================================
[WAS_HOME]/profiles/[Dmgr Profile]/config/templates 아래 있는 파일들 중 기존의 노드 이름이 되어 있는 파일
(이 파일들은 수정하지 않아도 운영사에 지장이 없어 보인다)
*각 노드(프로파일)에 있는 아래 내용 수정
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes  아래 있는 디렉토리 이름 수정
[WAS_HOME]/profiles/[App Profile]/config/cells/[Cell_Name]/security.xml
=================================================================

*해당 작업 수행 후 플러그인 파일 생성 후 재 배포 실시
[HTTPServer_HOME]/bin apachectl.sh restart
*windows 의 경우 해당 서비스 재 시작




















WebSphere WEB - WAS 동적, 정적 컨텐츠 구분

web,wasfile

WEB - WAS 동적 & 정적 구분


Test Environment

  • Test OS : CentOS 7.2
  • Test Version : IBM HTTPServer v8.5, WebSphere v.85

WebSphere에서 컨텐츠 구분을 위해 작업해줘야 하는 사항

사실 별다른 설정없이 Plugin에 Uri 패턴설정만 해줘도 상관은 없다.

  1. Plugin-cfg.xml 파일을 커스트마이징해서 전체 request에 대한 Uri 매핑을 만들게 되면 당연히 WebServer에서는 모든 request를 WAS로 전달
  • 위치 : F:\IBM\HTTPServer\Plugins
  • 수정 : Plugin-cfg.xml 수정 부분
   <UriGroup Name="default_host_server1_root-PCNode01_Cluster_URIs">
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsp"/> 
   </UriGroup>

해당 설정을 해주게 되면 설정된 패턴부분만 WAS로 넘기고 나머지는 WEB에서 찾게 된다.

  • httpd.conf 파일에 Alias 추가

    (/home/images에 이미지 파일이 복사돼 있어야 합니다.)

    위치 : F:\IBM\HTTPServer\conf

    추가 : Alias /images /home/images
  1. WebSphere 에서는 fileServingEnabled을 이용한 동적 & 정적 구분

WebSphere 에서는 fileServingEnabled 이라는 옵션을 해당 어플리케이션의 .ear/WEB-INF/ibm-web-ext.xmi 에 줄수 있는데 fileServingEnabled=“true” 로 하면 WAS 에서도 *.html 같은 정적 파일을 처리하고 “false” 로 하면 동적 컨텐츠만 처리하고 나머지 부분은 웹서버에서 처리하게 된다.

  • fileServingEnabled=“true” => "false"값을 변경후에는 해당 어플리케이션의 모든 파일을 수정해 주어야 한다.

위치 :

/WebSphere/AppServer/profiles/[Profile_Name]/config/cells/[Cell_Name]/applications/[Application_Name].ear/deployments/[Application_Nam]/[Application_Name].war/WEB-INF

/[Application Source Path]/[Application_Name].war/WEB-INF

수정 : ibm-web-ext.xmi

변경 : fileServingEnabled=“false”

수정 : ibm-web-ext.xml인 경우

변경 :

  • 플러그인 재 생성 후 전파(WebServer가 분리 되어 통신이 안되는 경우 해당 WebServer의 Plugin-cfg.xml 위치에 넣어 준다.)

    예)F:\IBM\HTTPServer\Plugins\config\webserver1\Plugin-cfg.xml

    변경된 Plugin-cfg.xml 파일을 확인 할수 있다.
   <UriGroup Name="default_host_server1_root-PCNode01_Cluster_URIs">
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsp"/>
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsv"/>
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsw"/>
   </UriGroup>
  • httpd.conf 파일에 Alias 추가

    (/home/images에 이미지 파일이 복사돼 있어야 합니다.)

    위치 : F:\IBM\HTTPServer\conf

    추가 : Alias /images /home/images

이렇게 두가지 방법으로 Plugin-cfg.xml 파일을 수정 후에는 해당 WebServer을 restart

  • WAS에서 모든 처리을 다할 경우 Plugin-cfg.xml의
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*"/>  



WebSphere에서 한글이 깨질 경우 확인 사항

한글설정

WebSphere에서 한글 깨질때 확인 사항



  • Test OS : CentOS 7.2
  • Test Version : WebSphere v.8.5

한글 언어 설정

언어의 경우 우선적으로 소스에 인코딩되어 있는 설정을 인식

  • JSP 소스 첫줄
<%@page language="java" contentType="text/html;charset=euckr" %>  
<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
  • HTML META
<META http-equiv="Content-Type" content="text/html;charset=euc-kr">
<META http-equiv="Content-Type" content="text/html;charset=UTF-8">
  • WebSphere JVM 옵션

    경로 : Application Server > {server name} > 서버인프라 >> 프로세스 정의 > 추가특성 >> JVM > 추가특성 >> 사용자 정의

    설정 : WebSphere Application Server의 JVM Custom property에 설정
client.encoding.override = EUC-KR
file.encoding = EUC-KR

client.encoding.override = UTF-8
file.encoding = UTF-8

Application Source에서 한글 처리가 가능 해야 함







JVM HEAPDUMP & JAVACORE 옵션 설정

JVM HEAPDUMP & JAVACORE 옵션 설정

Application servers > Application_server > Process Definition > Custom Properties 
Application servers > Server Name > Process definition > Java Virtual Machine > Custom properties

Name Value

IBM_HEAPDUMP true  &  false
IBM_HEAPDUMPDIR /apps/logs
IBM_HEAPDUMP_OUTOFMEMORY true  &  false
IBM_HEAP_DUMP true  &  false

IBM_JAVACOREDIR /apps/logs
IBM_JAVADUMP_OUTOFMEMORY true  &  false
IBM_JAVA_HEAPDUMP_TEXT true  &  false
JAVA_DUMP_OPTS ONANYSIGNAL(JAVADUMP[5],HEAPDUMP[5])


Out Of Memory Error 발생시 Dump 생성 위치 변경하기

[출처] [WebSphere] Out Of Memory Error 발생시 Dump 생성 위치 변경하기|작성자 jaejeongk
IBM JDK 를 사용하는 환경에서 Out Of Memory Error가 발생하는 경우 WebSphere Application Server는 아래 위치에 javacore와 heapdump를 생성한다.
For WebSphere Application Server V6.0, V6.1, and V7.0:
        AIX or Linux: profile_root/logs/server_name
        Windows: profile_root\logs\server_name

For WebSphere Application Server V5.1:
        AIX or Linux: install_root/logs/server_name
        Windows: install_root\logs\server_name


MustGather: Out of Memory errors with WebSphere Application Server on AIX, Linux, or Windows
filesystem 관리 등의 이유로 생성 위치를 변경하고 싶다면 아래와 같이 환경 설정에 아래와 유사하게 설정한다면 생성 위치를 변경할 수 있다.
    IBM_COREDIR
        AIX or Linux: /waslog
        Windows: D:\waslogs

    IBM_HEAPDUMPDIR
        AIX or Linux: /waslog
        Windows: D:\waslogs

    IBM_JAVACOREDIR
        AIX or Linux: /waslog
        Windows: D:\waslogs


참고 사이트
http://www.ibm.com/developerworks/aix/library/au-javaonaix_memory.html
Setting up the environment
To properly set up the environment that you'll need:
  1. Set the user process limits to unlimited by running the following command as the root user:
    chuser fsize=-1 data=-1 core=-1 user_id_running_application

    where user_id_running_application is the name of the user running the Java application. For example, chuser fsize=-1 data=-1 core=-1 stack=-1 root
    This will change the file size (fsize), core file size (core), memory size (data), and stack (stack) of the user to unlimited. Be aware that there can be risks associated when using these settings, so once information has been collected, the original settings should be re-enabled. Once the changes have been made, remove references to the ulimit command in login or user profiles, or any startup scripts. You must re-login as the user prior to starting the application. Also, any application started from the /etc/inittab file may require a system reboot, because the changes might need a chance to affect the init process. Be aware that making these changes does allow the user for which the changes were made to potentially run a process that could consume system resources.
    Verify the change by running the following command prior to starting the Java application:
    ulimit -a
  2. Separate the Java heap from the native heap. Using the information in High-level overview, determine if the Java heap is malloc'ed or mmap'ed. If the Java heap is malloc'ed, then set the following environment variables to force the Java heap to be mmap'ed. For the LDR_CNTRL=MAXDATA setting, replace N with the number of segments to be used for the native heap. A good estimation is to divide the maximum size of the Java heap by 256MB and round up to the nearest whole number, then subtract that number from 8.
    For example, if -Xmx is set to 512 MB, then the value of N would be: 8 - 512MB/256MB = 8 - 2 = 6.
    export IBM_JAVA_MMAP_JAVA_HEAP=true
    export LDR_CNTRL=MAXDATA=0xN0000000
  3. Set the Java environment variables for generating heap dumps. The following environment variables will allow the JVM to generate a list of all the objects in the Java heap. This feature is specific to the IBM JVM.
    export IBM_HEAP_DUMP=true
    export IBM_HEAPDUMP=true
    export IBM_HEAPDUMP_OUTOFMEMORY=true
    export IBM_JAVACORE_OUTOFMEMORY=true

    The dump file generated can be post-processed using the HeapRoots tool, available at no cost at IBM AlphaWorks.
    Starting with SDK 131 SR6, 141 SR2 and 142, these variables will automatically be set by the JVM, which can result in several heap dump files (heapdump##.txt) and Javacore files (javacore##.txt) being generated when the Java heap becomes exhausted. This can be disabled by setting the environment variables:
    export IBM_HEAPDUMP_OUTOFMEMORY=false
    export IBM_JAVACORE_OUTOFMEMORY=false

    Starting with Java 14, IBM has implemented a heap dump format that differs from the previously generated text based heap dumps. This new heap dump format can be identified by the phd file extensions instead of the txt file extension. So that the HeapRoots tool, available for free on IBM's AlphaWorks download site, can be used to analyze these files, it is important that the following environment variable always be set when troubleshooting java heap memory issues:
    export  IBM_JAVA_HEAPDUMP_TEXT=true
  4. Generate GC output. When starting the Java process, include the command line option:
     -verbose:gc

    prior to any command line parameters. Also, the standard error from the process needs to be redirected into a file. For example, for a standalone Java process, you would run something similar to:
     java -verbose:gc ... 2> java.err

    For some application environments, the standard error may automatically be saved to log files for that environment. Just make sure this is enabled.











manageprofiles.bat(sh) 명령

manageprofiles.bat(sh) 명령
[WAS_HOME]/AppServer/bin
app_server_root\bin\manageprofiles.bat -augment -help
-create 
프로파일을 작성합니다.
프로파일 작성에 대한 특정 정보에 대해서는 manageprofiles -create -templatePathfully_qualified_file_path_to_template -help를 지정합니다. 사용 가능한 템플리트는 다음과 같습니다.
  • management - 관리. -serverType 매개변수와 함께 사용하여 관리 프로파일 유형을 표시하십시오.
  • 기본값 - Application Server
manageprofiles.bat(sh)
-create 
-profileName Wow_Profile 
-profilePath profile_root
-templatePath app_server_root\profileTemplates\default 
-nodeName Wow_node 
-cellName Wow_cell 
-hostName lorriemb 
-portsFile \temp\ports\portdef.props 
-validatePorts
-backupProfile
프로파일 레지스트리 파일에서 프로파일 폴더 및 프로파일 메타데이터의 파일 시스템 백업을 수행합니다. 백업할 프로파일을 사용하는 모든 서버는 중지한 다음 -backupProfile 옵션을 사용하여 manageprofiles명령을 호출해야 합니다. -backupProfile 매개변수는 -backupFile-profileName 매개변수와 함께 사용해야 합니다. 예를 들면, 다음과 같습니다.
manageprofiles(.bat)(.sh) -backupProfile -profileName profile_name -backupFile backupFile_name

-backupProfile 옵션을 사용하여 프로파일을 백업하는 경우, 먼저 복원하려는 프로파일에 대하여 실행 중인 프로세스나 서버를 중지해야 합니다.

-restoreProfile 
프로파일 백업을 복원합니다. -backupFile 매개변수와 함께 사용되어야 합니다. 예를 들어, 다음과 같습니다.
manageprofiles(.bat)(.sh) -restoreProfile -backupFile file_name

프로파일을 복원하려면 다음 단계를 수행하십시오.

  1. 복원하려는 프로파일에 대하여 실행 중인 프로세스나 서버를 중지하십시오.
  2. 파일 시스템에서 프로파일에 대한 디렉토리를 수동으로 삭제하십시오.
  3. manageprofiles 명령의 -validateAndUpdateRegistry 옵션을 실행하십시오.
  4. manageprofiles 명령의 -restoreProfile 옵션을 사용하여 프로파일을 복원하십시오


-delete 
프로파일을 삭제합니다.

프로파일을 삭제하는 경우 디렉토리를 수동으로 삭제하지 않고도 프로파일을 다시 작성할 수 있도록 프로파일 디렉토리가 삭제됩니다.
프로파일 레지스트리에서 기능 보강 템플리트가 등록된 프로파일을 삭제하면 보강된 기능 해제 조치가 자동으로 수행됩니다.

-deleteAll 
모든 등록된 프로파일을 삭제합니다.

프로파일을 삭제하는 경우 프로파일을 다시 작성할 때 오래된 정보를 관리하지 않아도 되도록 프로파일 디렉토리가 삭제됩니다.
프로파일 레지스트리에서 기능 보강 템플리트가 등록된 프로파일을 삭제하면 보강된 기능 해제 조치가 자동으로 수행됩니다.

 


## Profiles 만들기(사용 예)


## Deploy Mamager profile


명령 : /IBM/WAS/AppServer/bin/manageprofiles.sh -create \
        -templatePath /IBM/WAS/AppServer/profileTemplates/dmgr \
        -profilePath /IBM/WAS/AppServer/profiles/Dmgr01 \
        -profileName Dmgr01 \
## optional
        -cellName was_Cell01 \
        -nodeName was_Manager01 \
        -hostname hostname


./manageprofiles.sh -create -profileName Dmgr01 -templatePath /IBM/WAS/AppServer/profileTemplates/dmgr -profilePath /IBM/WAS/AppServer/profiles/Dmgr01 -hostName hostname

## Application Server profile


명령 : /IBM/WAS/AppServer/bin/manageprofiles.sh -create \
        -templatePath /IBM/WAS/AppServer/profileTemplates/default \
        -profilePath /IBM/WAS/AppServer/profiles/AppSrv2 \
        -profileName AppSrv2 \
## optional
        -cellName was_Cell02 \
        -nodeName was_Node01 \
        -hostname hostname


./manageprofiles.sh -create -profileName AppSrv01 -profilePath /IBM/WAS/AppServer/profiles/AppSrv01 -templatePath /IBM/WAS/AppServer/profileTemplates/default -hostName hostname

./manageprofiles.sh -create -profileName AppSrv02 -profilePath /IBM/WAS/AppServer/profiles/AppSrv02 -templatePath /IBM/WAS/AppServer/profileTemplates/default -hostName hostname

## Profile delete command


위치: /usr/IBM/WebSphere/AppServer/bin
명령: manageprofiles.sh -delete -profilesName AppSrv1
 
참고 사이트 :
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-express-iseries&topic=rxml_manageprofiles























addNode 명령

addNode 명령
*해당 명령어는 Profile 추가 생성 후 해당 Profile을 dmgr에 연계 하기 위한 명령어 이다.
addNode dmgr_host [dmgr_port] [-profileName profilename]

[-conntype type]

[-excludesecuritydomains true | false]

[-includeapps]

[-startingport portnumber]

[-portprops qualified_filename]

[-nodeagentshortname name]

[-nodegroupname name]

[-includebuses]

[-registerservice]

[-serviceusername name]

[-servicepassword password]

[-coregroupname name]

[-noagent]

[-statusport 1231]

[-quiet]

[-nowait]

[-logfile filename]

[-replacelog]

[-trace]

[-username uid]

[-password pwd]

[-localusername localuid]

[-localpassword localpwd]

[-help]

##작업 순서
  1. addNode작업을 수행하기 위해서는 dmgrNoed가 구동 되어 있어야 한다.
  2. addNode할 해당 서버의 bin폴더로 이동
  3. ./addNod.bat(sh) [host_name] [SOAP Connector Port] 해당 명령어 실행 (addNode.sh 210.1.1.2 8879)
  4. 서버 상태 확인
  5. ./serverStatus.sh -all



pluginMerge tool 이용한 plugin Merge 방법

pluginMerge tool 이용한 plugin Merge 방법
Image(13) Image(14) Image(15) Image(16) Image(8)
install_root/bin/pluginMerge.sh plugin_configuration_file1 plugin_configuration_file2 resulting_plugin_configuration_file

Image(17)
install_root/bin/pluginCfgMerge.sh plugin_configuration_file1 plugin_configuration_file2 resulting_plugin_configuration_file

Image(18)
install_root\bin\pluginMerge.bat plugin_configuration_file1 plugin_configuration_file2 resulting_plugin_configuration_file
install_root\bin\pluginCfgMerge.bat plugin_configuration_file1 plugin_configuration_file2 resulting_plugin_configuration_file

## 작업 순서

  1. Plugin 파일을 수정 후 새로 생성 한다.

  2. Merge할 플러그인 파일을 한 디렉토리에 넣어 둔다.

  3. Plugin-cfg.xml 파일 이름 변경 (Plugin-cfg.xml –> Plugin-cfg01.xml)

  4. 예) ./pluginCfgMerge.sh /apps/wes/IBM/plugin-cfg01.xml /apps/wes/IBM/plugin-cfg02.xml /apps/wes/IBM/plugin-cfg.xml

  5. 생성한 plugin 파일을 적용한 해당 WebServer의 Plugin-cfg.xml 파일과 교체 한다.

*작업 전 plugin 파일 backup 할 것 ( Linux  #cp Plugin-cfg.xml Plugin-cfg.xml.20121126)
*plugin 파일을 수작업으로 작업할 경우 아래의 사항도 추가적으로 작업을 해주어야 한다.

웹 서버 > webserver1 > 플러그인 특성


기본 설정 값 >>
플러그인 특성11
plugin 작업 후 >>
플러그인 자동생성 전파
플러그인 구성 파일 자동 생성 >> 체크 해제
플러그인 구성 파일 자동 전파 >> 체크 해제

* 플러그인 파일 자동 생성, 전파의 옵션이 true일 경우 수동으로 설정된 부분은 저장이 안되기 때문에 해당 옵션을 false로 바꿔주어야 한다.










find 사용법

find_commands

find (파일 찾는 명령어)


Test OS : CentOS

사용법

Usage: find path-list [predicate-list]

# 검색 조건
# 파일 이름으로 찾는다.
-name filename

# access time 이 n일 이전인 파일을 찾는다.access time 이 n일 이전인 파일을 찾는다.
-atime +n

# access time이 n일 이내인 파일을 찾는다.
-atime -n

# n일 이전에 변경된 파일을 찾는다.
-mtime +n
# n일 이내에 변경된 파일을 찾는다.
-mtime -n

# 파일 권한이 nnn인 파일을 찾는다.
-perm nnn

# 파일 타입이 x인 파일들을 찾는다.
-type x

# 사이즈가 n이상인 파일들을 찾는다.
-size n

# 링크된 개수가 n인 파일들을 찾는다.
-links n

# user이름으로 찾는다.
-user username

# group 이름으로 찾는다.
-group groupname
# 처리 방법
# 찾은 파일의 절대 경로명을 화면에 출력한다.
-print

# 찾은 파일들에 대해 cmd 명령어를 실행한다.
-exec cmd {};

# 예시
# 현재 폴더 아래에 있는 파일 중에 이름에 test를 포함하는 모든 파일을 화면에 출력한다.
find . -name *test* -print

# 파일 타입이 d인 파일을 찾아 경로명을 화면에 출력한다.
find . -type d -print

#파일 권한이 700인 파일을 찾아준다.
find . -perm 700 -print

# 파일 권한이 400인 파일과 200인 파일을 찾아준다.
find . \ ( -perm 400 -o -perm 200 ) -print

# 이름이 core인 파일을 찾아서 ls -l 한다.
find . -name core -exec ls -l {} \;

# 검색어을 내용에 포함하는 파일을 찾아서 보여 줍니다.
find . -type f | xargs grep "검색어"

# * / 는 최상위 디렉터리를 뜻함. 만약 찾고자 하는 디렉터리가 있다면 그걸로 대체

# 파일 이름에 foobar 가 들어간 파일 찾기
find / -name "foobar" -print

# 특정 사용자(foobar) 소유의 파일을 찾기
find / -user foobar -print | more

#최근 하루 동안에 변경된 파일을 찾기
find / –ctime -1 -a -type f | xargs ls -l | more

# 오래된 파일(30일 이상 수정되지 않은 파일) 찾기
find / -mtime +30 -print | more

# 최근 30일안에 접근하지 않은 파일과 디렉터리를 별도의 파일로 만들기
find / ! ( -atime -30 -a ( -type d -o -type f ) ) | xargs ls -l > not_access.txt

# 하위 디렉터리로 내려가지 않고 현재 디렉터리에서만 검색하기
find . -prune ...

# 퍼미션이 777 인 파일 찾기
find / -perm 777 -print | xargs ls -l | more

# others 에게 쓰기(write) 권한이 있는 파일을 찾기
find / -perm -2 -print | xargs ls -l | more

# others 에게 쓰기(write) 권한이 있는 파일을 찾아 쓰기 권한을 없애기
find / -perm -2 -print | xargs chmod o-w 또는 # find / -perm -2 -exec chmod o-w {} ; -print | xargs ls -l | more

# 사용자이름과 그룹이름이 없는 파일 찾기
find / ( -nouser -o -nogroup ) -print | more

# 빈 파일(크기가 0 인 파일) 찾기
find / -empty -print | more 또는 # find / -size 0 -print | more

# 파일 크기가 100M 이상인 파일을 찾기
find / -size +102400k -print | xargs ls -hl

# 디렉터리만 찾기?
find . -type d ...

# root 권한으로 실행되는 파일 찾기
find / ( -user root -a -perm +4000 ) -print | xargs ls -l | more

# 다른 파일시스템은 검색하지 않기
find / -xdev ...

# 파일 이름에 공백이 들어간 파일 찾기
find / -name "* *" -print

# 숨겨진(hidden) 파일을 찾기
find / -name ".*" -print | more

# *.bak 파일을 찾아 지우기
find / -name "*.bak" -exec rm -rf {} ;

# *.bak 파일을 찾아 특정 디렉터리로 옮기기
mv `find . -name "*.bak"` /home/bak/

# 여러 개의 파일에서 특정 문자열을 바꾸기
find / -name "*.txt" -exec perl -pi -e 's/찾을 문자열/바꿀 문자열/g' {} ;

# 특정 디렉터리 하위의 모든 파일을 뒤져서 특정 문자열이 들어 있는 파일 찾기
find . | xargs grep csh   :  .은 현재 디렉터리 이므로 현재 디렉터리 하위의 모든 파일에서 csh글자를 grep



Plugin 의 key 파일 관련 이슈


For IBM HTTP Server Versions 6.0 or 6.1, issue the gsk7capicmd command to determine if the password being used on your system expires on April 26, 2012. This command is located in your [gsk_root]/bin directory.

gsk7capicmd -keydb -expiry -db "C:\temp\plugin-key.kdb" -pw WebAS

The resulting output indicates the expiration date for the password: For example, the following output indicates that the password expires on April 26, 2012 at 11:20:31 AM EDT:

Validity: Thursday, 26 April 2012 11:20:31 AM Eastern Daylight Time

Issue a gsk7 command, similar to the following command, to change the password that is expiring:

gsk7capicmd -keydb -changepw -pw xxxx -new_pw yyyy -stash -db plugin
-key.kdb 

If you want to the new password to expire after a specific number of days, add -expire to the gsk7capicmd command line and specify the number of days for which you want the new password to be valid.

Note 1: IMPORTANT: Setting the -expire parameter to 0 means that the password associated with the key database does not expire.

Note 2: GSKit versions prior to 7.0.3.17 do not recognize the -expire parameter. If you are using one of these prior GSKit versions, you must upgrade to the latest GSKit 7.0.4.x version.


Note 3: There is a behavior difference between GSKit 7.0.3.x and 7.0.4.x when using these commands. Leaving the -expire off when using GSKit 7.0.4 results in a password that never expires. Leaving the -expire off when using GSKit versions prior to 7.0.3.17 results in a password expiring in one year. Leaving the -expire off when using GSKit versions equal to and later than 7.0.3.17 results in a password that never expires.

Note 4: GSKit Versions 7.0.3.9 and earlier do not recognize the -new_pw parameter. Instead, you will be prompted for the new password and then asked to confirm the new password.


Frequently asked questions (FAQs):

Q: What happens if I do nothing?
A: You might not notice anything on April 26, 2012, but after the web server is restarted or it loads a new copy of the plugin-cfg.xml due to propagation, the web server plug-in will fail to initialize the HTTPS transports. The plug-in will rely on HTTP (non-ssl) transports to communicate to the WebSphere Application Server, and the plug-in log will contain error messages similar to the following messages:

  • ERROR: lib_security: initializeSecurity: Failed to initialize GSK environment 
    ERROR: ws_transport: transportInitializeSecurity: Failed to initialize security


Q: Can I use the same password?
A: You can not supply the existing password and tell it to change it to that same one. You must specify a new password.

Q: What if I find the password problem within my plug-in from WebSphere Application Server Version 4.0.x?
A: The plug-in from WebSphere Application Server Version 4.0 used GSKit Version 5. You can use the gsk5ikm GUI to change the password or use the gsk5cmd to alter the password. If it's more convenient, you can backup and copy the kdb file to a GSKit 7.0.4 environment and use the tools there to change the password.

Q: How do I correct the password problem if I am running on z/OS?
A: You can use the z/OS gskkyman utility. To use this utility to display the expiration date, issue a command similar to the following command:

gskkyman -dk -k plugin-key.kdb To fix the expiration date, you must complete the following steps, which includes changing the password:

  1. Navigate to the location of the plugin-key.kdb file.
  2. Enter gskkyman.
  3. From the menu provided, choose option "3 - Change database password".
  4. Prompt: "Enter key database name (press ENTER to return to menu):" (Enter plugin-key.kdb).
  5. Prompt: "Enter database password (press ENTER to return to menu):" (Enter WebAS).
  6. Prompt: "Enter new database password (press ENTER to return to menu):" (Enter your new password).
  7. Prompt: "Re-enter database password:" (Re-enter the password).
  8. Prompt: "Enter password expiration in days (press ENTER for no expiration):" (decide if you want this password to expire).

After the password is set, use the following command to stash the new password to a file for the plugin to utilize the updated kdb file.

gskkyman -s -k plugin-key.kdb 


Q: How do I correct the password problem if I am running on IBM i?
A: IBM i provides a utility called Digital Certificate Manager. This tool can be used to change the password, but it does not provide a means to view the expire value.

To view the password expiration value, copy the plugin-key.kdb file to a distributed environment, such as Microsoft Windows, and use either iKeyman or gsk7capicmd utilities previously described in this Flash.

To change the password, complete one of the following actions.

If you are running on IBM i V5R4, complete the following steps:

  1. Start the HTTP Admin server if it is not already running:

    STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN) 
  2. In the browser, enter the following:

    machine:2001 (enter credentials)
  3. Click Digital Certificate Manager.
  4. Click Select a certificate store.
  5. Select Other system certificate store, and then click Continue.
  6. Enter the path to the plugin-key.kdb file in the Certificate store path and file name: field.
  7. Click Reset password.
  8. Enter the new password, confirm the new password, and then take the default options.

    - Automatic login
    - Password does not expire
  9. Click Continue.
The operation is successful if you see the message "The password has been reset." If you are running on IBM i V6R1or V7R1, complete the following steps:
  1. Start the HTTP Admin server if it is not already running:

    STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN) 
  2. In the browser, enter the following:

    machine:2001 (enter credentials)
  3. Expand IBM i management and click Internet Configurations.
  4. Click Digital Certificate Manager.
  5. Click Select a certificate store.
  6. Select Other System Certificate Store, and then click Continue.
  7. Enter the path to the plugin-key.kdb file in the Certificate store path and file name: field.
  8. Click Reset password.
  9. Enter the new password, confirm the new password, and then take the default options:

    - Automatic login
    - Password does not expire
  10. Click Continue.
The operation is successful if you see the message "The password has been reset." 



--------------------원문 

WebSphere Plugin 의 key 파일이 4월 27일 만기된다고 합니다. 
(모든 plugin kdb 파일은 아님)

   1.만기 날짜 확인 방법
C:\IBM\HTTPServer\bin>gsk7capicmd -keydb -expiry -db "C:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.kdb" -pw WebAS

   2.패스워드 및 만기일 변경
C:\IBM\HTTPServer\bin>gsk7capicmd -keydb -changepw -db C:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.kdb -pw WebAS -new_pw WebAS1 -expire 3650 -stash

   3.변경된 만기일 확인
C:\IBM\HTTPServer\bin>gsk7capicmd -keydb -expiry -db "C:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.kdb" -pw WebAS


------------ AIX -------
root [/]#find . -name gsk7capicmd -print
./usr/bin/gsk7capicmd
./usr/opt/ibm/gskta/bin/gsk7capicmd
root [/]#cd /usr/bin

root [/usr/bin]#gsk7capicmd -keydb -expiry -db "/IBM/Plugins/config/webserver1/plugin-key.kdb" -pw WebAS
Validity:  Friday, 27 April 2012 00:20:31 AM KORST

root [/usr/bin]#gsk7capicmd -keydb -changepw -db /IBM/Plugins/config/webserver1/plugin-key.kdb -pw WebAS -new_pw WebAS1 -expire 3650 -stash

root [/usr/bin]#gsk7capicmd -keydb -expiry -db "/IBM/Plugins/config/webserver1/plugin-key.kdb" -pw WebAS1                                  
Validity:  Thursday, 21 April 2022 13:12:40 PM KORST

WebSphere profiles 삭제 및 생성

Profiles Create and Delete


Test Environment

  • Test OS : Windows 10
  • Test Version : WebSphere v8.0

manageprofiles Options

Options

   함수:
      프로파일을 작성, 표시, 변경 또는 삭제합니다.
   구문:
      manageprofiles -<mode> -<argument> <argument parameter> ...
   사용 가능한 모드는 다음과 같습니다.
      create
      augment
      delete
      unaugment
      unaugmentAll
      deleteAll
      listProfiles
      listAugments
      backupProfile
      restoreProfile
      getName
      getPath
      validateRegistry
      validateAndUpdateRegistry
      getDefaultName
      setDefaultName
      response
      help

Create command

Options

   함수:
      새 프로파일을 작성합니다.
   구문:
      manageprofiles -create -<argument> <argument parameter> ...
   인수:
      다음 명령행 인수는 이 모드의 경우 필수입니다.
         -templatePath <argument parameter>: 프로파일 템플리트의 완전한 경로 이름은 파일 시스템에 있습니다.
         -profileName <argument parameter>: 프로파일의 이름입니다.
         -profilePath <argument parameter>: 파일 시스템에서 프로파일의 예상 위치.
      다음 명령행 인수는 선택적이며 기본값이 없습니다.
         -isDefault <argument parameter>: 이 프로파일을 프로파일 매개변수를 사용하지 않는 명령의 기본 대상으로 만드십시오.
         -omitAction <argument parameter>: 선택 기능을 생략하십시오.

Dmgr
manageprofiles.bat -create -profileName Dmgr01 -templatePath C:\nd61\WebSphere\AppServer\profileTemplates\dmgr -profilePath C:\nd61\WebSphere\AppServer\profiles\Dmgr01
AppSrv
manageprofiles.bat -create -profileName AppSrv01 -templatePath C:\nd61\WebSphere\AppServer\profileTemplates\managed -profilePath C:\nd61\WebSphere\AppServer\profiles\AppSrv01

Delete command

Options

   함수:
      프로파일을 삭제합니다.
   구문:
      manageprofiles -delete -<argument> <argument parameter> ...
   인수:
      다음 명령행 인수는 이 모드의 경우 필수입니다.
         -profileName <argument parameter>: 프로파일의 이름입니다.

delete
./manageprofiles.sh -delete -profileName Dmgr01
./manageprofiles.sh -delete -profileName AppSrv01
deleteAll
./manageprofiles.sh -deleteAll

Backup or Restore command

Options

  함수:
     프로파일을 백업합니다.
  구문:
     manageprofiles -backupProfile -<argument> <argument parameter> ...
  인수:
     다음 명령행 인수는 이 모드의 경우 필수입니다.
        -profileName <argument parameter>: 프로파일의 이름입니다.
        -backupFile <argument parameter>: 출력 Zip 파일의 위치입니다.
 
   함수:
      백업 프로파일을 복원합니다.
   구문:
      manageprofiles -restoreProfile -<argument> <argument parameter> ...
   인수:
      다음 명령행 인수는 이 모드의 경우 필수입니다.
         -backupFile <argument parameter>: 출력 Zip 파일의 위치입니다.

profile backup sample
manageprofiles -backupProfile -profileName Dmgr01 -backupFile c:\20080509.zip

profile restore sample
manageprofiles -restoreProfile -profileName Dmgr01 -backupFile c:\20080616.zip

Basic account-related commands in the OS


Basic account-related commands in the OS.


Test Environment

  • Test OS : CentOS 7.2

useradd & adduser 명령어로 생성

useradd 생성

useradd test : test 계정생성 (계정 생성은 root에서 생성)

passwd 생성

passwd test : test의 암호 생성 시

New password 입력  
다시 한번 확인 Retype new password 설정  
(암호 설정 시 심플한 암호나 6자 이내 암호 설정은 안되지만, root 계정에서 강제로 생성이 가능)
[root@localhost]# adduser wasadmin
[root@localhost]# passwd wasadmin
 
Changing password for user wasadmin.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
  • su test : test 계정 접속
  • su - : 루트 계정 접속
  • passwd : 현재 UID의 password를 변경
  • cd ~ : 홈 디렉터리

user 디렉토리 지정

d : 홈 디렉터리 지정

u : 계정 고유번호 지정(사용하지 않는 계정 고유번호를 지정)

g : 그룹 고유번호 지정(그룹 고유번호는 존재하는 고유번호를 지정)

c : 설명 지정(" " 사이에 설명을 넣으면 공백을 포함시킬 수 있다.)

s : 쉘 지정

[root@localhost]# useradd -d /home/was/ test 
[root@localhost]# useradd -d /home/was/ test -u 510 -g 500 -c "was디렉토리" -s /bin/csh test
 
vi etc/passwd 
- 보통 앞의 내용 처럼 adduser, passwd를 사용하면 그 정보의 내용들이 /etc/passwd에 저장이 됩니다.
 
root  : *  : 523 :  523 : Linux User : /home/was  : /bin/bash
userName : passwd : UID : GID : userInfo : directory : shell
- ps password의 경우 암호화 되어서 보여진다.
 
UID : 사용자 명 ( -u 옵션으로 계정 고유번호 지정 가능)
GID : 그룹 명 ( -g 옵션으로 그룹 고유번호 지정 가능)
 
group
 
vi etc/group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
.
.
dip:x:40:
ftp:x:50:

chmod

  • 사용 예)
    • chmod u+x test.log
      파일의 소유자에게 실행 권을 준다. u는 소유자를 의미
    • chmod u-rwx test.log
      파일의 소유자에게 모든 권한을 해제
    • chmod g+wx test.log
      파일의 그룹소유자에게 쓰기와 실행 권한을 준다. g는 그룹을 의미
    • chmod o-r+wx test.log
      파일의 기타계정에게 읽기 권한을 빼고, 쓰기와 실행 권한
    • chmod 755 test.log
      가장 많이 사용하는 방식

      755 중 첫번째는 소유자 두번째는 그룹 세번째는 기타 사용자를 뜻한다.

chown

chown [ 옵션 ] 사용자 대상파일명

-c : 실제로 파일의 소유권이 바뀐 파일만 자세히 기술한다.

-v : 명령의 결과를 자세히 출력한다.

-R : 하위 디렉토리와 파일의 소유권까지 한 번에 변경한다.

chown -R UID:GID 폴더경로

chown 으로 해당 디렉토리의 소유자를 변경하고

chmod 로 각 디렉토리의 퍼미션을 설정하여 파일의 보안 설정을 높일수 있음.

chmod : 파일의 소유자/소유그룹/다른사용자의 파일 권한(읽기/쓰기/실행) 변경

chown : 파일의 소유자와 소유 그룹을 변경

chown [옵션(cfvR)] 소유자:소유그룹 파일명

  • 사용 예)
    • chown -R user:group /home/was -> was/ 하위 파일까지의 모든 소유자를 user / 소유그룹을 group 로 변경
    • chown user test.txt -> test.txt 파일의 소유자를 user로 변경
    • chown :group test.txt -> test.text 파일의 소유 그룹을 group 로 변경

chgrp

usermod (유저설정후 수정하는것 uid등 쉘이등 수정, 홈디렉토리)

userdel (유저삭제)

useradd (유저등록)

사용자 추가
adduser (id)

추가한 사용자에게 비밀번호 부여
passwd (id)

소유자,  그룹 , 제3자(사이트방문자)  
Owner, Group, Other  
rxw     rxw    rxw  
 
Read     4  읽기
Write    2  쓰기
Exe 실행 1  실행권한
합쳐서 7이면 모든권한이다. (소유주가4)
 
폴더 권한
-R(재귀)로 하면은 하위폴더까지 전부다 한다는것
chmod -R 754 마지막에 4를 붙여야 다른데는 접근 못함
chmod -R 755 폴더명
 
퍼미션 설정
[ugoa...][[+-=][rwxXs-tugo...]...][,...]
     1          2          3       ,로 재귀
1 : u(소유자) g(그룹) o(다른 사용자) a(모든 사용자) / 생략시 모든 사용자로 간주
2 : +(권한부여) -(권한박탈) =(원래권한)
3 : r(읽기) w(쓰기) x(실행 / 디렉토리일 경우 접근허용)
    X(다른 사용자에게 실행 권한이 있는 파일의 실행)
    s(소유자와 그룹만 실행)
    u(소유주 권한)
    g(그룹권한)
    o(다른 사용자 권한)
, 로 위의 설정 재귀 반복
 
사용 예) chmod u+w aaa.txt -> 소유자(u) 에게 쓰기권한(w) 을 더한다(+) 
읽기권한 : 4 (100)
쓰기권한 : 2 (010)
실행권한 : 1 (001)
 
읽기 + 쓰기 : 6(4 + 2)
읽기 + 실행 : 5(4 + 1) 
읽기 + 쓰기 + 실행 : 7 (4 + 2 + 1)
 
7 = 4+2+1 = r(4) + w(2) + x(1) = 일기, 쓰기, 실행이 모두 가능
6 = 4+2 = r(4) + w(2) = 읽기와 쓰기가 가능.
5 = 4+1 = r(4) + x(1) = 읽기와 실행이 가능.
4 = 4 = r(4) = 읽기만 가능.
3 = 2+1 = w(2) + x(1) = 쓰기와 실행이 가능.
2 = 2 = w(2) = 쓰기만 가능.
1 = 1 = x(1) = 실행만 가능.
0 = 0 = none = 아무 권한 없음. 파일 접근이 차단됨.
 
사용 예) ls -al
-   rw-  ---  r--    1   user  group             6    09월 10 22:01   test.txt
 
1    2    3    4     5     6     7               8           9           10
 
1 :  타입( - : 파일 / d : 디렉토리)
2 : 소유자 권한 ( 읽기/쓰기/실행)
3 : 그룹 권한 ( 읽기/쓰기/실행) 
4 : 다른사용자 권한 ( 읽기/쓰기/실행)  
5 : 링크수
6 : 소유자
7 : 그룹
8 : 파일크기
9 : 만든 날짜/시간
10 : 파일 이름
 
사용 예) chmod 777 test.txt -> 소유자 / 소유그룹 / 기타 사용자 에게 모든 퍼미션을 허용
- rwx rwx rwx    1  user  group             6 09월 10 22:01 test.txt
    2     3     4

이 블로그 검색

Popular Posts

WEB&&WAS

OS

Reviews