레이블이 aix인 게시물을 표시합니다. 모든 게시물 표시
레이블이 aix인 게시물을 표시합니다. 모든 게시물 표시

2012-10-14

Unix/AIX] ntp 설정


다른 서버와의 시간 동기화 (AIX 간)
- server : AIX
- client : AIX

1. Server 장비의 Configuration 방법 (기준시간이 되는 장비)
- /etc/ntp.conf File을 다음과 같이 수정
server 127.127.1.0 prefer
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace

- # smitty xntpd
--> Start Using the xntpd Sybsystem
--> BOTH

2. Client 장비의 Configuration 방법 (기준시간이 되는 장비의 시간에 자신의 시간을 동기화시킬 나머지 장비)
- /etc/ntp.conf File을 다음과 같이 수정
server  server_name_or_ip prefer #server_name_or_ip는 기준시간이 되는 장비의 Host Name이나 Ip-address
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace

- # smitty xntpd
--> Start Using the xntpd Sybsystem
--> BOTH

3. ntpq -p 로 확인하시면 됩니다.

위와 같은 작업을 하고 나면 약 10분 이내에 Client 장비의 시간이 Server의 시간과 동기화가 된다.
주의해야 할 사항
- Time Server의 시간을 바꾸면 전체 Client의 시간이 바뀌므로 시간 관리를 잘 해야 한다.
- Time Server의 시간을 임시로 바꾸고자 하면 xntpd daemon을 stop 시킨후 작업을 한다.
xntpd start Command : startsrc -s xntpd
xntpd stop Command : stopsrc -s xntpd
- Server의 xntpd가 start된 후 약 6분 이상이 지난후 Client에서 Time Sync가 가능해 진다.
- Server와 Client간 1000초(16분) 이상의 시간 차이가 발생하면 Time Sync가 되지 않는다.
   
time backward 안하게 하는 방법
xntpd 데몬실행시 "-x"를 준다.
startsrc -s xntpd -a "-x"



============================================================================================================

Server]

 /etc/ntp.conf  화일에서 맨 밑으로 이동



#broadcastclient                   -- 주석처리
#server 127.127.1.0 prefer       -- local 서버

server 203.254.163.74 prefer   -- 외부 서버를 기준 (timency.kriss.re한국 표준과학연구원)

driftfile /etc/ntp.drift
tracefile /etc/ntp.trace



> startsrc -s xntpd 로 기동 한다.

> smity xntpd 로 기동 할수 있다.



>ntpd -p 로 확인

외부 서버 연결 시

root@ntp:/> ntpq -p

     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*timency.kriss.r .檢 .            1 u  162 1024  377    36.56    0.795    8.58



자기 자신 참조시

root@ntp:/> ntpq -p

     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 LOCAL(0)     LOCAL(0)         4 u   59   64  377     2.20    0.104    0.03




[Client]



#broadcastclient                   -- 주석처리
server ntp_server_ip

driftfile /etc/ntp.drift
tracefile /etc/ntp.trace



> startsrc -s xntpd 로 기동 한다.

> smity xntpd 로 기동 할수 있다.



>ntpd -p 로 확인



root@client:/> ntpq -p

     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
     ntp_svr   LOCAL(0)         4 u   59   64  377     2.20    0.104    0.03





# ntpdate -d ntp_server_ip    서버의 시간과 동기화 한다.

============================================================================================================

3.     NTP 설정

? 파일경로는 OS 따라 다를 수 있습니다 -

l       주변세팅

/etc/services 에서 확인한 결로 NTP 데몬은 123 port UDP 를 사용하므로 방화벽에서 해당 port 를 열어 둡니다.



l       [T-MAIN] 세팅

/etc/ntp.conf

server          gps.bora.net  version 3  prefer

server          time.kriss.re.kr  version 3

server          127.127.1.1

fudge           127.127.1.1 stratum 9

authenticate    no



        server         gps.bora.net  version 3  prefer

gps.bora.net 이라는 서버에서 읽어 온다는 의미 입니다.

                복수개의 server 중에서 prefer 가 있는 Server 가 우선합니다.



        server          127.127.1.1

fudge           127.127.1.1 stratum 9

               로컬서버의 클럭을 서버에서 이용한다는 의미 입니다.

               로컬서버에 다른 클럭 장치가 있다면

               server 127.127.XType.0

fudge 127.127.XType.0 startum 0

의 양식에서 보듯이 XType 를 설정해 주면 됩니다.

XType 이 1 인 경우는 외부장치 없음으로 인식하여

LOCAL 클럭을 이용하는 것입니다.

       

        ntp.conf 설정이 끝나면

        /sbin/init.d/xntpd start 명령으로 데몬을 살립니다.

       

        /etc>ntpq ?p 으로 접속 상태를 확인합니다.

        remote           refid      st t when poll reach   delay   offset    disp

===============================================================================

* LOCAL(1)        LOCAL(1)         9 l   46   64  377     0.00    0.000   10.01

gps.bora.net    0.0.0.0         16 -    -   64    0     0.00    0.000 16000.0

  timency.kriss.r 0.0.0.0         16 -    -   64    0     0.00    0.000 16000.0



        위의 화면은 외부서버와 연결이 아직 이루어 지지 않았기 때문에 LOCAL 로 연결이

        된 상황을 알려주는 것이다.



l       Client 설정하기

/etc/ntp.conf

server                T-MAIN  version 3  prefer

authenticate       no

             T-MAIN 은 hosts 에서 등록을 해서 사용하거나, IP 주소를 직접입력 해도 된다.

           

ntp.conf 설정이 끝나면

        /sbin/init.d/xntpd start 명령으로 데몬을 살립니다.

       

        /etc>ntpq ?p 으로 접속 상태를 확인합니다.

  remote           refid      st t when poll reach   delay   offset    disp

==============================================================================

*T-MAIN          .LCL.            1 u   44   64  377     0.44    1.117    0.34



  위의 화면과 같이 보이면 T-MAIN 에서 시간을 가져 올 수 있다.



4.     심화 학습

- NTP 서버와 통신이 가능하다면 일회성으로 시간을 세팅할 수 있다

/etc>ntpdate T-MAIN

adjust time server 165.186.170.61 offset 0.001666 sec



아래와 같이 뜨는 경우도 있다.

the NTP socket is in use, exiting

 : xntpd 데몬이 123 port 를 사용 중이다. Xntpd 를 stop 하고 실행하면 된다.



- Broadcast/multicast 도 가능하다.

Server 에서 NTP 패킷을 Client 에게 뿌리는 방법으로 ntp.conf 에서 설정하여 사용이 가능하다.



- ntpq 칼럼 설명

remote - 원격 피어

refid - 피어가 동기화되는 호스트

st - stratum 번호

t - 유형, 즉 unicast, mulitcast, local   (- = 알 수 없음)

poll - 초 단위 폴링 간격

reach - 도달가능성 레지스터



             - 디버깅을 수행할 수 있다.

             /usr/sbin/xntpd -d &



             - NTP Xtype 리스트

             # XType 장치                 이름           해설

# -------------------------------------------------------

# 1    (없음)     LOCAL             규칙이 적용되지 않은 로컬 클럭

# 2    trak     GPS_TRAK       TRAK 8820 GPS Receiver

# 3    pst         WWV_PST        PSTI/Traconex WWV/WWVH Receiver

# 4    wwvb      WWVB_SPEC      Spectracom WWVB Receiver

# 5    goes      GPS_GOES_TRUE  TrueTime GPS/GOES Receivers

# 6    irig      IRIG_AUDIO     IRIG Audio Decoder

# 7    chu        CHU            Scratchbuilt CHU Receiver

# 8    refclock- GENERIC        Generic Reference Clock Driver

# 9    gps        GPS_MX4200     Magnavox MX4200 GPS Receiver

# 10   gps        GPS_AS2201     Austron 2201A GPS Receiver

# 11   omega    OMEGA_TRUE     TrueTime OM-DC OMEGA Receiver

# 12   tpro      IRIG_TPRO      KSI/Odetics TPRO/S IRIG Interface

# 13   leitch    ATOM_LEITCH    Leitch CSD 5300 Master Clock Controller

# 14   ees       MSF_EES        EES M201 MSF Receiver

# 15   gpstm     GPS_TRUE       TrueTime GPS/TM-TMD Receiver

# 17   datum     GPS_DATUM      Datum Precision Time System

# 18   acts      NIST_ACTS      NIST Automated Computer Time Service

