_____________________________________________________________
|Command | Screen Displayed / Description |
|________|___________________________________________________|
| a | CPU By Processor |
| c | CPU Report |
| d | Disk Report |
| g | Process List |
| i | IO By File System |
| j | Update Interval (sec) |
| l | Network By Interface |
| m | Memory Report |
| n | NFS By System |
| t | System Tables Report |
| u | IO By Disk |
| v | IO By Logical Volume |
| w | Swap Space |
| A | Application List |
| B | Global Waits |
| D | DCE Global Activity |
| G | Process Threads |
| H | Alarm History |
| I | Thread Resource |
| J | Thread Wait |
| K | DCE Process List |
| N | NFS Global Activity |
| P | PRM Group List |
| T | Transaction Tracker |
| Y | Global System Calls |
| Z | Global Threads |
| ? | Commands Menu |
|________|___________________________________________________|
| S | Select a NFS system/Disk/Application/Trans/Thread |
| s | Select a single process |
| F | Process Open Files |
| L | Process System Calls |
| M | Process Memory Regions |
| R | Process Resources |
| W | Process Wait States |
|________|___________________________________________________|
GlancePlus C.04.50.00 Commands Menu
h - Online Help q - exit (or e) A - Application List
g - Process List d - Disk Report P - PRM Group List
a - CPU By Processor i - IO By File System Y - Global System Calls
c - CPU Report u - IO By Disk F - Process Open Files
m - Memory Report v - IO By Logical Volume M - Process Memory Regions
t - System Tables N - NFS Global Activity R - Process Resources
w - Swap Space n - NFS By System W - Process Wait States
B - Global Waits l - Network By Interface L - Process System Calls
Z - Global Threads T - Trans Tracker y - Renice Process
G - Process Threads H - Alarm History s - Select Process
I - Thread Resource J - Thread Wait
S - Select Disk/NFS/Appl/Trans/Thread
2016년 8월 1일 월요일
[Unix] HP Glance Command
[Xming] Xming
Xming이란
홈페이지 (Source forge) Xming은 윈도우용 X 서버로 Xmanager와 비슷한 프로그램입니다.Xmanager와 달리 무료지요.
Xmanager는 예전 telnet, rsh 를 많이 쓰던 시절부터 만들어진 거라 telnet과 rsh랑도 잘 붙지만 Xming은 putty같은 클라이언트랑 붙고 ssh를 기본으로 접속합니다. telnet으로는 성공 못해봤습니다.
만일 리눅스 박스를 두고 putty를 써서 접속해서 사용하신다면 거의 바로 Xming을 붙여 사용하실 수 있습니다.
Xming 설치
Source forge에 가보면 다운로드할 수 있는 설치 파일이 있습니다. 여기서 실행파일과 폰트를 다운받아 설치.Xming 사용
터미널 띄우기
putty를 기본 접속 프로그램으로 쓰겠습니다.먼저 Xming을 띄웁니다. Xlaunch를 실행하여 실행할 때 Multiple windows, Start no client로 선택해 실행시킵니다.
일단 putty로 서버에 접속할 때 "Enable X11 forwarding"을 체크하고 접속합니다.

그리고 gnome-terminal을 실행해봅니다.