# 19   heath     WWV_HEATH      Heath WWV/WWVH Receiver

# 20   nmea      GPS_NMEA       Generic NMEA GPS Receiver

# 22   pps       ATOM_PPS       PPS Clock Discipline

# 23   ptbacts   PTB_ACTS       PTB Automated Computer Time Servic

unix] ibm aix telnet 서비스포트 변경 방법


 telnet 포트를

 #vi /etc/services --> 파일에서 변경 후에

 #refresh -s inetd      를 실행하시면 서비스 적용 됩니다.

2012-09-15

IBM AIX] AIX admin 교육



출처 : http://cars114.egloos.com/6560750

 

[AIX]AIX admin 교육

AIX admin과정에 도움이 될 만한 자료입니다. [자료퍼옴]
 
 
1. SMIT AIX Admin교육
--------------------------------------------------------------------------
UNIT 1. SMIT 사용

* ODM(Object Data Manager)은 tool이 사용하는 명령어에 대한 정보와 option들과 어떻게 작용하는
가에 대한 정보를 담고있다.즉 하나의 data base라고 할 수 있다.

1.1 SMIT의 구성

▶ Menus
▶ Selector/Dialog Screen
▶ Pop-up lists
▶ Output Panel
▶ Contextual Help

1.2 SMIT 의 시작과 종료

# smit
AIXWindows환경에서는 Motif smit가, 아닌 경우 ASCII SMIT가 뜨게 된다.
AIXWindows 화면에서 ASCII SMIT를 띄울 때
# smit -C 또는 # smitty
또 한 fastpath가 가능하다.
예 ) # smit tcpip

1.3 Dialog 화면에서의 기능 키 와 Special Symbol

F1 (or ESC+1) : Help
F2 (or ESC+2) : Refresh Special Symbol
F3 (or ESC+3) : Cancel * : 필수항목
F4 (or ESC+4) : List # : numerical value required
F5 (or ESC+5) : Reset / : pathname required
F6 (or ESC+6) : Command + : pop-up List available
F7 (or ESC+7) : Edit
F8 (or ESC+8) : Image
F9 (or ESC+9) : Shell
F10 (or ESC+0) : Exit
ENTER : 실행
/text : 찾기
n : 다음 문자열 찾기 

1.4 smit.log 와 smit.script

SMIT는 SMIT를 실행하는 user의 홈디렉토리에 두 개의 파일을 생성한다.
smit.log는 방문했던 SMIT screen, AIX 명령 그리고 결과에 대한 기록을 가지고
smit.script 는 SMIT에 의해서 실행된 AIX 명령을 포함한다.
smit 이외에도 AIX는 다른 VENDOR의 PRODUCT도 SUPPORT할 수 있는 DSMIT, 그래픽
환경의
management tool인 VSM(Visual Grahphic Management)를 지원한다. 


1.5 Menus

System Management
Move cursor to desired item and press Enter.
Software Installation and Maintenance
Software License Management
Devices
System Storage Management (Physical & Logical Storage)
Security & Users
Communications Applications and Services
Print Spooling
Problem Determination
Performance & Resource Scheduling
System Environments
Processes & Subsystems
Remote Customer Support and Services
Applications
AIX System Backup & Recovery/6000
Using SMIT (information only) 

F1=Help F2=Refresh F3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 

1.6 Selector/Dialog Screen

Add a User
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
* User NAME []
User ID [] #
ADMINISTRATIVE USER? False +
Primary GROUP [] +
Group SET [] +
ADMINISTRATIVE GROUPS [] +
ROLES [] +
Another user can SU TO USER? true +
SU GROUPS [ALL] +
HOME directory []
Initial PROGRAM []

1.7 Pop-up lists
Primary GROUP
Move cursor to desired item and press Enter.
[TOP]
system
staff
bin
sys
adm
uucp
mail
security
cron
printq
1.8 Output Panel
COMMAND STATUS
Command: OK stdout: no stderr: no
Before command completion, additional instructions may appear below.
1.9 Contextual Help
CONTEXTUAL HELP
Press Enter or Cancel to return to the application.
Defines a unique decimal integer string to associate with this user
account on the system.
It is strongly recommended to let the system generate the user's ID
to incorporate all the security restrictions and conventions that may
apply to your system. To have the system generate the ID, leave this
field blank.

UNIT 2. System 시동과 정지 
2.1 시동개요

시스템의 시동은 기계에 전원을 넣고, 하드웨어를 검사하고, 운용 시스템을 적재, 실행하고 기
계의 장치를 구성하는 행위를 의미한다. 시스템을 시동하려면 다음 자원이 필요하다.
▶ 기계에 전원이 들어오거나 재설정후 적재할수 있는 시동이미지(boot image)
▶ /(root)와 /usr 파일 시스템의 접근 

독립 워크스테이션의 시동 이미지는 국지 디스크(주로 하드디스크)에서 발견되며, AIX 운용시
스템이 설치 될 때 생성된다. 시동 프로세서가 수행되는 동안, 시스템은 기계의 모든 장치를
구성하고 시스템 동작시 필요한 기본적 소프트웨어를 초기 설정한다.이 프로세스의 끝에서
AIX 파일트리가 사용 가능하며 사용되기 위해 준비되어 진다. 일반적으로 이러한 파일 시스템
은 원격으로도 적재할 수 있는 사용자 생성의 다른 파일 시스템과 함께 국지 디스크에 존재한
다.이와 같은 요청이 AIX 디스크없는 이용자에게도 똑같이 적용되며 이용자 또한 시동이미지
를 요구하고 AIX파일 트리에 접근한다. 이들은 국지적 파일 시스템이 없기 때문에 독립 시스
템과 구별되며, 모든 정보를 원격 접근 방법을 사용하여 얻는다.
AIX는 시스템 시동의 3가지 타입을 갖는다.
▶ 정상시동 : 독립기계가 정상운용으로 시작되는 프로세스
▶ 독립시동 : 특별한 업무를 위해 보수유지디스켓,OS 등으로 시작한 프로세스
▶ 네트워크 시동 : 디스크없는, 자료없는 워크스테이션이 네트웍을 통해 시작된
프 로세스
RS/6000은 크게 Classical RISC System 6000과 PCI RISC System 6000으로 나눌수 있는데
이것은 Device Architecture인 MCA와 PCI의 차이이다.
Classical RISC System 6000은 keylock을 가지고 있다. 그것은 Normal, Secure, Service인데
이 key position은 시스템을 시동할 때 영향을 준다.
Normal : 시스템이 하드디스크 로부터 부팅한다.
Secure : 시스템이 부팅하지 않는다. LED가 200을 가르킨다.
Service: 시스템이 tape, CD-ROM, hard disk, diskette등 으로 부팅하려한다.
PCI RISC System 6000은 keylock이 없고 부팅시 F1 또는 F5를 눌러서 service모드로 접근
한다. 키-인(F1, F5)이 없으면 기본적으로는 Bootlist의 순서대로 기동한다. 즉, OS가 있는 하
드를 먼저 읽고, 다음으로 tape ,CD-ROM, diskette으로 부팅하려한다. 


2.2 Classical RISC System/6000의 System Startup Process
POWER ON ⇒ BIST ⇒ POST ⇒ Load kernel ⇒ configuration ⇒ init
LED : 100-199 201-298 299 500-999 553
☞ BIST : Built-In Self Test - 하드웨어를 체크한다.
POST : Power-On Self Test - boot program을 읽어서 메모리에 적재한다.
ROS로부터 load되며 IPL(Initial Program Load)에 필요한 Device를 check한다.

2.3 PCI RISC System/6000의 System Startup Process

POWER ON

POST

Locate OS Bootstrap

Find AIX Boot Image

Load AIX Boot Image RAMDISK created

CONFIGURERATION MANAGER PHASE 1
▼ ▼
INIT LOAD INST from media
(Normal IPL) (Installation IPL)
☞ RAMDISK : RAM 에 형성되어지는 Boot file system을 말한다.

현재 System에 존재하는 Device를 결정하고 Configuration한다.
ROS : CPU와 모든 Logic을 체크한 후에 시스템은 IPL에 필요한 Boot device와 Environment를
Starting 시키는데 그 Program이 저장되어 있는 곳이 ROS(Read Only Storage)이다. ROS는 OS에
독립적이다.
PCI에서는 OCS(On-Chip Sequencer)가 없기 때문에 BIST가 필요없다. 

2.4 Initial Processes 와 inittab 파일