에러 없이 뜬다면 성공.
에러 없이 뜬다면 성공.
한글 locale 설정
본인은 eucKR을 쓰기 때문에 다음과 같이 설정했습니다..bashrc
export LANG="ko_KR.eucKR" export LC_CTYPE="ko_KR.eucKR" export LC_ALL="ko_KR.eucKR" export LC_NUMERIC="ko_KR.eucKR" export LC_TIME="ko_KR.eucKR" export LC_COLLATE="ko_KR.eucKR" export LC_MONETARY="ko_KR.eucKR" export LC_MESSAGES="ko_KR.eucKR" export LC_PAPER="ko_KR.eucKR" export LC_NAME="ko_KR.eucKR" export LC_ADDRESS="ko_KR.eucKR" export LC_TELEPHONE="ko_KR.eucKR" export LC_MEASUREMENT="ko_KR.eucKR" export LC_IDENTIFICATION="ko_KR.eucKR"
.man.config (서버 설정 말고 개인설정을 euc-kr에 맞추려고 RH-ES3) PAGER /usr/bin/less -is /usr/bin/less -isr
luit
만일 uxterm을 쓴다면 utf8과 euc-kr을 변환해야 하는데 luit라는 좋은 프로그램이 있습니다.위의 LANG 설정 된 상태에서 luit를 콘솔에서 실행하면 됩니다.
입력기 설정
저는 Redhat계열에서 사용하는데(WS4, ES3) WS4는 iiimf를 쓰고 ES3는 ami를 쓰는것 같습니다.WS4에서는 nabi가 깔리는데 이걸 써야 터미널에서 한영전환을 할 수 있습니다. iiimf는 불가능.
nabi 사용
일단 nabi가 깔려있는지 확인]$ rpm -q nabi nabi-0.14-3LANG 설정은 위처럼 했다고 가정하고 .bashrc에 다음 추가
export XMODIFIERS="@im=nabi" export HANGUL_KEYBOARD_TYPE=2다시 접속해서 먼저 nabi를 실행한 다음. 터미널 띄워보면 shift-space로 한영전환 될 겁니다.
ami 사용
설치 확인]$ rpm -q ami ami-1.2.2-3.bashrc에 다음 추가
export XMODIFIERS="@im=Ami" export HANGUL_KEYBOARD_TYPE=2다시 접속해서 먼저 ami를 실행한 다음 터미널을 띄워 테스트.
만약에 ami가 실행중 죽는다면 ami의 버그일 겁니다. 인터넷에서 ami 최신판을 받아다 컴파일해 설치.
(현재 1.2.3이 최신)
(현재 1.2.3이 최신)
아이콘으로 실행하기
Xming을 띄운 상태에서 아이콘 하나만 클릭하면 접속해서 터미널까지 띄우는 걸 할 수 있습니다.방법은 public key 인증으로 암호 입력 없이 바로 접속 가능케 하고, plink로 실행해서 putty띄우지 않고 바로 명령어를 실행하게끔 한 다음, plink를 수정해서 커맨드창 안 띄우고 실행하면 됩니다.
public key 인증
이것은 여기 참조. pagent를 띄웁니다.plink 실행
cmd로 putty 설치디렉토리로 가서 plink를 실행해봅니다.plink danielsong@comm5 -X -batch "bash -login -c gnome-terminal 2> /dev/null"( 2> /dev/null 한 이유는 warning 해당 X 프로그램에서 메시지가 나오는 경우 plink가 끝나버리기 때문입니다. 메시지를 나오지 않도록 하기 위해 /dev/null로 리디렉션합니다)
사용하는 shell로 tcsh를 쓸 때는 리디렉션을 >& /dev/null로 하면 됩니다.
plink danielsong@comm5 -X -batch "bash -login -c gnome-terminal >& /dev/null"
-X는 x forwarding한다는 뜻. 실행에 성공한다면 됐습니다.
plinkw 만들기
여기에 방법이 나옵니다.VC7 이상이 있어야 할 듯. editbin.exe 이 있어야 합니다.
Visual studio environment를 실행해서 커맨드라인에서 visual studio 명령들을 실행가능하게 하여 plink.exe 를 다음과 같이 수정합니다.
copy plink.exe plinkw.exe editbin.exe /SUBSYSTEM:WINDOWS plinkw.exe
아이콘 등록.
plinkw를 바탕화면에 바로가기를 만들고 등록정보에서 수정.(저는 putty 바로가기를 수정했습니다.)
대상을
"C:Program FilesPuTTYplinkw.exe" -X user_name@server_name -batch "bash -login -c gnome-terminal 2> /dev/null"로 만듭니다.
Example
Synaptic on Xming, coLinux
추가작업
DebianUserFontConfig : 자기가 원하는 폰트를 깔기 위해 (ms consolas등) 이 링크와 같이 작업할 수 있습니다.2016년 7월 28일 목요일
[Unix] 파일 압축, 압축 파일 보기 및 파일 압축 해제
compress 명령
compress 명령을 사용하여 파일 크기를 줄일 수 있습니다.
큰 파일을 압축하면 디스크 공간 사용량이 감소할 뿐만 아니라 네트워크에서 해당 파일을 전송하는 데 걸리는 시간도 줄어듭니다.
압축량은 압축하는 파일 유형에 따라 달라집니다.
일반적으로 텍스트 파일을 압축하면 파일 크기가 50%에서 60%까지 감소합니다.
compress 명령 구문은 다음과 같습니다.
compress [ -v ] filename
예를 들어, 다음과 같은 구문으로 나타납니다.
$ compress dante
파일을 압축하면 compress 명령은 원본 파일을 .Z 확장자를 가진 새 파일로 바꿉니다.
원본 파일의 소유권 및 수정 시간은 그대로 유지되지만 파일 내용이 변경됩니다.
다음 예제에서는 -v(자세한 표시) 옵션을 사용하여 files.tar 파일을 압축하는 방법을 보여줍니다. 이 옵션을 compress 명령과 함께 사용하면 각 파일의 감소율 또는 증가율 정보를 제공하는 메시지가 표시됩니다.
$ compress -v files.tar
files.tar: 압축: 70.20% -- files.tar.Z로 대체됨
zcat 명령
zcat 명령을 사용하여 compress 명령으로 압축된 파일을 볼 수 있습니다.
zcat 명령은 압축된 데이터를 해석하여 압축되지 않은 것처럼 파일 내용을 표시합니다.
하지만 zcat 명령은 압축된 파일 내용을 변경하지 않습니다.
zcat 명령 구문은 다음과 같습니다.
zcat filename
※ zcat filename 명령은 uncompress -c filename 명령과 동일한 기능을 수행합니다
$ zcat files.tar.Z | tar xvf -
tar 명령 끝에 대시(-)가 있으면 tar 명령이 파일이나 테이프에서 tar 파일을 읽는 대신 표준 입력에서 tar 파일을 읽어야 합니다. 이 예제에서는 파이프(|)로 인해 zcat 명령의 출력에서 표준 입력이 도출됩니다.
uncompress 명령
uncompress 명령은 압축된 파일을 다시 원래 상태로 복구합니다.
uncompress 명령 구문은 다음과 같습니다.
uncompress options filename
다음 예제에서는 files.tar.Z 파일의 압축을 풀어 원본 파일인 files.tar로 바꾸는 방법을 보여줍니다.
-v 옵션을 사용하면 uncompress 명령은 수행된 활동에 대한 메시지를 표시합니다.
$ uncompress -v files.tar.Z
files.tar.Z: -- files.tar로 대체됨
압축된 파일 내용 보기
먼저 압축된(.Z) 파일을 변경하지 않아도 uncompress 명령을 -c 옵션과 함께 사용하여 압축된 파일의 내용을 화면으로 보낼 수 있습니다(stdout).
파이프(|) 문자를 사용하여 uncompress 명령의 출력을 다른 프로그램으로 보낼 수도 있습니다.
tar 명령을 사용하면 uncompress 명령이 읽고 있는 파일 내용을 나열할 수 있습니다.
zip 명령은 여러 파일을 한 개의 아카이브 파일로 압축합니다.
새 파일 이름을 확장자와 함께 지정하지 않으면 zip 명령은 압축된 아카이브 파일의 파일 이름에 .zip 확장자를 추가합니다.
zip 명령 구문은 다음과 같습니다.
zip [ -r ] target_filename source_filenames
$ zip file.zip file2 file3
adding: file2 (deflated 16%)
adding: file3 (deflated 26%)
$ ls
file.zip
file2
file3
zip 아카이브의 파일을 나열하려면 unzip -l 명령을 수행합니다.$ unzip -l zipfile
unzip 명령을 사용하여 zip 파일 복구
unzip 명령을 사용하여 zip 파일 내용의 압축을 풀 수 있습니다.
다음 예제에서는 압축된 file.zip 아카이브 파일을 푸는 방법을 보여줍니다.
$ unzip file.zip
※ jar 명령과 zip 명령은 서로 호환되는 파일을 만듭니다.
unzip 명령은 jar 파일의 압축을 풀 수 있고 jar 명령은 zip 파일의 압축을 풀 수 있습니다.
compress 명령을 사용하여 파일 크기를 줄일 수 있습니다.
큰 파일을 압축하면 디스크 공간 사용량이 감소할 뿐만 아니라 네트워크에서 해당 파일을 전송하는 데 걸리는 시간도 줄어듭니다.
압축량은 압축하는 파일 유형에 따라 달라집니다.
일반적으로 텍스트 파일을 압축하면 파일 크기가 50%에서 60%까지 감소합니다.
compress 명령 구문은 다음과 같습니다.
compress [ -v ] filename
예를 들어, 다음과 같은 구문으로 나타납니다.
$ compress dante
파일을 압축하면 compress 명령은 원본 파일을 .Z 확장자를 가진 새 파일로 바꿉니다.
원본 파일의 소유권 및 수정 시간은 그대로 유지되지만 파일 내용이 변경됩니다.
다음 예제에서는 -v(자세한 표시) 옵션을 사용하여 files.tar 파일을 압축하는 방법을 보여줍니다. 이 옵션을 compress 명령과 함께 사용하면 각 파일의 감소율 또는 증가율 정보를 제공하는 메시지가 표시됩니다.
$ compress -v files.tar
files.tar: 압축: 70.20% -- files.tar.Z로 대체됨
zcat 명령
zcat 명령을 사용하여 compress 명령으로 압축된 파일을 볼 수 있습니다.
zcat 명령은 압축된 데이터를 해석하여 압축되지 않은 것처럼 파일 내용을 표시합니다.
하지만 zcat 명령은 압축된 파일 내용을 변경하지 않습니다.
zcat 명령 구문은 다음과 같습니다.
zcat filename
※ zcat filename 명령은 uncompress -c filename 명령과 동일한 기능을 수행합니다
$ zcat dante.Z | more
The Life and Times of Dante
by Dante Pocai
Mention "Alighieri" and few may know about
whom you are talking. Say "Dante," instead,
and the whole world knows whom you mean. For
Dante Alighieri, like Raphael, Michelangelo,
Galileo, etc. is usually referred to by his
first name. There is only one Dante, as we
recognize one Raphael, one Michelangelo, and
one Galileo.
<중략>
$
먼저 tar 파일의 압축을 풀지 않아도 파이프(|) 문자를 zcat 명령과 함께 사용하여 압축된 tar 파일의 내용을 추출할 수 있습니다.
The Life and Times of Dante
by Dante Pocai
Mention "Alighieri" and few may know about
whom you are talking. Say "Dante," instead,
and the whole world knows whom you mean. For
Dante Alighieri, like Raphael, Michelangelo,
Galileo, etc. is usually referred to by his
first name. There is only one Dante, as we
recognize one Raphael, one Michelangelo, and
one Galileo.
<중략>
$
먼저 tar 파일의 압축을 풀지 않아도 파이프(|) 문자를 zcat 명령과 함께 사용하여 압축된 tar 파일의 내용을 추출할 수 있습니다.
$ zcat files.tar.Z | tar xvf -
tar 명령 끝에 대시(-)가 있으면 tar 명령이 파일이나 테이프에서 tar 파일을 읽는 대신 표준 입력에서 tar 파일을 읽어야 합니다. 이 예제에서는 파이프(|)로 인해 zcat 명령의 출력에서 표준 입력이 도출됩니다.
uncompress 명령
uncompress 명령은 압축된 파일을 다시 원래 상태로 복구합니다.
uncompress 명령 구문은 다음과 같습니다.
uncompress options filename
다음 예제에서는 files.tar.Z 파일의 압축을 풀어 원본 파일인 files.tar로 바꾸는 방법을 보여줍니다.
-v 옵션을 사용하면 uncompress 명령은 수행된 활동에 대한 메시지를 표시합니다.
$ uncompress -v files.tar.Z
files.tar.Z: -- files.tar로 대체됨
압축된 파일 내용 보기
먼저 압축된(.Z) 파일을 변경하지 않아도 uncompress 명령을 -c 옵션과 함께 사용하여 압축된 파일의 내용을 화면으로 보낼 수 있습니다(stdout).
파이프(|) 문자를 사용하여 uncompress 명령의 출력을 다른 프로그램으로 보낼 수도 있습니다.
tar 명령을 사용하면 uncompress 명령이 읽고 있는 파일 내용을 나열할 수 있습니다.
$ uncompress -c files.tar.Z | tar tvf -
tar: 블록 크기 = 11
-rw-rw---- 1233/10 1610 2002년 5월 7일 14:12 file1
-rw-rw---- 1233/10 105 2002년 5월 7일 14:12 file2
-rw-rw---- 1233/10 218 2002년 5월 7일 14:12 file3
명령줄 끝에 대시(-)가 있으면 tar 명령이 tar 파일이나 테이프가 아닌 파이프로 연결된 uncompress 명령의 출력에서 데이터를 읽는 것을 나타냅니다
gzip 명령
gzip 명령은 파일 크기를 줄입니다.
gzip 명령이 성공적으로 파일을 압축하면 원본 파일은 동일한 이름에 .gz 확장자가 붙은 파일로 바뀝니다.
압축된 파일은 원본 파일의 소유권 모드, 액세스 및 수정 시간을 그대로 유지합니다.
gzip 명령은 정규 파일을 압축합니다.
gzip 명령 구문은 다음과 같습니다.
gzip [ -v ] filenames
다음 예제에서는 gzip 명령을 사용하여 file1, file2, file3 및 file4 파일을 압축하는 방법을 보여줍니다.
$ gzip file1 file2 file3 file4
$ ls *.gz
file1.gz file2.gz file3.gz file4.gz
※ gzip 명령은 compress 명령과 동일한 일반 기능을 수행하지만 대체로 gzip 명령으로 압축된 파일 크기가 더 작습니다.
gunzip 명령을 사용하여 gzip 파일 복구
gunzip 명령을 사용하여 gzip 명령으로 압축된 파일을 복구할 수 있습니다.
다음 예제에서는 압축된 file1.gz 파일을 푸는 방법을 보여줍니다.
$ gunzip file1.gz
gzcat 명령
gzcat 명령을 사용하여 gzip 명령이나 compress 명령으로 압축된 파일을 볼 수 있습니다.
gzcat 명령은 압축된 데이터를 해석하여 압축되지 않은 것처럼 파일 내용을 표시합니다.
하지만 gzcat 명령은 압축된 파일 내용을 변경하지 않습니다.
압축된 파일은 여전히 압축된 형식으로 디스크에 남아 있습니다.
gzcat 명령 구문은 다음과 같습니다
gzcat filename
※ zcat 명령과 gzcat 명령의 차이점
zcat 명령을 사용하여 compress 명령으로 압축된 파일을 볼 수 있습니다.
gzcat 명령을 사용하면 gzip 명령이나 compress 명령으로 압축된 파일을 볼 수 있습니다.
먼저 파일 압축을 풀지 않아도 gzcat 명령을 사용하여 압축된 tar 파일의 내용을 볼 수 있습니다.
다음 예제에서는 file1.gz 파일을 표시하는 방법을 보여줍니다.
tar: 블록 크기 = 11
-rw-rw---- 1233/10 1610 2002년 5월 7일 14:12 file1
-rw-rw---- 1233/10 105 2002년 5월 7일 14:12 file2
-rw-rw---- 1233/10 218 2002년 5월 7일 14:12 file3
명령줄 끝에 대시(-)가 있으면 tar 명령이 tar 파일이나 테이프가 아닌 파이프로 연결된 uncompress 명령의 출력에서 데이터를 읽는 것을 나타냅니다
gzip 명령
gzip 명령은 파일 크기를 줄입니다.
gzip 명령이 성공적으로 파일을 압축하면 원본 파일은 동일한 이름에 .gz 확장자가 붙은 파일로 바뀝니다.
압축된 파일은 원본 파일의 소유권 모드, 액세스 및 수정 시간을 그대로 유지합니다.
gzip 명령은 정규 파일을 압축합니다.
gzip 명령 구문은 다음과 같습니다.
gzip [ -v ] filenames
다음 예제에서는 gzip 명령을 사용하여 file1, file2, file3 및 file4 파일을 압축하는 방법을 보여줍니다.
$ gzip file1 file2 file3 file4
$ ls *.gz
file1.gz file2.gz file3.gz file4.gz
※ gzip 명령은 compress 명령과 동일한 일반 기능을 수행하지만 대체로 gzip 명령으로 압축된 파일 크기가 더 작습니다.
gunzip 명령을 사용하여 gzip 파일 복구
gunzip 명령을 사용하여 gzip 명령으로 압축된 파일을 복구할 수 있습니다.
다음 예제에서는 압축된 file1.gz 파일을 푸는 방법을 보여줍니다.
$ gunzip file1.gz
gzcat 명령
gzcat 명령을 사용하여 gzip 명령이나 compress 명령으로 압축된 파일을 볼 수 있습니다.
gzcat 명령은 압축된 데이터를 해석하여 압축되지 않은 것처럼 파일 내용을 표시합니다.
하지만 gzcat 명령은 압축된 파일 내용을 변경하지 않습니다.
압축된 파일은 여전히 압축된 형식으로 디스크에 남아 있습니다.
gzcat 명령 구문은 다음과 같습니다
gzcat filename
※ zcat 명령과 gzcat 명령의 차이점
zcat 명령을 사용하여 compress 명령으로 압축된 파일을 볼 수 있습니다.
gzcat 명령을 사용하면 gzip 명령이나 compress 명령으로 압축된 파일을 볼 수 있습니다.
먼저 파일 압축을 풀지 않아도 gzcat 명령을 사용하여 압축된 tar 파일의 내용을 볼 수 있습니다.
다음 예제에서는 file1.gz 파일을 표시하는 방법을 보여줍니다.
$ gzip file1
$ ls file1*
file1.gz
$ gzcat file1.gz
The Achievers
Unconsciously or not, they divide their
work totally differently than the sustainers
zip 명령
$ ls file1*
file1.gz
$ gzcat file1.gz
The Achievers
Unconsciously or not, they divide their
work totally differently than the sustainers
zip 명령
zip 명령은 여러 파일을 한 개의 아카이브 파일로 압축합니다.
새 파일 이름을 확장자와 함께 지정하지 않으면 zip 명령은 압축된 아카이브 파일의 파일 이름에 .zip 확장자를 추가합니다.
zip 명령 구문은 다음과 같습니다.
zip [ -r ] target_filename source_filenames
$ zip file.zip file2 file3
adding: file2 (deflated 16%)
adding: file3 (deflated 26%)
$ ls
file.zip
file2
file3
zip 아카이브의 파일을 나열하려면 unzip -l 명령을 수행합니다.$ unzip -l zipfile
unzip 명령을 사용하여 zip 파일 복구
unzip 명령을 사용하여 zip 파일 내용의 압축을 풀 수 있습니다.
다음 예제에서는 압축된 file.zip 아카이브 파일을 푸는 방법을 보여줍니다.
$ unzip file.zip
※ jar 명령과 zip 명령은 서로 호환되는 파일을 만듭니다.
unzip 명령은 jar 파일의 압축을 풀 수 있고 jar 명령은 zip 파일의 압축을 풀 수 있습니다.
[VMWare] VMWare Network Option
VMware에서 네트웍을 사용할때 host-only, bridged, NAT 방식이 있다.
host-only는 VMware가 깔리는 머신과 가상머신사이에만 통하는 네트웍이고
bridge는 VMware가상머신이 VMware host머신과 같은 네트웍상에서 똑같이 real ip상에서 동작하도록 하는것이며
NAT방식은 VMware가 자체적으로 내부네트웍대역을 할당하고 자체 DHCP서버도 띄워서 NAT기능을 지원하는것이다.
VMware는 안쓰는 NAT대역을 자동으로 할당하는데 만약 192.168.19.* 식으로 NAT 대역이 할당되면
192.168.19.1 은 host머신의 ip가 되고
192.168.19.2는 가상머신에서 gateway,DNS로 설정되며
192.168.19.3~127 까지는 수동으로 설정하는 ip대역이되며
192.168.19.128~254 는 VMware의 자체 DHCP가 자동으로 할당하는 대역이다.
DHCP를 쓰려면 가상머신에서 DHCP로 설정하면 자동으로 ip와 gateway,DNS정보를 받아서 설정되고,
수동으로 아이피를 설정한다면 gateway,DNS를 192.168.19.2로 수동으로 설정해줘야한다.
그렇지 않으면 외부인터넷을 쓸수 없게 된다.
LINUX가 가상머신이라면 (Redhat 기준)
/etc/sysconfig/network에
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.19.2
GATEWAYDEV=eth0
위처럼 GATEWAY를 192.168.19.2 로 설정해야 된다.
그리고 /etc/resolv.conf 에는
nameserver 192.168.19.2
처럼 DNS도 192.168.19.2 로 설정해야된다.
그리고 NAT환경에서는 가상머신에서 돌리는 http,ftp등의 서비스는 외부 인터넷에서 접속하지 못하는데
vmware의 NAT은 port 포워딩을 통해 가상머신의 서비스에 접속할 수 있도록 해준다.
호스트 머신이 windows라면 c:\winnt\system32\vmnetnat.conf 파일에서
[incomingtcp]
8888 = 192.168.19.129:80
[incomingudp]
6000 = 192.168.19.129:6001
이런식으로 host머신의 8888로 들어오는 요청은 가상머신의 80번 으로 포워딩하고
6000으로 들어오는 요청은 6001으로 포워딩하게 한다.
만약에 가상머신 80에 web서비스가 돌아간다면 host머신의 ip의 8888포트로 접근하면 가상머신의 web서비스를 이용할 수 있는것이다.
출처:http://bbs.kldp.org/viewtopic.php?t=1052
출처:http://cafe.naver.com/secureos.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=52
==================================================================================
VM 의 도움말
In this panel, you can change your virtual network adapter (NIC) and add additional virtual network adapters.
Under Device status:
Connected ? Check or uncheck this option while the virtual machine is running to connect or disconnect the virtual network adapter.
Connect at power on ? Check this option if you want the virtual network adapter to automatically connect to the virtual machine when it powers on. If you do not check this option, the network adapter is not available to the virtual machine when it first powers on.
Under Network connection, you can choose:
Bridged ? If the host computer is on an Ethernet network, bridged networking is often the easiest way to give your virtual machine access to that network. With bridged networking, the virtual machine appears as an additional computer on the same physical Ethernet network as the host. A virtual machine with bridged networking may transparently use any of the services available on the network to which it is bridged, including file servers, printers, gateways and so on. Likewise, any physical host or other virtual machine configured with bridged networking can use resources of that virtual machine.
NAT (Network Address Translation) ? If you want to connect to the Internet or other TCP/IP network using the host computer's dial-up networking connection and you are not able to give your virtual machine an IP address on the external network, this is often the easiest way to give the virtual machine access to that network. The virtual machine does not have its own IP address on the external network. Instead, a separate private network is set up on the host computer. The virtual machine obtains an address on that network from the VMware virtual DHCP server.
Host-only ? When you use this type of network connection, the virtual machine is connected to the host operating system on a virtual private network, which normally is not visible outside the host. Multiple virtual machines configured with host-only networking on the same host are on the same network.
Custom ? If you want to set up a more complex networking configuration, select Custom for one or more of the virtual network adapters. After selecting Custom, choose a virtual switch (VMnet2-VMnet7or VMnet9) from the drop-down list. This connects your virtual machine's adapter to that switch. All virtual machines running on the same host computer and connected to the same virtual switch are on the same virtual network.
If the virtual machine is part of a team, you have the option of connecting the virtual NIC to a team LAN segment, a virtual private network for the team. To connect to a team LAN segment, select Team: LAN segment. Use the drop-down menu to specify the team LAN segment to which you want to connect. For more information on configuring team LAN segments, see LAN Settings.
Note: NICs configured with connections through a DHCP server cannot connect to a team LAN segment.
Note: A virtual NIC can connect to only one LAN segment at a time. To connect a virtual machine to multiple LAN segments, the virtual machine must be configured with multiple NICs.
If you are adding a new virtual NIC, click Add to install the device.
To remove an existing virtual NIC, select that NIC, then click Remove.
Click OK to save the configuration and close the virtual machine settings editor.
host-only는 VMware가 깔리는 머신과 가상머신사이에만 통하는 네트웍이고
bridge는 VMware가상머신이 VMware host머신과 같은 네트웍상에서 똑같이 real ip상에서 동작하도록 하는것이며
NAT방식은 VMware가 자체적으로 내부네트웍대역을 할당하고 자체 DHCP서버도 띄워서 NAT기능을 지원하는것이다.
VMware는 안쓰는 NAT대역을 자동으로 할당하는데 만약 192.168.19.* 식으로 NAT 대역이 할당되면
192.168.19.1 은 host머신의 ip가 되고
192.168.19.2는 가상머신에서 gateway,DNS로 설정되며
192.168.19.3~127 까지는 수동으로 설정하는 ip대역이되며
192.168.19.128~254 는 VMware의 자체 DHCP가 자동으로 할당하는 대역이다.
DHCP를 쓰려면 가상머신에서 DHCP로 설정하면 자동으로 ip와 gateway,DNS정보를 받아서 설정되고,
수동으로 아이피를 설정한다면 gateway,DNS를 192.168.19.2로 수동으로 설정해줘야한다.
그렇지 않으면 외부인터넷을 쓸수 없게 된다.
LINUX가 가상머신이라면 (Redhat 기준)
/etc/sysconfig/network에
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.19.2
GATEWAYDEV=eth0
위처럼 GATEWAY를 192.168.19.2 로 설정해야 된다.
그리고 /etc/resolv.conf 에는
nameserver 192.168.19.2
처럼 DNS도 192.168.19.2 로 설정해야된다.
그리고 NAT환경에서는 가상머신에서 돌리는 http,ftp등의 서비스는 외부 인터넷에서 접속하지 못하는데
vmware의 NAT은 port 포워딩을 통해 가상머신의 서비스에 접속할 수 있도록 해준다.
호스트 머신이 windows라면 c:\winnt\system32\vmnetnat.conf 파일에서
[incomingtcp]
8888 = 192.168.19.129:80
[incomingudp]
6000 = 192.168.19.129:6001
이런식으로 host머신의 8888로 들어오는 요청은 가상머신의 80번 으로 포워딩하고
6000으로 들어오는 요청은 6001으로 포워딩하게 한다.
만약에 가상머신 80에 web서비스가 돌아간다면 host머신의 ip의 8888포트로 접근하면 가상머신의 web서비스를 이용할 수 있는것이다.
출처:http://bbs.kldp.org/viewtopic.php?t=1052
출처:http://cafe.naver.com/secureos.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=52
==================================================================================
VM 의 도움말
In this panel, you can change your virtual network adapter (NIC) and add additional virtual network adapters.
Under Device status:
Connected ? Check or uncheck this option while the virtual machine is running to connect or disconnect the virtual network adapter.
Connect at power on ? Check this option if you want the virtual network adapter to automatically connect to the virtual machine when it powers on. If you do not check this option, the network adapter is not available to the virtual machine when it first powers on.
Under Network connection, you can choose:
Bridged ? If the host computer is on an Ethernet network, bridged networking is often the easiest way to give your virtual machine access to that network. With bridged networking, the virtual machine appears as an additional computer on the same physical Ethernet network as the host. A virtual machine with bridged networking may transparently use any of the services available on the network to which it is bridged, including file servers, printers, gateways and so on. Likewise, any physical host or other virtual machine configured with bridged networking can use resources of that virtual machine.
NAT (Network Address Translation) ? If you want to connect to the Internet or other TCP/IP network using the host computer's dial-up networking connection and you are not able to give your virtual machine an IP address on the external network, this is often the easiest way to give the virtual machine access to that network. The virtual machine does not have its own IP address on the external network. Instead, a separate private network is set up on the host computer. The virtual machine obtains an address on that network from the VMware virtual DHCP server.
Host-only ? When you use this type of network connection, the virtual machine is connected to the host operating system on a virtual private network, which normally is not visible outside the host. Multiple virtual machines configured with host-only networking on the same host are on the same network.
Custom ? If you want to set up a more complex networking configuration, select Custom for one or more of the virtual network adapters. After selecting Custom, choose a virtual switch (VMnet2-VMnet7or VMnet9) from the drop-down list. This connects your virtual machine's adapter to that switch. All virtual machines running on the same host computer and connected to the same virtual switch are on the same virtual network.
If the virtual machine is part of a team, you have the option of connecting the virtual NIC to a team LAN segment, a virtual private network for the team. To connect to a team LAN segment, select Team: LAN segment. Use the drop-down menu to specify the team LAN segment to which you want to connect. For more information on configuring team LAN segments, see LAN Settings.
Note: NICs configured with connections through a DHCP server cannot connect to a team LAN segment.
Note: A virtual NIC can connect to only one LAN segment at a time. To connect a virtual machine to multiple LAN segments, the virtual machine must be configured with multiple NICs.
If you are adding a new virtual NIC, click Add to install the device.
To remove an existing virtual NIC, select that NIC, then click Remove.
Click OK to save the configuration and close the virtual machine settings editor.
2016년 6월 10일 금요일
[Unix] cron & crontab 설정
cron
-
일정 시간마다 시스템에서 자동으로 실행시키는 데몬(Windows의 작업스케줄러와 비슷한 기능)
-
정기적 작업을 할 때 많이 사용
-
cron을 사용할 때 crontab이라는 명령을 이용해서 실행한다. (/etc/crontab)
-
각각의 사용자가 등록한 crontab은 /var/spool/cron/[사용자명]에 저장된다.
일정 시간마다 시스템에서 자동으로 실행시키는 데몬(Windows의 작업스케줄러와 비슷한 기능)
정기적 작업을 할 때 많이 사용
cron을 사용할 때 crontab이라는 명령을 이용해서 실행한다. (/etc/crontab)
각각의 사용자가 등록한 crontab은 /var/spool/cron/[사용자명]에 저장된다.
cron 데몬의 시작 & 종료
/etc/rc.d/init.d/crond [start/restart/stop]
crontab
-
지정된 시간에 다른 프로그램을 실행하면서 연속적으로 실행하는 프로그램
-
유사한 명령으로는 at 명령어가 있다.
지정된 시간에 다른 프로그램을 실행하면서 연속적으로 실행하는 프로그램
유사한 명령으로는 at 명령어가 있다.
crontab와 at 명령의 차이점
-
crontab 명령은 일정한 간격으로 계속해서 명령을 실행한다. 하지만 at 명령은 지정된 명령을 한번만 수행.
crontab 명령은 일정한 간격으로 계속해서 명령을 실행한다. 하지만 at 명령은 지정된 명령을 한번만 수행.
crontab 옵션
-l : 현재 crontab에 의해 설정 된 내용을 출력
-e : crontab의 내용을 작성하거나 수정
-r : crontab의 내용을 삭제
-u : root 권한자가 해당 사용자의 crontab 파일을 다룰때 사용
예) crontab -e -u luffy
crontab의 작업형식
[분] [시] [일] [달(월)] [요일] [명령어]
- 분 : 분을 의미 (0 ~ 59까지 사용)
- 시 : 시를 의미 (0 ~ 23까지 사용)
- 일 : 날짜를 의미 (1 ~ 31까지 사용)
- 달(월) : 달(월)을 의미 (1 ~ 12까지 사용)
- 요일 : 요일을 의미 (0 ~ 7까지 사용, 0과 7은 일요일을 나타냄)
- 명령어 : 실행 할 명령어
구분자는 space로 한다.
위 형식에서 시간을 나타내는 각 필드에서는 와일드 카드 '*'를 사용할 수 있고, 각각의 요일을 구분할 때는 ','를 사용하고 연일 을 나타낼때는 '-'를 사용한다.
즉, 월요일과 수요일은 '1,3', 월요일부터 금요일까지는 '1-5'로 표시할 수 있다.
예) 월요일부터 금요일까지 12시에 /tmp/start라는 스크립트를 실행
0 12 * * 1-5 /tmp/start
예) 1월부터 10월까지 2개월마다 매일 12시에 /tmp/start라는 스크립트를 실행
0 12 1 1-10/2 * /tmp/start (/2는 2달마다라는 표시. 만약 5일마다 작업을 수행시키고 싶으면 0 1 /5 * * [명령]
예) 월, 수, 금 오전 4시에 /tmp/start라는 스크립트를 실행
0 4 * * 1,3,5 /tmp/start
cron 사용자 제한
-
/etc/cron.allow(허가목록)과 /etc/cron.deny(거부목록)을 참조하게 된다.
-
/etc/cron.allow 만 존재하는 경우 : cron.allow 파일에 등록된 사용자만 사용가능
-
/etc/cron.deny만 존재하는 경우 : 기본적으로 모든 사용자가 사용가능하고 cron.deny에 등록된 사용자만 사용불가
-
두 파일이 모두 없을 경우 : 모든 사용자가 사용가능
-
두 파일이 모두 있는 경우 : cron.deny 내용을 무시하고 cron.allow 파일에 등록 된 사용자만 사용가능
/etc/cron.allow(허가목록)과 /etc/cron.deny(거부목록)을 참조하게 된다.
/etc/cron.allow 만 존재하는 경우 : cron.allow 파일에 등록된 사용자만 사용가능
/etc/cron.deny만 존재하는 경우 : 기본적으로 모든 사용자가 사용가능하고 cron.deny에 등록된 사용자만 사용불가
두 파일이 모두 없을 경우 : 모든 사용자가 사용가능
두 파일이 모두 있는 경우 : cron.deny 내용을 무시하고 cron.allow 파일에 등록 된 사용자만 사용가능
2016년 6월 9일 목요일
[Unix] Unix Signals
SIGHUP
|
1
|
Exit
|
Hangup
|
SIGINT
|
2
|
Exit
|
Interrupt
|
SIGQUIT
|
3
|
Core
|
Quit
|
SIGILL
|
4
|
Core
|
Illegal Instruction
|
SIGTRAP
|
5
|
Core
|
Trace/Breakpoint Trap
|
SIGABRT
|
6
|
Core
|
Abort
|
SIGEMT
|
7
|
Core
|
Emulation Trap
|
SIGFPE
|
8
|
Core
|
Arithmetic Exception
|
SIGKILL
|
9
|
Exit
|
Killed
|
SIGBUS
|
10
|
Core
|
Bus Error
|
SIGSEGV
|
11
|
Core
|
Segmentation Fault
|
SIGSYS
|
12
|
Core
|
Bad System Call
|
SIGPIPE
|
13
|
Exit
|
Broken Pipe
|
SIGALRM
|
14
|
Exit
|
Alarm Clock
|
SIGTERM
|
15
|
Exit
|
Terminated
|
SIGUSR1
|
16
|
Exit
|
User Signal 1
|
SIGUSR2
|
17
|
Exit
|
User Signal 2
|
SIGCHLD
|
18
|
Ignore
|
Child Status
|
SIGPWR
|
19
|
Ignore
|
Power Fail/Restart
|
SIGWINCH
|
20
|
Ignore
|
Window Size Change
|
SIGURG
|
21
|
Ignore
|
Urgent Socket Condition
|
SIGPOLL
|
22
|
Ignore
|
Socket I/O Possible
|
SIGSTOP
|
23
|
Stop
|
Stopped (signal)
|
SIGTSTP
|
24
|
Stop
|
Stopped (user)
|
SIGCONT
|
25
|
Ignore
|
Continued
|
SIGTTIN
|
26
|
Stop
|
Stopped (tty input)
|
SIGTTOU
|
27
|
Stop
|
Stopped (tty output)
|
SIGVTALRM
|
28
|
Exit
|
Virtual Timer Expired
|
SIGPROF
|
29
|
Exit
|
Profiling Timer Expired
|
SIGXCPU
|
30
|
Core
|
CPU time limit exceeded
|
SIGXFSZ
|
31
|
Core
|
File size limit exceeded
|
SIGWAITING
|
32
|
Ignore
|
All LWPs blocked
|
SIGLWP
|
33
|
Ignore
|
Virtual Interprocessor Interrupt for Threads Library
|
SIGAIO
|
34
|
Ignore
|
Asynchronous I/O
|
피드 구독하기:
글 (Atom)