2.4.1 System Initialization step

Ⅰ. BIST
Ⅱ. POST
Ⅲ. Configuration Manager For Phase One  현재 시스템에 장착된 device를
configure
Ⅳ. init() - /etc/inittab 파일을 참조하여 process를 시작
- /sbin/rc.boot : Auto Varyonvg, Config PhaseⅡ
start errdaemon , mount / ,/usr, /var, /tmp
- /etc/rc : filesystem check , mount all
- /usr/sbin/srcmstr:
- /etc/rc.tcpip: tcpip daemon start
- /etc/rc.nfs : nfs daemon start
- /usr/sbin/getty /dev/console
- /usr/cron: cron daemon start
- /usr/bin/startsrc -s qdaemon: print deemon
- /usr/bin/startsrc -s writesrv : spool subsystem
- /etc/rc.* file
Ⅴ. getty()
- /etc/passwd, group, environ, motd, utmp
- /etc/security/login.cfg, passwd, group, limits, user, faildlogin
- /etc/profile, /$HOME/.profile
- /var/adm/wtmp 

2.4.2 /etc/inittab 파일의 이해 

/etc/inittab 파일은 init이 시작시킬 process를 list한다. 각각의 구성요소는 
File Format :
id:runlevel:action:command
id : 14자 까지, 프로세서를 지정
runlevel : 20자 까지, 보통 2 (AIX Multiuser)
action : 20자 까지, 어떻게 동작하는지 지정
respawn, wait, once, sysinit
command : 프로세서를 실행할 AIX Command
$ cat /etc/inittab
: Note - initdefault and sysinit should be the first and second entry.
:
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console # Powen
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:2:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console # run /etc/ft
srcmstr:2:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:2:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
rcx25:2:wait:/etc/rc.net.x25 > /dev/console 2>&1 # Load X.25 translation table
cron:2:respawn:/usr/sbin/cron
qdaemon:2:wait:/usr/bin/startsrc -s qdaemon
writesrv:2:wait:/usr/bin/startsrc -s writesrv
uprintfd:2:respawn:/usr/sbin/uprintfd
logsymp:2:once:/usr/lib/ras/logsymptom # for system dumps
ptypa:2:respawn:/usr/sbin/getty /dev/ttypa #PCIforDOS
:infod:2:once:startsrc -s infod
tty1:2:off:/usr/sbin/getty /dev/tty1
orapw:2:wait:/etc/loadext /etc/pw-syscall4.1
strload:2:wait:/usr/sbin/strload
lft:2:respawn:/usr/sbin/getty /dev/lft0
cons:0123456789:respawn:/usr/sbin/getty /dev/console
netlsd:2:wait:sh /etc/rc.netls >/dev/console 2>&1 # start netls
2.4.3 System Resource Controller (SRC)
SRC 는 subsystem을 control하는데 있어 Operator 간섭을 최소화 한다
subsystem은 어떤 기능을 수행하기위한 unit으로 design된 프로그램이나 그 집합이다.
명령 : startsrc , stopsrc, lssrc

2.5 시스템의 정지

시스템의 전원을 끌때는 적절한 Operation을 통해서 OFF해야한다. 그렇지 않으면 System의
효율을 저해하거나 file system, Data에 손상이 가해져 장애를 초래할 수 있다.
종료 절차 : $ shutdown[-option][+time message]
option -F : fast
-r : reboot
-m : manintenance mode

3.1 사용자 정보

* System을 사용하기 위한 user의 계정은 /etc/passwd 파일과 /etc/group에 해당사항이 등
록되어 있어야 한다.
# passwd file의 내용
# cat /etc/passwd
root:!:0:0::/:/bin/ksh
kdw::0:0::/:/bin/ksh
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:
guest:!:100:100::/home/guest:
nobody:!:4294967294:4294967294::/:
lpd:!:9:4294967294::/:
nuucp:*:6:5:uucp login
user:/var/spool/uucppublic:/usr/sbin/uucp/uucico
netinst:*:200:1::/home/netinst:/usr/bin/ksh
kkk:!:201:1::/home/kkk:/usr/bin/ksh
ansi:!:204:1::/home/ansi:/usr/bin/ksh
minsky:!:205:1::/home/minsky:/usr/bin/ksh
webdb2:!:300:1::/dbspace/webdb2:/usr/bin/ksh
lion1:!:206:1::/lion/lion1:/usr/bin/ksh
kshan:!:210:1::/home/kshan:/usr/bin/ksh



* 각 라인의 포맷은 colon으로 구별되며 다음을 의미한다.
FORMAT :
login-name:password:user-id:group-id:comment:home-dir:login-shell
login-name : 사용자 등록명으로 일반적으로 8자까지의 소문자
password : 사용자 암호
user-id : 0-65534를 사용, 0-10은 시스템이 사용
group-id : 0-65534를 사용, 0-10은 시스템이 사용
comment : 사용자에 대한 설명
home-dir : 사용자의 login home directory
login-shell: 사용자 login시 사용되는 shell 

* group file의 내용
# cat /etc/group
system:!:0:nuucp,root
staff:!:1:ydkong,oracle,richardr,killer,jj,kshan,lion5,lion3,lion2,lion1,webdb2t
bin:!:2:root,bin
sys:!:3:root,bin,sys
adm:!:4:bin,adm
uucp:!:5:nuucp,uucp
mail:!:6:
security:!:7:root
cron:!:8:root
printq:!:9:
audit:!:10:root
ecs:!:28:
nobody:!:4294967294:nobody,lpd
usr:!:100:guest
perf:!:20:
webdb2:!:1003:
dba:!:200:oracle
kiss:!:202:lion1
killer:!:203:killer
* 각 라인의 포맷은 colon으로 구별되며 다음을 의미한다.
FORMAT :
name:passwd:id:users
name : group의 unigue한 이름
passwd : does not used
id : group의 id
users : group의 member를 comma로 구분한다.

UNIT 3. System 사용자 관리 AIX Admin교육

3.1.1 참조파일의 이해

Read at Login
/etc/passwd
information on user's working environment

/etc/security/passwd
password and/or Restrict
Read for file access
/etc/group
group IDs and Members

/etc/security/group
group IDs and restricts
Process creation
/etc/security/limits
environmental limit for all user



Read at login
/etc/security/user
user authorization

/etc/security/login.cfg
Port available 
/Passwd Restricts

3.1.2 User Initialization Process

------+---------------------+---------------------+---------> user
| | | environment
/etc/environment /etc/profile $HOME/.profile
* /etc/profile : system-wide한 default값을 control하는 shell script
* /etc/environment : 모든 process에 대한 기본적인 환경을 specify한다.
* $HOME/.profile : user의 home directory에 있는 user자신의 profile 

3.2 SMIT를 사용한 새로운 사용자 등록

# smit
→ security & users
→ users
→ add a user
Add a User
[TOP] [Entry Fields]
* User NAME [user1]
User ID [] #
ADMINISTRATIVE USER? False +
Primary GROUP [] +
Group SET [] +
ADMINISTRATIVE GROUPS [] +
ROLES [] +
Another user can SU TO USER? true +
SU GROUPS [ALL] +
HOME directory []
Initial PROGRAM []
User INFORMATION []
EXPIRATION date (MMDDhhmmyy) [0]
Is this user ACCOUNT LOCKED? false +
User can LOGIN? true +
User can LOGIN REMOTELY? true +
Allowed LOGIN TIMES []
Number of FAILED LOGINS before [1] #
User account is locked
Login AUTHENTICATION GRAMMAR [compat]
Valid TTYs [ALL]
Days to WARN USER before password expires [0] #
Password CHECK METHODS []
Password DICTIONARY FILES []
NUMBER OF PASSWORDS before reuse [0] #
[MORE...25]
F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do

3.3 사용자의 Password 변경

#smit
→ security & users
→ users
→ Change a user's Password
또는 # passwd user-name
3.4 사용자의 특성 바꾸기
# smit → security & users
→ users
→ Change/Show Characteristics of a user
* User NAME [richard] +
Change / Show Characteristics of a User
[TOP] [Entry Fields]
* User NAME user1
User ID [213] #
ADMINISTRATIVE USER? false +
Primary GROUP [staff] +
Group SET [staff] +
ADMINISTRATIVE GROUPS [] +
ROLES [] +
Another user can SU TO USER? true +
SU GROUPS [ALL] +
HOME directory [/home/user1]
Initial PROGRAM [/usr/bin/ksh]
User INFORMATION []
EXPIRATION date (MMDDhhmmyy) [0]
Is this user ACCOUNT LOCKED? false +
User can LOGIN? True +
User can LOGIN REMOTELY? true +
Allowed LOGIN TIMES []
Number of FAILED LOGINS before [1] #
User account is locked
Login AUTHENTICATION GRAMMAR [compat]
Valid TTYs [ALL]
Days to WARN USER before password expires [0] #
Password CHECK METHODS []
Password DICTIONARY FILES []
NUMBER OF PASSWORDS before reuse [0] #
[MORE...25]

3.4 group 의 관리

3.4.1 SMIT를 이용한 group 추가

# smit
→ security & users
→ groups
Groups
Move cursor to desired item and press Enter.
List All Groups
Add a Group
Change / Show Characteristics of a Group
Remove a Group
F1=Help F2=Refresh F3=CancelEsc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
Add a Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* Group NAME [power]
ADMINISTRATIVE group? false +
Group ID [] #
USER list [] +
ADMINISTRATOR list [] +
F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do

3.4.2 SMIT를 이용한 group의 속성변경

# smit
→ security & users
→ groups
→ Change / Show Characteristics of a Group
Change Group Attributes
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Group NAME [power]
Group ID [203] #
ADMINISTRATIVE group? false +
USER list [killer] +
ADMINISTRATOR list [root] +
F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=EditEsc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do

3.4.3 SMIT를 이용한 group의 삭제

# smit
→ security & users
→ groups
→ Remove a Group
Remove a Group from the System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Group NAME [power] + 

F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do


3.5 현재 시스템 사용자 보기

* who - 현재 시스템 사용자를 보여준다.
kdcsi1:/> who
minsky pts/0 Feb 02 11:23 (203.225.28.94)
root pts/3 Feb 02 09:14 (203.225.28.173)


* finger - usr에 대한 정보를 화면에 보여준다.
kdcsi1:/> finger
Login Name TTY Idle When Site Info
Minsky ??? p0 1 Mon 11:23
Root ??? p3 Mon 09:14
*
w - 어느user가 login해서 무슨 작업을 하는지 보여준다.
kdcsi1:/> w
11:25AM up 2 days, 36 mins, 2 users, load average: 0.01, 0.02, 0.03
User tty login@ idle JCPU PCPU what
Minsky pts/0 11:23AM 2 0 0 -ksh
Root pts/3 09:14AM 0 4 0 w

3.6 ACL(Access Control Lists)

▶ ACL은 standard permission bits를 확장하고자 할 경우 사용한다
즉, 어떤 file에 user나 group별로 특정 permission을 부여하고자 할 경우 사용한다.
$ export EDITOR= /usr/bin/vi
$ aclget sample-file1
attributes:
base permissions
owner(frank): rw-
group(staff): r--
others: r--
extended permissions
disabled
▶ sample-file1의 파일허가 이해
- frank user : read, write only
- staff group의 users : read only
- other users: none
$ acledit sample-file1
attributes:
base permissions:
owner(frank): rw-
group(staff): r-
others: r--
extended permissions:
enabled
permit rw- u:dhs
permit rw- g:account
deny r-- u:chas, g:system
▶ acledit한 후의 sample-file1의 파일허가 이해
- frank user : read, write만 가능
- staff group의 users : read only
- other users: read only
- dhs user: read, write 가능
- account group의 users : read, write 가능
- system group내에 있는 chas user만 : read deny
3.7 crontab
▶ 시스템에서 주기적으로 특정한 process를 실행시키기 위하여 crontab에 등록한다.
▶ 관련 파일은 /var/spool/cron/crontabs/*에 존재한다.

3.7.1 cron process 확인

# ps -ef |grep cron
root 2598 1 0 08:55:31 - 0:00 /usr/sbin/cron
◆ 만약 cron process가 존재하지 않으면 /etc/inittab file에 등록한다.
# vi /etc/inittab
cron:2:respawn:/usr/sbin/cron# 이 부분을 edit한다.
# telinit q
3.7.2 crontab의 내용 보기
# crontab -l
.
0 11 * * * /usr/bin/errclear -d S,O 30
0 12 * * * /usr/bin/errclear -d H 90
3.7.2 crontab에 프로세스 등록하기 

◆ 매월 매주 월요일 02:00 (a.m)에 실행되는 'date'명령을 crontab에 등록하기.
# crontab -e
.
0 2 * * 1 /usr/bin/date# 이 부분 추가 

3.7.3 crontable의 필드 구분

minute hour day_of_month month weekday command
weekday : 0 (Sun) , 1 (Mon) , , , 6 (Sat)
command : full path name으로 명령어를 등록한다. 


UNIT4. Device
4.1 장치 개요

4.1.1 Device Terminology (용어)

* Physical device : Hardware를 의미한다.
* Ports : Physical device가 붙는 Physical한 connector나 adapter.
* Device Driver : device로 보내질 data의 format과 port에서의 activity를 control하는
kernel 에 있는 소프트웨어.
* Logical Device : physical device를 user와 application이 access하게하는 Software
interface(special files). Logical device에 추가된 data는 적당한 device driver로 보내지져
읽히게 된다.
* /dev directory : user에 의해 직접 access될 수 있는 Logical Device를 포함하는 directory.
* /dev directory를 list하기위한 명령
# ls -l /dev

4.1.2 장치 구성 데이터 베이스

▲ 시스템에서 제공하는 모든 장치에 대한 구성 자료를 포함
▲ 이미 정의된 데이터 베이스와 현재 변경된 모든 장치의 구성 자료에 대한 조정 된 데이터베이스로
구성
▲ 계층적 부류로 구성 

4.1.3 Device States (상태)

▲ Undefined : 시스템에 알려지지 않은 상태
▲ Defined : 장치의 특성, 정보를 시스템이 가지고 있으나 운용이 불가능한 상태
▲ Available : 장치가 사용가능한 상태 

4.1.4 장치관리 명령

# mkdev : 시스템에 새로운 장치를 정의하거나 구성을 한다.
# rmdev : 장치의 구성 해제 (Available --> Defined, Undefined)
# lsdev : 조정된 데이터베이스의 장치를 일람
# lsattr : 한 장치의 모든 속성이나 지정된 특정 속성에 대한 현재 또는 생략시 속성값 일람
# chdev : Available 또는 Defined 상태의 device 속성변경
# cfgmgr : 시스템이 작동한후 추가된 장치에 대한 self configuration



4.2 Device Addressing (장치 주소)

* Device Addressing을 표현하기 위하여 Location code가 쓰인다.
* Location code는 CPU drawer또는 system unit에 있는 adapter로부터 케이블을 통 하여
device 에 이르는 경로이다.

4.2.1 Location code format For Non-SCSI Device

AA-BB-CC-DD
AA : I/O Bus와 CPU drawer속의 bus위 Slot number
BB : I/O Bus identifier(0:MCA,PCI 1:ISA)와 Device의 slot number
CC : adapter위의 Connerctor (OP,OS,S1,S2,0D,0K,0M,0T...)
DD : Async port number 또는 FRU location

4.2.2 Location code format For SCSI Device

AA-BB-CC-S,L
AA : 보통 00
BB : I/O bus 와 bus위의 adapter card slot
CC : 00 - single SCSI bus를 제공하는 card나 dual SCSI를 위한
internal bus에 연결된 device
01 - dual SCSI 위의 external bus에 연결된 device
0S - integrated된 SCSI controller의 External bus connector
S : device의 SCSI address
L : device의 Logical unit number

4.2.3 Location code format For RCI RISC System 6000

AA-BB-CC-DD
AA : 항상 00
BB : 첫 번째 B : 0=pci, 1=isa, 2=pcmcia
두 번째 B : slot , 단 ISA adapter는 x
CC : connector designation 또는 00
DD : port number 또는 address

4.3 Self-Configuration manager

* Configuration manager (cfgmgr)는 시스템 작동 중이나 booting시에 자동으로 찾아낼 수 있는
device를 configure한다.
* Self-configurable device는 ROM chip에 unique한 identifying code를 저장한다.
* 외장형 Device의 경우 cfgmgr이 실행되기 전에 power on되어 있어야 한다.
ASCⅡ terminal, printer 등은 cfgmgr에 의해 자동으로 configure되지 않는다.


4.4 입출력의 이해

명 령은 보통 키보드(표준입력)에서 읽어, 그 명령을 처리하고, 그 결과를 화면(표준출력)에 보
여준다. 그러나 종종 파일에서 입력을 읽고, 파일에 그 출력을 쓰고, 그 오류를 파일에 쓰는
명령을 쓸 때 한 명령 또는 모든 명령을 다른 명령의 입력으로 하고자 한다. 이 모든 동작은
재지정과 파이프라인을 사용하여 수행한다. 

--------------------------------------------------------------------------

5. 주변장치 관리
5.1 Serial Device 케이블 결선도

◎ DTE (Data Terminal Equipment) : 터미널 , 프린터
RXD <-------------> TXD
TXD <-------------> RXD
GND <-------------> GND

◎ DTE (Data Terminal Equipment) : 모뎀
RXD <-------------> TXD
TXD <-------------> RXD
GND <-------------> GND

◎ 일반적인 RS-232C 케이블 구성도
NO of Pin
TXD
RXD
GND
25
2
3
7
9
3
2
7
8
3
5
4
6
1
3
5

5.2 터미널 관리

터미널 Emulator를 사용하여 pc를 terminal로 사용할 경우와 Dummy terminal (ex:
IBM3151,IBM3161,....)을 사용할 경우 케이블을 DTE로 연결한다.
가상 터미널
Vt100

Vt220
의 사 터미널
PTY

PTS

PTC
더미 터미널
Dumb


5.2.1 TERMINAL추가

# smitty -> device -> TTY
TTY
Move cursor to desired item and press Enter.
List All Defined TTYs
Add a TTY
Move a TTY to Another Port
Change / Show Characteristics of a TTY
Remove a TTY
Configure a Defined TTY
Generate Error Report
Trace a TTY

TTY
Move cursor to desired item and press Enter.
List All Defined TTYs
Add a TTY
Move a TTY to Another Port
Change / Show Characteristics of a TTY
Remove a TTY
Configure a Defined TTY
Generate Error Report
Trace a TTY
TTY Type
Move cursor to desired item and press Enter.
tty rs232 Asynchronous Terminal
tty rs422 Asynchronous Terminal

TTY
Move cursor to desired item and press Enter.
List All Defined TTYs
Add a TTY
Move a TTY to Another Port
Change / Show Characteristics of a TTY
Remove a TTY
Configure a Defined TTY
Generate Error Report
Trace a TTY
Parent Adapter
Move cursor to desired item and press Enter.
sa0 Available 00-00-S1 Standard I/O Serial Port 1
sa1 Available 00-00-S2 Standard I/O Serial Port 2
F1=Help F2=Refresh F3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
/=Find n=Find Next


Add a TTY
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
TTY type tty
TTY interface rs232
Description Asynchronous Terminal
Parent adapter sa0
* PORT number [] +
Enable LOGIN disable +
BAUD rate [9600] +
PARITY [none] +
BITS per character [8] +
Number of STOP BITS [1] +
TIME before advancing to next port setting [0] +#
TERMINAL type [dumb]
FLOW CONTROL to be used [xon] +
[MORE...29]
F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 


5.2.2 TERMINAL삭제

# smitty -> device -> TTY -> Remove a TTY
TTY
Move cursor to desired item and press Enter.
List All Defined TTYs
Add a TTY
Move a TTY to Another Port
Change / Show Characteristics of a TTY
Remove a TTY
Configure a Defined TTY
Generate Error Report
Trace a TTY
TTY
Move cursor to desired item and press Enter.
tty0 Available 00-00-S1-00 Asynchronous Terminal
tty1 Available 00-00-S2-00 Asynchronous Terminal
F1=Help F2=Refresh F3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
/=Find n=Find Next


5.2.3 TERMINAL활성화(available)

# smitty -> device -> TTY -> Configure a Defined TTY
TTY
Move cursor to desired item and press Enter.
List All Defined TTYs
Add a TTY
Move a TTY to Another Port
Change / Show Characteristics of a TTY
Remove a TTY
Configure a Defined TTY
Generate Error Report
Trace a TTY
TTY
Move cursor to desired item and press Enter.
Tty0 Available 00-00-S1-00 Asynchronous Terminal
tty1 Available 00-00-S2-00 Asynchronous Terminal
F1=Help F2=Refresh F3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
/=Find n=Find Next

5.3.1 프린터추가

# smit -> Device -> Printer/Plotter -> Print /Plotter device -> Add a Printer/Plotter

Printer/Plotter Devices
Move cursor to desired item and press Enter.
List All Defined Printers/Plotters
List All Supported Printers/Plotters
Add a Printer/Plotter
Move a Printer/Plotter to Another Port
Change / Show Characteristics of a Printer/Plotter
Remove a Printer/Plotter
Configure a Defined Printer/Plotter
Install Additional Printer/Plotter Software
Generate Error Report
Trace a Printer/Plotter

Printer/Plotter Devices
Printer/Plotter Type
Move cursor to desired item and press Enter.
hplj-4si Hewlett-Packard LaserJet 4Si
hplj-4v Hewlett-Packard LaserJet 4V
hplj-5si Hewlett-Packard LaserJet 5Si/5Si MX
hplj-5si Mopier Hewlett-Packard LaserJet 5Si Mopier
hplj-5si Mopier Hewlett-Packard LaserJet 5Si Mopier
hplj-c Hewlett-Packard LaserJet Color
opp Other parallel printer
osp Other serial printer

Printer/Plotter Devices
Printer/Plotter Interface
Move cursor to desired item and press Enter.
Parallel
rs232
rs422
F1=Help F2=Refresh F3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
/=Find n=Find Next

Printer/Plotter Devices 

Parent Adapter
Move cursor to desired item and press Enter.
Ppa0 Available 00-00-0P Standard I/O Parallel Port Adapter
F1=Help F2=Refresh F3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
/=Find n=Find Next 


UNIT 5. 주변장치 관리 AIX Admin교육
----------------------------------------------------------------------
---- 


Add a Printer/Plotter
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
Printer/Plotter type hplj-2
Printer/Plotter interface parallel
Description Hewlett-Packard LaserJ>
Parent adapter ppa0
* PORT number [p0] +
Type of PARALLEL INTERFACE [standard] +
Microseconds to delay between characters [0] +#
Printer TIME OUT period [600] +#
STATUS of device at BOOT time available +
Ignore the following attributes when using
the Print Queue:
[MORE...13]
F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 

5.3.2 Printer Queue 추가

# smit -> device -> Printer/Plotter -> Print Spooling -> Add a print queue
이후 여러개의 pop-up List가 뜨게 된다.
△ Printer Type
△ Printer Interface
△ Parents adapter 등
Print Spooling
Move cursor to desired item and press Enter.
Start a Print Job
Manage Print Jobs
List All Print Queues
Manage Print Queues
Add a Print Queue
Add an Additional Printer to an Existing Print Queue
Change / Show Print Queue Characteristics
Change / Show Printer Connection Characteristics
Remove a Print Queue
Manage Print Server
Programming Tools

Add a Print Queue
[Entry Fields]
Description LASERJET2 Printer
Printer connection characteristics
* PORT number [p] +
Type of PARALLEL INTERFACE [standard] +
Printer TIME OUT period (seconds) [60] +#
STATE to be configured at boot time available +
F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 


Unit 6. Paging Space
6.1 개요

paging space는 가상 기억 장치기법을 이용한다. 즉 process가 memory내에 존재하지 않아
도 수행이 가능한 기법이다. disk의 특정영역을 paging spase란 가상기억장치로 두고, 사용자
논리 메모리를 실재 메모리와 분리 시킴으로서 메모리의 한계를 극복하는 기법이다.
따라서 paging space는 Hard Disk에 존재하는 현재 접근하지 않는 정보에 대한 고정 디스크
영역이다. 시스템에서 사용 가능한 실재 memory영역이 적으면, 다른 작업에 사용할 실재
memory 영역을 해제 하기위하여 최근에 사용되지 않았던 프로그램이나 자료를 paging space
로 이동시킨다.
paging space는 교체공간이라고도 불리우는데 속성유형이 paging인 logical volume이다.
논리적 볼륨의 이름은 hd6, hd61, paging00, paging01 등의 이름으로 생성된다.

# lsps -a : 이 명령은 시스템내의 모든 paging space를 보여준다. 

6.1.1 paging space allocation policy의 이해
paging space의 요구량은 시스템에서 수행되는 작업의 종류에 의존한다. paging space의 양
이 너무 적으면 process가 중단될 수 있고, paging space의 양이 너무 많으면 시스템의 효율
이 떨어진다. paging space가 적은 상태가 감지되면, 추가적인 paging space가 필요하다. 

6.1.2 paging space 관리 

* paging space관리를 위한 명령어 

chps
Paging space 의 속성을 변경한다.
Lsps
Paging space의 특성을 출력한다.
Mkps
Paging space을 추가한다.
rmps
사용하지 않는 paging space를 제거한다.
swapon
Paging space를 활성화 한다.



6.2 Paging space의 추가 

# smit -> system storage management -> Logical Volume Manager -> paging space
-> Add Another Paging Space
# smit ps -> Add Another Paging Space

Add Another Paging Space
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Volume group name rootvg
SIZE of paging space (in logical partitions) [] #
PHYSICAL VOLUME name +
Start using this paging space NOW? no +
Use this paging space each time the system is no +
RESTARTED? 

F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 


6.3 Paging space의 변경 

# smit -> system storage management -> Logical Volume Manager -> paging space
-> Change / Show Characteristics of a Paging Space
# smit ps -> Change / Show Characteristics of a Paging Space

Change / Show Characteristics of a Paging Space
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Paging space name hd6
Volume group name rootvg
Physical volume name hdisk0
NUMBER of additional logical partitions [] #
Use this paging space each time the system is yes +
RESTARTED?
F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do


6.4 Paging space의 삭제 

# smit -> system storage management -> Logical Volume Manager -> paging space
-> Remove a Paging Space
# smit ps -> Remove a Paging Space

Remove a Paging Space
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
PAGING SPACE name + 

F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 


Unit 7 File System

7.1 개요

AIX 파일 시스템은 file과 directory의 계층적 구조 (파일트리)이다.
파일트리는 directory를 사용하여 자료와 프로그램을 그룹으로 구성하고 한 번에 여러 directory와 file
을 관리하도록 한다.
다음은 File System에 대한 기본적인 내용이다.
♣ 저널 파일 체계 (Journal File System)
· 데이터 베이스 저널 기술을 사용하여 구조적 일관성을 유지
· 시스템이 갑자기 중지되었을 때 파일 시스템의 손상예방
· 단일 논리적 볼륨
· 민감한 data의 제어 용이
· 특정 파일 시스템의 성능향상 기대
· 파일 시스템별 backup & restore 용이
· 보안
· 파일 시스템 생성용이 

♣ 모든 파일과 directory는 논리적 볼륨안의 파일 시스템에 속한다.
파일 시스템에 access하기 위해서는 Mounting point에 Mount(적재)되어 있어야 한다.
♣ 여러 파일 시스템이 mount되어 있을 때 하나의 파일 시스템 모양을 갖는 directory구조가 생성된
다. 하나의 루트와 함께 계층구조가 있는데, 이 구조는 AIX 파일 시스템 및 사용자가 생성한 모든
파일 시스템을 포함한다.
♣ 저널 파일 시스템의 요소
·super bolck - fs size, identification, Free list, fragment size, nbpi
·inodes - file size, ownership, permission, times, pointers to data block
·block - Data block, Indirect block 


7.2 기본적인 파일 시스템

name
Mounting point
Description
/dev/hd1
/home
user's home directory
/dev/hd2
/usr
OS command, libraries and Application programs
/dev/hd3
/tmp
Space accessible to all user for temporary files and work
space
/dev/hd4
/
It contains the files and directories critical for system
operation including the divice directory and program that
configure boot process
/dev/hd9var
/var
variable spool and log file
/dev/hd6

paging space
☞ 위의 각 저널 파일 체계는 분리되어 논리적 볼륨에 존재한다. 운용시스템이 초기화하는 동안 이들
을 적재하게 된다. 이러한 파일 시스템 조정은 파일 트리의 일부를 분리하여 작업할 수 있도록 해주
므로 백업, 재저장 및 보수유지와 같은 시스템 관리 기능에 유용하다.

7.3 파일 시스템 유형의 이해

♣ 저널 파일 시스템
AIX 의 대표적 파일 시스템의 유형이다.
♣ CD-ROM 파일 시스템
CD-ROM의 내용을 일반 파일 시스템접속 (읽기,열기,닫기)으로 접근하도록 해주는 유형
♣ NFS 파일 시스템
   원격 기계에 존재하는 파일이 마치 국지 기계에 있는 것 같이 접근하도록 해주는 유형 
♣ 파일 시스템 명령어
chfs
파일 시스템의 특성을 변경한다.
Crfs
파 일 시스템을 추가 한다.
Lsfs
파일 시스템의 특성을 화면에 표시한다.
Rmfs
파일 시스템을 삭제한다.
Mount
파 일 시스템을 사용 가능하게 적재한다.


7.4 파일 시스템 관리 작업

·논리적 볼륨상의 파일 시스템 공간할당
·파일 시스템 생성
·파일 시스템 공간을 시스템 사용자에게 사용가능하게 함
·파일 시스템 공간 사용 관리
·시스템 문제 발생시자료 손실에 대비한 파일 시스템 백업
·파일 시스템을 일관성있는 상태로 유지 

♣ 파일 시스템 작업관련 명령어

backup
파일 시스템 전체 또는 점진적 백업을 수행한다.
Dd
파 일 시스템의 백업을 위해 한 장치로부터 다른 장치로 직접 자료를 복사한다.
Df
파일 시스템에서 사용된 양과 free인 양을 보고한다.
Fsck
파일 시스템을 검사하고 불일치를 교체한다.
Mkfs
지정 논리적 볼륨상의 지정크기 파일 시스템을 생성한다.
Mount
파일 시스템을 다른 지명 구조에 적재한다.
Restore
백업으로부터 파일을 재저장한다.
Unmount
Mount와의 반대개념을 수행한다.

7.5 파일 시스템의 구성

7.5.1 root(/) filesystem

·/etc : 기계에 따라 변경되는 조작파일을 포함한다. 예: hosts , passwd 일반적으로 시스템 관리에 사
용되는 파일을 포함한다. /etc 에 존재했던 대부분의 명령은 /usr/bin directory에 연결되어 있다.
호환을 위해서 일부 실행 파일은 새로운 위치와 기호적 연결 (symbolic link)
·/bin : /usr/bin의 기호적 연결
·/sbin : 기계를 시동하고 /usr파일 시스템을 적재하기 위하여 필요한 파일
·/dev : 국지 장치 특수 파일의 노드를 포함한다.
·/export: 원격 사용자를 위한 서버상의 directory 및 파일을 포함한다.
·/lib : 라이브러리 함수를 포함한다.
·/tftpboot : 네트웍 부팅시 필요한 tftp directory

7.5.2 /var filesystem

·/var: 변수나 spool에 관련된 directory및 파일을 포함한다. 

7.5.3 /tmp filesystem

·/tmp: 시스템이 생성한 임시 파일을 포함하는 파일 시스템의 적재지점이다.

7.5.4 /usr filesystem
· /usr: 기계가 바뀌어도 변하지 않으며 공유할 수 있는 실행 파일을 포함한다.
OS,Xwindow및 주요 시스템 프로그램(LPP)등이 설치된 directory이다.

7.5.5 /home filesystem

· /home : 사용자의 home directory를 포함하는 파일 시스템이다.
· /u : /home directory의 기호적인 연결이다.

7.6 File system의 추가

#smit -> system storage management -> file systems
-> add/change./show/delete file systems
-> Journaled file systems -> Add a Journaled file system
-> Add a Standard Journaled file system


# smit jfs -> Add a Journaled file system

Add a Standard Journaled File System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Volume group name rootvg
* SIZE of file system (in 512-byte blocks) [ 100000 ] #
* MOUNT POINT [ /sample ]
Mount AUTOMATICALLY at system restart? no +
PERMISSIONS read/write +
Mount OPTIONS [] +
Start Disk Accounting? no +
Fragment Size (bytes) 4096 +
Number of bytes per inode 4096 +
Allocation Group Size (MBytes) 8 + 

F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do

7.7 File system의 적재 ( mount )

# smit -> system storage management -> file systems -> Mount a file system
# mount /sample
Mount a File System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
FILE SYSTEM name [/sample] +
DIRECTORY over which to mount [] +
TYPE of file system +
FORCE the mount? no +
REMOTE NODE containing the file system []
to mount
Mount as a REMOVABLE file system? no +
Mount as a READ-ONLY system? no +
Disallow DEVICE access via this mount? no +
Disallow execution of SUID and sgid programs no +
in this file system?




7.8 File system의 적재해제 ( umount )

# smit -> system storage management -> file systems -> unmount a File system
# umount /sample
Unmount a File System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Unmount ALL mounted file systems? no +
(except /, /tmp, /usr)
-OR-
Unmount all REMOTELY mounted file systems? no +
NAME of file system to unmount [/sample] +
REMOTE NODE containing the file system(s) []
to unmount

7.9 File system의 삭제

# smit -> system storage management -> file systems -> add/change./show/delete file systems -
> Journaled file systems -> Remove a Journaled file system
# smit rmfs
# rmfs /sample
Remove a Journaled File System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* FILE SYSTEM name /sample +
Remove Mount Point no +
F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
FILE SYSTEM name
Move cursor to desired item and press Enter.
/
/usr
/tmp
/var
/home
/sample



Unit 8. Logical Volume manager

8.1 개요

Logical Volume Manager는 Logical volume의 크기를 여러 Physical volume으로 확장하여 고
정된 Physical volume에서 Disk를 융통성있는 시스템으로 만들어 준다. 몇 개의 Physical
Volume은 Volume Group으로 함께 Volume지어지며 각 Volume group은 Logical volume을
포함하지 않거나 하나 이상의 Logical volume을 포함한다.
Logical volume은 Physical volume에 위치한 정보의 Volume이다. Logical volume의 자료는
사용자에게 연속적으로 보이지만, Physical Volume에서는 비연속적이 될 수 있다.
시스템 설치후에, 시스템은 시스템을 시동하는데 필요한 Logical volume의 기준집합을 구성하
는 root 볼륨Volume과 User가 정의하는 다른 볼륨Volume을 갖고 있다. 마찬가지로, 시스템
에 연결된 다른 Physical Volume을 Volume group에 추가할 수 있으며, rootvg와 다른 볼륨
에서도 Physical Volume group을 추가할 수 있다. Logical volume은 주로 메뉴 방식의 SMIT
를 이용한여 관리한다.
Logical Volume의 잇점
△ Logical Volume은 비연속적인 공간이다.
△ Logical Volume은 여러개의 disk를 걸칠수 있다.
△ Logical Volume size 를 쉽게 변환할 수 있다.
△ mirroring이 가능하다.
△ 시스템에 hard disk를 쉽게 붙일 수 있다.
△ Logical Volume은 relocate 될 수 있다.

8.2 Volume Group의 이해 

하나의 volume group은 시스템내에서 15자 이내의 유일한 이름을 가지며 다양한 크기와 유
형을 갖는 1-32개의 physical Volume으로 구성된다. 각 AIX 시스템은 1-225개의 Volume
group을 갖는다. 각 Physical Volume 은 여러개의 Physical partion으로 구성되며 한 logical
Volume에 대한 Physical Partition은 하나의 Volumegroup에만 속해야한다. 한 Volumegroup
은 변경, 확장, 축소, 생성, 열람, 반출(제거), 반입(설치), 재구성 할 수 있다. 시스템 설치 후,
시스템은 시스템을 시동하는데 필요한 logical Volume의 기준 집합을 구성하는 하나의
Volume과 설치각본에서 지정하는 다른 Volumegroup으로 구성된다. 또한 Volume group이나
이미 생성쇤 다른 Volume group에 추가할 수 있다.
소형시스템은 시스템에 부착된 모든 Physical Volume을 포함하기 위하여 하나의 Volume
group이면 충분하지만, 대형 시스템은 추가적인 Volume group이 필요하다. 예를 들어, 하나
이상의 시스템에 실제로 부착된 디스크 Volume은 어느 시스템에서는 logical이으로 재구성할
수 있다. 또한 사용자는 보안이나 유지보수 이유로 디스크 Volume을 분할하는 Volume group
을 생성할 수도 있다.

8.3 Varyonvg 및 Varyoffvg Process

varyonvg와 varyoffvg 명령은 시스템에서 이미 알려진 Volume group을 활성화하거나 비활성
화 한다. Volume group을 access하기 위해서는 varyonvg가 되어야 한다. varyonvg(활성화)
하는 동안에 Volume group 지정자 영역(VGDA)과 logical Volume Manager 프로그램은
Volume group에 정의된 Physical Volume에서 관리자료(PVID)를 읽는다. Volume group 상태
영역을 포함하는 관리자료(PVID)는 사용도를 증가 시키기 위하여 Volume group내의 모든
Physical Volume에 저장되어 있다.

8.4 Physical Volume 의 이해

Physical Volume은 영구적으로 시스템 범위의 유일한 식별자가 배정된 컴퓨터에 Physical로
부착된 읽기/쓰기 디스크이다. 이것은 extendvg 명령을 사용하여 Volume group에 추가할 수
있고, reducevg 명령을 사용하여 Volume group에서 제거 할 수 있다. Volume group에 추가
될 때, Physical Volume은 Physical Partition이라는 연속적이고, 같은 크기의 영역(Physical
Partition) 으로 분할된다.
Physical disk는 디스크가 시스템 시동시에 첫 번째로 검출되나 시스템 관리명령이 시스템에
디 스크를 추가하기 위해 실행시간에 사용될 때 이름 (예 : hdisk#)이 배정된다.

8.5 Physical Partition ( Physical Partition )의 이해

logical Volume manager는 Physical Partition을 디스크 영역 할당의 가장 작은 단위로 취급한
다. Physical Partition은 특정 Physical Volume상에서 같은 크기를 갖는 디스크 영역의 세그먼
트이다.
Physical Partition의 크기는 Physical Volume이 Volume group에 추가될 때 결정되며
Physical Volume은 Volume group의 Physical Partition 크기를 따른다. Partition크기를 작게
만드 는 것이 Disk 가용성을 증가 시킬 수는 있지만, 정보를 관리하고 저장하는데 더 많은 시스
템 처리시간을 필요로 한다.

8.6 Logical Volume 의 이해

logical Volume은 Physical Partition으로 구성되는 logical Partition의 집합이며, 하나의
Volume group에 포함된다. 각 Physical Volume내에는 Physical Partition이 존재하고
Physical Partition은 Logical Partition에 의해 조직화되며, logical Volume을 형성한다. logical
Volume은 확장 가능하며 Volume group 내에서 여러개의 Physical Volume에 걸쳐 있을 수
있다.
8.7 Logical Partition 의 이해
logical Volume의 크기는 logical Partition수에 따라 결정된다. logical Partition은 1-3까지의
Physical Partition으로 이루어진다. logical Volume 내에서의 logical Partition 갯수는 유동적이
며 logical Volume이 생성될 때 결정된다. 


8.8 LVM ( Logical Volumn Manager )의 예

# smit
-> system storage management
# smit lvm

System Storage Management (Physical & Logical Storage)
Move cursor to desired item and press Enter.
Logical Volume Manager
File Systems
Files & Directories
Removable Disk Management
System Backup Manager


Logical Volume Manager
Move cursor to desired item and press Enter.
Volume Groups
Logical Volumes
Physical Volumes
Paging Space 

F1=Help F2=Refresh F3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do

--------------------------------------------------------------------------

Volume Groups
Move cursor to desired item and press Enter.
List All Volume Groups
Add a Volume Group
Set Characteristics of a Volume Group
List Contents of a Volume Group
Remove a Volume Group
Activate a Volume Group
Deactivate a Volume Group
Import! a Volume Group
Export a Volume Group
Mirror a Volume Group
Unmirror a Volume Group
Back Up a Volume Group
Remake a Volume Group
List Files in a Volume Group Backup
Restore Files in a Volume Group Backup


Logical Volumes
Move cursor to desired item and press Enter.
List All Logical Volumes by Volume Group
Add a Logical Volume
Set Characteristic of a Logical Volume
Show Characteristics of a Logical Volume
Remove a Logical Volume
Copy a Logical Volume

--------------------------------------------------------------------------

Physical Volumes
Move cursor to desired item and press Enter.
List All Physical Volumes in System
Add a Disk
Change Characteristics of a Physical Volume
List Contents of a Physical Volume
Move Contents of a Physical Volume



Unit 9. System Backup and Restore

AIX 시스템을 사용할 때 고려해야 할 사항은 파일 시스템, directory, 그리고 파일의 배업에 관
한 것이다. 파일과 directory는 많은 시간과 노력이 투자된 중요한 요소이다. 그럼에도 불구하
고, 고의 또는 우연에 의해 모든 컴퓨터파일은 쉽게 변하거나 제거될 수 있다. 그러므로 파일
시 스템을 백업하여 놓는다면 약간의 노력으로 파일 또는 파일 시스템을 복원할 수 있다.
* Backup의 Type

System backup
OS의 image backup을 기록한다.
Full backup
모든 user의 data 파일과 configuration 파일을 보관한다.
Incremental backup
마지막 Full backup이후의 변화를 기록한다.

9.1 backup strategey
+--------------------+
+------------▷ | system backup |
| +--------------------+
|
| ▼
|
| +---------------+
| +------▷ | Full backup |
| | +---------------+
| |
| | ▼
| |
| | +----------------------+
| | | Incremental backup |
| | +----------------------+
| |
| | ▼
| |
| +-------- +----------------------+
+--------------- | Incremental backup |
+----------------------+

9.2 backup media의 이해

backup에는 주로 diskette (/dev/fd0) 과 tape(/dev/rmt0)이 쓰이고 있다.
diskette은 주로 작은 크기의 file을 위해 쓰이며 3.5"와 5.25"가 있다. tape은 주로 4mm
DAT tape drive 와 8mm tape drive 등이 쓰이는데 backup시에 가장 많이 쓰이는 장치이다.

9.3 backup 명령

다음은 backup 을 위한 명령들이다.
backup
이름 또는 I-노드 번호에 의해 파일을 백업한다.
Cpio
보존용 기억영역의 안팎으로 파일을 복사한다.
Dd
파일을 변환하고 복사한다.
Tar
보존파일을 처리한다.
Rdump
원 격 기계장치로 I-노드에 의해 백업한다.
Pax
tar 명령을 생성하고 인용하며 cpio 명령으로 보관한다.

9.4 Restore

자료가 적절한 방법으로 backup 되었을 때, 사용한 자료의 유형에 의존하여 자료를
restore(복 원)하는 여러 가지 방법이 있다.
다음은 restore를 위한 명령이다.
restore
backup 명령에 의해 생성된 파일을 복원한다.
Rrestore
원격 기계에 존재하는 파일 시스템을 국지 기계로 복사한다.
Cpio
보 존용 기억영역과 상호 파일을 복사한다.
Tar
보존 backup을 처리한다.
? backup은 대상에 따라 여러 가지 smit메뉴에서 나타난다. 


9.5 System Backup

# smit -> System Storage Management -> system backup manager -> Backup the system
# smit mksysb


Back Up the System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
WARNING: Execution of the mksysb command will
Result in the loss of all material
Previously stored on the selected
Output medium. This command backs
Up only rootvg volume group.
* Backup DEVICE or FILE [/dev/rmt0] +/
Create MAP files? no +
EXCLUDE files? no +
List files as they are backed up? no +
Generate new /image.data file? yes +
EXPAND /tmp if needed? no +
Disable software packing of backup? no +
Number of BLOCKS to write in a single output [] #
(Leave blank to use a system default)
[BOTTOM] 

F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 

9.6 Backup a File System

# smit -> System Storage Management -> File Systems -> Backup a File system
# smit backup
Backup a File System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
This option will perform a backup by inode.
* FILESYSTEM to backup [] +/
* Backup DEVICE [/dev/rmt0] +/
Backup LEVEL (0 for a full backup) [0] #
RECORD backup in /etc/dumpdates? no + 



F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do

9.7 restore a File System

# smit -> System Storage Management -> File Systems
-> restore a file system
Restore a File System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* Restore DEVICE [/dev/rmt0] +/
* Target DIRECTORY [.] /
VERBOSE output? yes +
Number of BLOCKS to read in a single input [] #
Operation 


F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 


unit 10 AIX Install

RS/6000에는 크게 두가지 모델로 구별할 수 있는데 그것은 Key가 있는 MCA Classical
RS/6000 모델과 PCI based RS/6000 이다.
각 모델 별로 시스템의 install 과정이 약간의 차이를 보인다.
10.1 RS/6000 install
a 장치의 연결상태를 점검한다.
b Key를 Service 에 놓는다. ( MCA Classical 경우)
c 외부장치의 power를 켠다.
d 에뮬레이터를 active 하게 한다.
e 컴퓨터의 power를 넣는다.
f install media를 넣는다.
g install menu에서 적합한 setting을 해서 install한다.
h install 이 끝난후 Key를 Normal로 한 후 재시동 한다. ( MCA Classical 경우)
I root로 login후 smit상에서 software product를 추가로 install한다.
j 시스템의 환경을 설정한다.
고려해야 하는 환경은 다음과 같다.
· communication
· tty0 , tty1
· time zone
· Primary, secondary Language
· volume group setting
· file system setting
· paging space의 변경
· user가 실행할 수 있는 process의 수 

UNIT 10. AIX install AIX Admin교육

--------------------------------------------------------------------------

10.2 Software product install 의 예 


System Management
Move cursor to desired item and press Enter.
Software Installation and Maintenance
Software License Management
Devices
System Storage Management (Physical & Logical Storage)
Security & Users
Communications Applications and Services
Print Spooling
Problem Determination
Performance & Resource Scheduling
System Environments
Processes & Subsystems
Remote Customer Support and Services
Applications
AIX System Backup & Recovery/6000
Using SMIT (information only) 


F1=Help F2=Refresh F3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 


UNIT 10. AIX install AIX Admin교육

--------------------------------------------------------------------------

Software Installation and Maintenance
Move cursor to desired item and press Enter.
Install and Update Software
List Software and Related Information
Software Maintenance and Utilities
Network Installation Management
System Backup Manager 

F1=Help F2=Refresh F3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 

UNIT 10. AIX install AIX Admin교육

--------------------------------------------------------------------------

Install and Update Software
Move cursor to desired item and press Enter.
Install and Update from LATEST Available Software
Update Installed Software to Latest Level (Update All)
Install and Update Software by Package Name (includes devices and printers)
Install Software Bundle (Easy Install)
Update Software by Fix (APAR)
Install and Update from ALL Available Software 

F1=Help F2=Refresh F3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 

UNIT 10. AIX install AIX Admin교육

--------------------------------------------------------------------------

Install and Update from LATEST Available Software
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software /dev/rmt0.1
* SOFTWARE to install [_all_latest] +
PREVIEW only? (install operation will NOT occur) no +
COMMIT software updates? yes +
SAVE replaced files? no +
AUTOMATICALLY install requisite software? yes +
EXTEND file systems if space needed? yes +
OVERWRITE same or newer versions? no +
VERIFY install and check file sizes? no +
Include corresponding LANGUAGE filesets? yes +
DETAILED output? no + 

F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 


UNIT 11. Communication AIX Admin교육

--------------------------------------------------------------------------

11. Communication

11.1 TCP/IP의 개념
· Transmission Control Protocol/Internet Protocol
· 다양한 Type의 네트워크상에서 서로 다른 시스템들이 data를 교환하게 해주는 Software

11.2 TCP/IP의 역사

TCP/IP는 일종의 network 표준으로서 computer communication 방법의 세부사항, network 상호 연결
규정, 경로설정 등을 포함하고 있다. 공식적으로는 TCP/IP internet protocol suite라 부르고, 흔히
TCP/IP라 한다. US. Department of Defense (DOD)는 cost-effective한 Heterogeneous computer간
의 통신을 위한 communication protocol이 필요했고 DARPA(Defense Advanced Research Projects
Agency)의 지원으로 UCLA, UCSB, SRI, Utra Univ등에 의해 1968년에 최초로 ARPANET이 제안 되었
다.

11.3 AIX에서의 IP Setting

* smit -> Communications Applications and Services -> Minimum Configuration & Startup ->
en0,en1,et0,et0 등 Network interface선택 


UNIT 11. Communication AIX Admin교육
--------------------------------------------------------------------------

Minimum Configuration & Startup
To Delete existing configuration data, please use Further Configuration menus
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* HOSTNAME [kdcsi1]
* Internet ADDRESS (dotted decimal) [203.225.28.100]
Network MASK (dotted decimal) []
* Network INTERFACE en0
NAMESERVER
Internet ADDRESS (dotted decimal) [203.225.1.11]
DOMAIN Name [kolon.co.kr]
Default GATEWAY Address [203.225.28.254]
(dotted decimal or symbolic name)
Your CABLE Type tp +
START Now yes + 

F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do 


11.4 Communication architecture의 비교 

OSI
TCP/IP
SNA
7
Application
7
Process/application
------------------------
Host - Host
7
Transaction Service
6
Presentation
6

6
Presentation Service