반응형





3. 레드햇 리눅스 6.0 설치와 활용

현재 나와있는 대부분의 한글 배포판은 레드햇 리눅스 6.0을 기반으로 하고 있다. 여기서는 리눅스를 처음 설치하시는 분들을 중심으로 가장 중요한 내용들을 주로 이야기 하겠다..

1. 설치하기

1) 설치를 위한 부팅하기

여러분의 컴퓨터가 비교적 근래에 나온 똘똘한 녀석이라면 cd-rom으로 부팅이 가능할 것이다. 그렇다면 설치를 위한 부팅은 너무도 간단하다. 컴퓨터를 cd-rom으로 부팅이 가능하도록 cmos설정을 바꿔주신 후에 리눅스 cd를 넣고 부팅하기만 하면 된다. 만약 cd-rom부팅이 안되는 컴퓨터라면 부팅디스크를 만든다.

* 부팅디스크 만들기

리눅스 시디의 /dosutils 디렉토리의 rawrite 프로그램을 이용한다.

디스켓을 a 드라이브에 넣은 후 다음과 같이 실행하면 부팅디스크를 만든다.

d:\dosutils>rawrite

enter disk image source file name: ..\images\boot.img ?

enter target diskette drive: a: ?

please insert a formatted diskette into drive a: and press --enter-- : ?

부팅디스크가 만들어졌으면 a: 드라이브에 넣고 부팅을 합니다.

2) 첫 화면이 뜨면 영어로 쭈욱~ 적힌 환영과 안내 화면이 나오고 제일 밑에 펑션키 메뉴와 boot: 라고 나오고 커서가 깜박인다. 이때 그냥 엔터를 쳐주면 된다. 그럼 뭔가 시작하죠?

3) 두 번째 화면 역시 환영과 함께 안내 메시지다.

4) 그 다음은 설치시 사용하는 언어를 고르는 화면이다. english를 선택한다.

5) 이번엔 키보드 선택이다. 역시 us를 고르면 된다.

6) 다음은 인스톨 수단(installation method)이다. 대부분이 cd-rom에 담긴 리눅스 배포판을 이용할테니 local cdrom을 고른다.

7) 리눅스 시디를 넣으라네요. 이미 넣어 뒀죠? 그냥 엔터...o.k.

8) 새로 설치할 것인가? 기존에 깔린 리눅스를 업그레이드 할 것인가? 처음 리눅스를 설치한다면 당연히 새로 설치( install ), 기존에 설치되어 있는 리눅스가 있어도 가급적이면 그냥 새로 설치한다. ^^; 이미 설치되어 있는 리눅스가 옛날 버전의 리눅스일 경우 라이브러리 호환 문제가 생길 수도 있기 때문이다.

9) installation class라고 나오죠? 리눅스를 어떤식으로 설치할 것인가를 묻는것인데. 잘 모른다면 그냥 custom을 선택할 것을 강조 또 강조한다. workstation의 경우 기존의 리눅스 파티션을 지워버리고 스스로 알아서 다시 나누어 설치하고, server의 경우 한 컴퓨터를 몽땅 리눅스 전용 컴퓨터로 만들어버린다.(물론 기존에 있던 윈도우98 같은 것도 깨끗이 지워 버린다. ) windows와 같은 다른 운영체제와 같이 쓰려면 custom을 선택하는 것이 정신건강에 좋다.

10) scsi 어댑터가 있는가 묻고 있다. 있으면 yes, 없으면 no.

11) 이제부터 가장 어렵다고 생각되는 파티션을 나누는 부분이다.(사실 별로 어려울 것도 없

다.) 우선 맘에드는 도구를 선택한다. disk druid가 fdisk보다 조금 간편하다. fdisk를 쓰고 싶다면 어쩔 수 없지만 우리는 disk druid를 쓰기로 하자.

<여기서 잠깐!> 파티션을 실제로 나누기 전에 파티션에 관한 꼭 필요한 내용을 이야기하고 가자. 아주 쉽게 얘기해서 파티션을 나눈다는 것은 하나의 하드디스크에 여러개의 공간을 만든다고 생각하면 된다. 따라서 리눅스 파티션을 만드는 것은 windows와는 다른 리눅스만의 공간을 만드는 것이다. 만일 기존에 사용하고 있는 windows같은 운영체제가 하나의 하드디스크를 통째로 사용하고 있다면 좀 더 수고를 해야한다. 그렇지 않고 예를 들어 6.4g의 하드를 4g, 2g씩 나누어 사용하고 있다면 별 수고 없이 리눅스를 설치할 수 있다. 특별한 용도(예를 들면, 서버운영)가 아니라면 1.5g정도의 용량이면 리눅스를 설치하기에 충분하다.

* 위에서 언급했듯이 다른 운영체제가 하드디스크를 통째로 사용하고 있다면 fips라는 유틸리티를 이용하여 기존의 하나로 되어있는 파티션을 나누어 주어야 한다. 이 fips라는 유틸리티는 리눅스 시디의 /dosutils 라는 디렉토리에 있으며 자세한 사용법은 /dosutils/fipsdocs 라는 디렉토리에 있다.

* 파티션에 관한 자세한 설명은 아래 페이지를 참고하시기 바랍니다.

http://kldp.org/howto/mini/html/partition/partition.html

12) 핫..좀 복잡한 화면이 떴죠? 파티션에 관한 정보를 보여주고 고치는 부분이다.

화면이 위, 아래 두분으로 나누어져 있습니다. 윗부분은 파티션에 관한 정보를 보여주는 화면이고 아랫부분은 하드디스크의 정보를 보여주는 화면이다. 기본적인 용어를 정리해보면

mout point : 마운트할 위치

device : 파티션 이름이라고 보면 된다. hda1은 첫 번째 하드디스크의 1번 파티션을 말한다.

scsi하드의 경우 sda1과 같은 식으로 나타난다.

requested: 사용자가 요구한 용량

actual: 실제로 할당된 용량

type: 파일 시스템의 종류.

여기서 우리가 해야할 일은 리눅스를 설치하기 위해 linux native 파티션과 linux swap 파티션을 만들어 주는 일이다. 예를 들어 설명하겠다. 만약 기존에 하나의 하드디스크를 c와 d로 나누어 사용하였다면 아마도 화면의 윗부분은 hda1과 hda2 두줄로 이루어져 있을 것이다. 이때 기존의 c드라이브에 windows를 그대로 두고 d드라이브에 리눅스를 설치하고 싶다면 일단은 hda2에 파란색 막대(?)가 오도록 한 후 f4키를 눌러(혹은 tab키로 이동해서) 파티션을 삭제한다. 그 다음 f1키를 눌러서 파티션을 추가한다. edit new partition 이라는 새로운 창이 뜰 것이다. 일단 마운트 포인트는 비워 놓은 후 size로 커서를 옮겨 100정도로 적어준다(왜 꼭 100이어야 하는가? 아니어도 된다. 하지만 하드 용량에 다소 여유가 있다면 100정도로 잡으면 된다.). 그 다음 type으로 옮겨 linux swap을 선택한다. allowable drives(파티션을 설치할 드라이브를 선택하는 것이다. 두 개일 경우 두 개다 * 체크된 채로 두면 스스로 알아서 처리한다.)는 *체크된채로 둔다. o.k. 그러면 다시 돌아온 화면에서 새롭게 생성된 파티션을 볼 수 있을 것이다. 하나 더 만들자. add! 이번엔 마운트 포인트에 / 를 적는다. size 남은 용량을 대충 계산해서 적는다. grow to fill disk? 여기에 * 로 체크해준다. 그러면 남은 용량을 알아서 전부 채워준다. 이번에는 type을 linux native로 선택한다. allowable drives는 역시 *로 체크된채로 둔다. o.k. 하나가 더 만들어졌죠? 이제 리눅스를 위한 공간 마련은 끝났습니다. o.k.로 넘어간다.

13) active swap space라고 나오죠? 스왑 파티션에 스왑 영역을 만들어 준다. 위에서 만든 스왑 파티션이 hda2라면 다음과 같이 나온다.

device size (k)

[*] /dev/hda2 10xxxxx

[ ] check for bad blocks during format

아래 내용은 스왑 영역을 만들면서 하드디스크에 배드 섹터를 검사할 것인지를 물어보는 것이다. 윗 부분은 반드시 * 체크 해줘야 하며 아랫 부분은 배드 섹터가 없는 게 확실하다면 체크 안해도 된다.(체크할 경우 시간이 좀 오래 걸린다.) o.k.

14) 이번에는 위와 비슷한 방법으로 linux native 파티션을 포맷하는 부분이다. 역시 위와 같은 방법으로 설정하고 넘어간다.




15) 설치할 패키지를 고르는 화면이다. 어느 정도 각각의 패키지의 용도에 대하여 알고 있고 하드 용량이 부족하다면 자신이 원하는 패키지만을 선택한다. 그렇지 않으면 제일 끝부분에 있는 everything을 선택하여 전부 설치한다. 아랫부분의 select individual packages를 선택하면 더 자세하게 선택할 수 있다. everything 으로 선택했다고 하고 그냥 넘어가기로 한다.


16) 설치과정에서의 기록들이 /tmp/install.log 에 기록되어 있음을 안내해 주고 있다. 한번 읽어보고 넘어가자.



17) 아~ 드디어 머리아픈 시간이 가고 조금 쉴 여유가 생겼군요. 파일시스템을 만들고 거기에 프로그램을 설치하기 시작한다.

18) 별 문제없이 파일시스템 만들기와 파일 복사가 끝났다면 마우스 설정 화면이 나올 것이다. ps/2 마우스의 경우 대부분 알아서 인식해준다. 아니라면 화면에서 자신이 갖고 있는 마우스 종류를 선택한다. 시리얼 마우스의 경우 마우스 포트 설정 화면이 나올 수 있다. 역시 자신의 마우스가 꼽혀있는 포트를 확인하고 선택해준다

.

19) 이번엔 랜카드의 설정이다. 랜카드가 없으면 no를 선택하여 넘어가고 랜카드가 있으면 yes를 선택한다. 랜카드가 없으면 21)번 과정으로 넘어가자.

20) 대부분의 랜카드는 자동으로 인식한다. 그렇지 않을 경우 랜카드에 해당하는 모듈을 선택하는 메뉴가 나오는데 자신이 가지고 있는 랜카드를 고르면 된다. 다음에 나오는 모듈 옵션은 autoprobe로 하면 무난하다. 이번엔 boot protocol을 고른다. 일반적인 경우 static ip address를 고른다.(bootp와 dhcp에 관한 자세한 내용은 관련 howto문서를 참조하라.) 다음은 tcp/ip설정이다. 자신의 네트웍에 맞게 설정한다. 다음은 도메인 이름, 호스트 이름, 네임서버주소와 같은 네트웍 일반 설정이다. 역시 자신의 네트웍에 맞게 설정한다. 잘 모를 경우 자신이 속해있는 네트웍 담당자에게 문의하라.


21) 시간 설정이다. 거의 대부분의 경우 hardware clock set to gmt는 선택하지 말아야 한다. 시간은 rok나 asia/seoul을 선택한다.

22) 부팅시 자동으로 실행되는 대몬(daemon)들을 고른다. 원하는 것만 선택하고 잘 모를 경우 그대로 두고 넘어간다.o.k.

23) 프린터 설정이다. 프린터가 있으면 yes 없으면 no. 있다하더라도 리눅스를 설치한 컴퓨터에 프린터가 연결되어 있다면 기본 설정을 유지한채 계속 넘어가면 된다. 물론 프린트 모델을 고르는 부분에서는 자신이 가지고 있는 모델을 선택한다. 기타 삼바 등을 통한 네트웍 프린터 설정에 관한해서는 http://kldp.org의 문서들을 참조하기 바란다.

24) 시스템 관리자(root)의 패스워드를 입력하는 부분이다. 보안에 신경을 써서 적당한 것을 입력하면 된다.


25) 이번에 나오는 화면은 network information system(nis)과 쉐도우 패스워드, md5 패스워드에 관한 설정이다. 일반 사용자들은 기본 설정을 유지하고 넘어간다. o.k.

26) 리눅스 박스에 문제가 생겼을 때 복구를 위해 부팅디스켓을 만들 것인지를 만들고 있다. 안만들어도 별 문제는 없지만 하나 만들어 두는것도 나쁘진 않다.

27) 중요하다!!! 부팅을 관리해주는(여러 운영체제를 선택해서 부팅해 주거나, 여러 커널을 선택적으로 부팅해주는 등의 기능이 있다.) lilo를 설치할 영역을 선택한다. 반드시 master boot record로 선택을 해준다.

28) lilo의 옵션을 적어준다. 대부분의 경우 빈칸으로 두고 넘어간다.

29) 드디어 x-window의 설정이다. 제일 먼저 그래픽 카드다. 자동으로 인식되는 경우도 있고 자신의 카드를 골라줘야 하는 경우도 있다. 카드를 골라주면 해당 x 서버를 설치한다.

30) 이번엔 모니터다. 자신이 가지고 있는 모니터가 목록에 있을 경우엔 선택한다. 없다면 custom을 선택하여 자신의 모니터에 맞는 설정을 해주어야 한다. 모니터의 사양은 모니터 매뉴얼을 참조한다. 모니터를 설정하면 검사를 할 것인지를 묻는다. probe를 선택한다. 두세번 깜박이고 검사가 끝나면 적절한 해상도와 색상수를 보여준다. 그냥 주어진 default 값으로 설정하는 것이 무난하다. 그렇지 않을 경우 자신이 원하는 색상에 따른 해상도를 골라준다.

31) x 설정이 제대로 되었나 시험을 하겠냐는 질문이다. yes를 선택하면 x 서버를 동작시키고 제대로 화면이 출력되는지를 묻는다. 그 다음 질문은 부팅시 x환경으로 부팅할 것인지 콘솔환경으로 부팅할 것인지를 묻는 것이다. 원하는 대로 설정하라.

32) 드디어 길고 긴 리눅스 설치의 과정이 끝났다. 축하 메시지가 나타난다. 자동으로 시스템을 리부팅 해준다.

2. x-window 설정하기

첫번째는, x를 설정하기 편하고 시각적으로 쉽게 접근 할 수 있도록 xconfigurator라는 툴을 이용하여 x를 설정하는 방식과, 두번째는, 예전의 텍스트 모드로써 보여주는 xf86config가 있다. 나는 내가 자주 쓰는 xf86config만 설명하겠다. xconfigurator가 조금 더 그래픽적이며 xf86config로 설정을 할수 있다면 xconfigurator로도 충분히 할수 있을거라 본다.

xf86config 설정하기

이 방식은 위에서도 언급했듯이 텍스트 모드로써 x 를 설정하는 방법이다. 콘솔에서나 x interfaces에서 설정 할 수 있는 방식이다. 그럼, 아무데서나 xf86config를 실행하기 바란다.

# xf86config

this program will create a basic xf86config file, based on menu selections you make.the xf86config file usually resides in /usr/x11r6/lib/x11 or /etc/x11. a sample xf86config file is supplied with xfree86; it is configured for a standard vga card and monitor with 640x480 resolution. this program will ask for a pathname when it is ready to write the file. you can either take the sample xf86config as a base and edit it for your configuration, or let this program produce a base xf86config file for your configuration and fine-tune it. refer to

/usr/x11r6/lib/x11/doc/readme.config

for a detailed overview of the configuration process.

for accelerated servers (including accelerated drivers in the svga server), there are many chipset and card-specific options and settings. this program does not know about these. on some configurations some of these settings must be specified. refer to the server man pages and chipset-specific readmes. before continuing with this program, make sure you know the chipset and amount of video memory on your video card. superprobe can help with this. it is also helpful if you know what server you want to run.

press enter to continue, or ctrl-c to abort.

xf86config의 도입부분이다. 계속하려면 엔터, 중단한다면 ctrl-c를 누르면 된다. 엔터를쳐서 계속 진행을해보자.

the directory '/usr/x386/bin' exists. you probably have an old version of xfree86 installed (xfree86 3.1 installs in '/usr/x11r6' instead of '/usr/x386'). it is important that the directory '/usr/x11r6' is present in your search path, *before* any occurrence of '/usr/x386/bin'. if you have installed x program binaries that are not in the base xfree86 distribution in '/usr/x386/bin', you can keep the directory in your path as long as it is after '/usr/x11r6'. your path is currently set as follows:

/sbin:/usr/sbin:/bin:/usr/bin:/usr/x11r6/bin:/opt/kde/bin:/root/bin:/usr/x11r6/bin:/opt/kde/bin:/root/bin

note that the x binary directory in your path may be a symbolic link. in that case you could modify the symbolic link to point to the new binaries.

example: 'rm -f /usr/bin/x11; ln -s /usr/x11r6/bin /usr/bin/x11', if the link is '/usr/bin/x11'.

make sure the path is ok before continuing. press enter to continue, or ctrl-c to abort.

현재 xfree86 버전이 설치된 패스를 확인하는 절차이다. 역시 계속 하려면 엔터를 치고 넘어가면 된다.

first specify a mouse protocol type. choose one from the following list:

1. microsoft compatible (2-button protocol)

2. mouse systems (3-button protocol)

3. bus mouse

4. ps/2 mouse

5. logitech mouse (serial, old type, logitech protocol)

6. logitech mouseman (microsoft compatible)

7. mm series

8. mm hittablet

9. microsoft intellimouse

if you have a two-button mouse, it is most likely of type 1, and if you have a three-button mouse, it can probably support both protocol 1 and 2. there are two main varieties of the latter type: mice with a switch to select the protocol, and mice that default to 1 and require a button to be held at boot-time to select protocol 2. some mice can be convinced to do 2 by sending a special sequence to the serial port (see the cleardtr/clearrts options).

enter a protocol number:

자신의 시스템에 부착된 마우스의 종류를 선택하는 부분이다. ps/2 마우스는 4번, 일반적인 시리얼 마우스를 가지고 있는 사용자는 1번을 선택하고 넘어가면 된다.

if your mouse has only two buttons, it is recommended that you enable emulate3buttons. please answer the following question with either 'y' or 'n'. do you want to enable emulate3buttons?

일반적인 2버튼 사용자라도 양쪽 버튼을 가지고 마치 3버튼 마우스처럼 가상 에뮬레이트 해주는 기능을 선택할 것인지 묻는 항목이다. 2버튼 마우스를 3버튼 마우스처럼 사용하려면 yes로 설정하고 넘어가기 바란다.

now give the full device name that the mouse is connected to, for example /dev/tty00. just pressing enter will use the default, /dev/mouse.

mouse device:

마우스의 시스템디바이스를 결정하는 부분이다. 디폴트로는 /dev/mouse로 되어있다. 엔터를 치고 넘어가면 된다.

beginning with xfree86 3.1.2d, you can use the new x11r6.1 xkeyboard extension to manage the keyboard layout. if you answer 'n' to the following question, the server will use the old method, and you have to adjust your keyboard layout with xmodmap. please answer the following question with either 'y' or 'n'.

do you want to use xkb?

키보드의 언어 매핑을 지정하는 부분이다. 대부분 no를 선택한 후 다음의 키보드에서 선택하기 바란다.

if you want your keyboard to generate non-ascii characters in x, because you want to be able to enter language-specific characters, you can set the left alt key to meta, and the right alt key to modeshift.

please answer the following question with either 'y' or 'n'. do you want to enable these bindings for the alt keys?

이것은 왼쪽과 오른쪽 alt 키를 다르게 지정 할것 인지에 대한 항목이다. 사용자의 선택에 달렸다.

now we want to set the specifications of the monitor. the two critical parameters are the vertical refresh rate, which is the rate at which the the whole screen is refreshed, and most importantly the horizontal sync rate, which is the rate at which scanlines are displayed. the valid range for horizontal sync and vertical sync should be documented in the manual of your monitor. if in doubt, check the monitor database /usr/x11r6/lib/x11/doc/monitors to see if your monitor is there.

press enter to continue, or ctrl-c to abort.

모니터 설정에 앞서 모니터의 수평 동기 주파수와 수직 동기 주파수를 확인하기 바란다. 모니터를 설정하려면 엔터를 치고 넘어간다.

you must indicate the horizontal sync range of your monitor. you can either select one of the predefined ranges below that correspond to industry-standard monitor types, or give a specific range. it is very important that you do not specify a monitor type with a horizontal sync range that is beyond the capabilities of your monitor. if in doubt, choose a conservative setting.

hsync in khz; monitor type with characteristic modes

1 31.5; standard vga, 640x480 @ 60 hz

2 31.5 - 35.1; super vga, 800x600 @ 56 hz

3 31.5, 35.5; 8514 compatible, 1024x768 @ 87 hz interlaced (no 800x600)

4 31.5, 35.15, 35.5; super vga, 1024x768 @ 87 hz interlaced, 800x600 @ 56 hz

5 31.5 - 37.9; extended super vga, 800x600 @ 60 hz, 640x480 @ 72 hz

6 31.5 - 48.5; non-interlaced svga, 1024x768 @ 60 hz, 800x600 @ 72 hz

7 31.5 - 57.0; high frequency svga, 1024x768 @ 70 hz

8 31.5 - 64.3; monitor that can do 1280x1024 @ 60 hz

9 31.5 - 79.0; monitor that can do 1280x1024 @ 74 hz

10 31.5 - 82.0; monitor that can do 1280x1024 @ 76 hz

11 enter your own horizontal sync range

enter your choice (1-11):

이 부분은 자신이 가지고 있는 모니터의 수평 동기 주파수를 설정하는 방식이다. 먼저, 자신의 모니터의 매뉴얼에서 수평 동기 주파수 대역을 확인한 후에 찾아보고 없다면 11번을 선택하여 자신의 주파수 대역을 적어주면 된다. 1-10번 사이를 설정한 사용자를 제외한 11번을 선택하여 직접 수평 동기 주파수를 설정하려는 사람은 다음 장면을 잘 확인하기 바란다.

please enter the horizontal sync range of your monitor, in the format used in the table of monitor types above. you can either specify one or more continuous ranges (e.g. 15-25, 30-50), or one or more fixed sync frequencies.

horizontal sync range:

11번을 선택하여 나타난 부분이다. 자신의 수평 동기 주파수 대역을 (horizontal sync range: ) 이 부분에 적어주면된다. 예를 들어서 자신의 수평 동기 주파수 대역이 30-65 사이라면

ex) horizontal sync range: 30-65

이런식으로 설정을 해주면 된다. 설정을 다 했다면 다음 수직 동기 주파수를 설정하는 부분으로 이동해 보자.

you must indicate the vertical sync range of your monitor. you can either select one of the predefined ranges below that correspond to industry-standard monitor types, or give a specific range. for interlaced modes, the number that counts is the high one (e.g. 87 hz rather than 43 hz).

1 50-70

2 50-90

3 50-100

4 40-150

5 enter your own vertical sync range

enter your choice:

모니터의 수직 동기 주파수를 설정하는 부분으로써, 자신의 모니터의 매뉴얼에서 수직 동기 주파수 대역을 확인을 한 후에 설정하기 바란다. 자신의 모니터의 수직 동기 주파수 대역을 자세히 아는 사용자라면 5번 항목에서 정확한 모니터 주파수 대역을 적어주는 것을 권장한다. 5번을 선택한 후에 수직 동기 주파수 대역을 설정 하는 방법이다.

vertical sync range: 50-110

여기서 수직 동기 주파수 대역을 50-110 이라고 설정해주었다. 필자 모니터의 수직 동기 주파수 대역이다. 다 되었으면 엔터를 치고 다음으로 넘어가보자.

you must now enter a few identification/description strings, namely an identifier, a vendor name, and a model name. just pressing enter will fill in default names. the strings are free-form, spaces are allowed. enter an identifier for your monitor definition:

모니터의 모델 이름을 묻는 항목이다. 적지 않아도 상관없다.

enter the vendor name of your monitor:

역시 이름을 묻는 항목이다.

enter the model name of your monitor:

적어주지 않아도 된다.

다음은 그래픽 카드를 선택하는 부분이다.

now we must configure video card specific settings. at this point you can choose to make a selection out of a database of video card definitions. because there can be variation in ramdacs and clock generators even between cards of the same model, it is not sensible to blindly copy the settings (e.g. a device section). for this reason, after you make a selection, you will still be asked about the components of the card, with the settings from the chosen database entry presented as a strong hint. the database entries include information about the chipset, what server to run, the ramdac and clockchip, and comments that will be included in the device section. however, a lot of definitions only hint about what server to run (based on the chipset the card uses) and are untested. if you can't find your card in the database, there's nothing to worry about. you should only choose a database entry that is exactly the same model as your card; choosing one that looks similar is just a bad idea (e.g. a gemstone snail 64 may be as different from a gemstone snail 64+ in terms of hardware as can be).

do you want to look at the card database?

이 부분은 그래픽 카드를 선택하는 부분이다. yes 로 설정하고 엔터하고 넘어가 보자.

0 2 the max maxcolor s3 trio64v+ s3 trio64v+

1 928movie s3 928

2 agx (generic) agx-014/15/16

3 alg-5434(e) cl-gd5434

4 asus 3dexplorer riva128

5 asus pci-av264ct ati-mach64

6 asus pci-v264ct ati-mach64

7 asus video magic pci v864 s3 864

8 asus video magic pci vt64 s3 trio64

9 at25 alliance at3d

10 at3d alliance at3d

11 ati 3d pro turbo ati-mach64

.

. (중략)

.

412 winfast s200 et4000/w32(i/p)

413 winfast s430 s3 968

414 winfast s510 s3 968

415 xga-1 (isa bus) xga-1

416 xga-2 (isa bus) xga-2

417 miro miromedia 3d s3 virge

enter a number to choose the corresponding card definition.

press enter for the next page, q to continue configuration.

xfree86 3.3.2 에서는 많은 비디오 카드가 지원되기 시작했다. 특히, 이번 버전부터는 agp 비디오 카드가 시험적으로 도입이 되었다. 부가적인 설명을 하자면 왼쪽에 있는 것은 비디오 카드 모델명이고, 오른쪽에 있는 것은 비디오 카드의 칩셋이다. 리눅스 상에서의 비디오 카드는 비디오 카드 칩셋에 따라 x 설정이 많이 좌우하게 된다. 목록에서 자신의 비디오 카드를 선택하였다면 다음과 같은 메시지 가 나타날 것이다.

your selected card definition:

identifier: matrox mystique

chipset: mga1064sg

server: xf86_svga

do not probe clocks or use any clocks line.

press enter to continue, or ctrl-c to abort.

xfree86 3.3.2 에서 추가로 지원되는 비디오 카드 목록은 나중에 보여줄 것이다. 엔터를 치고 넘어가면 다음과 같은 메세지가 나타날 것이다.

now you must determine which server to run. refer to the manpages and other documentation. the following servers are available (they may not all be installed on your system):

1 the xf86_mono server. this a monochrome server that should work on any vga-compatible card, in 640x480 (more on some svga chipsets).

2 the xf86_vga16 server. this is a 16-color vga server that should work on any vga-compatible card.

3 the xf86_svga server. this is a 256 color svga server that supports a number of svga chipsets. on some chipsets it is accelerated or supports higher color depths.

4 the accelerated servers. these include xf86_s3, xf86_mach32, xf86_mach8, xf86_8514, xf86_p9000, xf86_agx, xf86_w32, xf86_mach64, xf86_i128 and xf86_s3v.

these four server types correspond to the four different "screen" sections in xf86config (vga2, vga16, svga, accel).

5 choose the server from the card definition, xf86_svga.

which one of these screen types do you intend to run by default (1-5)?

위의 비디오 카드 항목에서 선택을 하였으면 5번을 선택하지만, 만약, 자신의 비디오 카드가 목록에 없을 경우에는 1-4번 항목을 선택할 수 있다.

1번 항목은 흑백 모드로 x 를 설정하도록 하는 항목이다.

2번 항목은 mono(즉, 16컬러) 모드로 x 를 설정하도록 하는 항목이다.

3번 항목은 256 컬러 svga 모드로 x 를 설정하도록 하는 항목이다. 시스템에 있는 비디오 카드가 목록에 없을 경우에 svga 모드로 x 설정할 경우이다.

4번 항목은 accelerated 기능이 있는 비디오 카드를 선택하는 항목이다. 리눅스에서 가장 x 설정하기 쉬운 비디오 카드를 지원하는 항목이다.

the server to run is selected by changing the symbolic link 'x'. for example,

'rm /usr/x11r6/bin/x; ln -s /usr/x11r6/bin/xf86_svga /usr/x11r6/bin/x'

selects the svga server.

please answer the following question with either 'y' or 'n'.

do you want me to set the symbolic link?

이 항목은 선택된 x서버를 /usr/x11r6/bin/x 로 링크를 시키는 항목이다. yes로 설정하고 다음으로 넘어가보자.

now you must give information about your video card. this will be used for the "device" section of your video card in xf86config. you must indicate how much video memory you have. it is probably a good idea to use the same approximate amount as that detected by the server you intend to use. if you encounter problems that are due to the used server not supporting the amount memory you have (e.g. ati mach64 is limited to 1024k with the svga server), specify the maximum amount supported by the server.

how much video memory do you have on your video card:

1 256k

2 512k

3 1024k

4 2048k

5 4096k

6 other

enter your choice:

이 항목은 시스템에 부착된 비디오 카드의 메모리를 선택하는 부분이다. 자신의 비디오 카드의 메모리를 살펴보기 바란다.

you must now enter a few identification/description strings, namely an identifier, a vendor name, and a model name. just pressing enter will fill in default names (possibly from a card definition). your card definition is matrox mystique. the strings are free-form, spaces are allowed. enter an identifier for your video card definition:

이 항목은 비디오 카드의 회사명을 적어주는 곳이다. 써주지 않아도 상관없다.

you can simply press enter here if you have a generic card, or want to describe your card with one string.

enter the vendor name of your video card:

이 항목은 비디오 카드의 모델명을 적어주는 항목이다. 써주지 않아도 상관없다.

enter the model (board) name of your video card:

이 항목도 마찬가지이다.

the ramdac setting only applies to the s3, agx, w32 servers, and some drivers in the svga servers. some ramdac's are auto-detected by the server. the detection of a ramdac is forced by using a ramdac "identifier" line in the device section. the identifiers are shown at the right of the following table of ramdac types:

1 at&t 20c490 (s3 and agx servers, ark driver) att20c490

2 at&t 20c498/21c498/22c498 (s3, autodetected) att20c498

3 at&t 20c409/20c499 (s3, autodetected) att20c409

4 at&t 20c505 (s3) att20c505

5 brooktree bt481 (agx) bt481

6 brooktree bt482 (agx) bt482

7 brooktree bt485/9485 (s3) bt485

8 sierra sc15025 (s3, agx) sc15025

9 s3 gendac (86c708) (autodetected) s3gendac

10 s3 sdac (86c716) (autodetected) s3_sdac

11 stg-1700 (s3, autodetected) stg1700

12 stg-1703 (s3, autodetected) stg1703

13 ti 3020 (s3, autodetected) ti3020

14 ti 3025 (s3, autodetected) ti3025

15 ti 3026 (s3, autodetected) ti3026

16 ibm rgb 514 (s3, autodetected) ibm_rgb514

17 ibm rgb 524 (s3, autodetected) ibm_rgb524

18 ibm rgb 525 (s3, autodetected) ibm_rgb525

19 ibm rgb 526 (s3) ibm_rgb526

20 ibm rgb 528 (s3, autodetected) ibm_rgb528

21 ics5342 (s3, ark) ics5342

22 ics5341 (w32) ics5341

23 ic works w30c516 zoomdac (ark) zoomdac

24 normal dac normal

enter a number to choose the corresponding ramdac.

press enter for the next page, q to quit without selection of a ramdac.

비디오 카드의 ramdac을 설정하는 항목이다. 주로 s3 계열의 비디오 카드가 선택 항목에 들어간다. s3 계열의 비디오 카드 이외의 비디오 카드라면 24번의 normal dac 을 선택하던지 q를 선택해서 빠져 나오기 바란다.모르겠으면 무조건 q를 누르고 나온다.

a clockchip line in the device section forces the detection of a programmable clock device. with a clockchip enabled, any required clock can be programmed without requiring probing of clocks or a clocks line. most cards don't have a programmable clock chip.

choose from the following list:

1 chrontel 8391 ch8391

2 icd2061a and compatibles (ics9161a, dcs2824) icd2061a

3 ics2595 ics2595

4 ics5342 (similar to sdac, but not completely compatible) ics5342

5 ics5341 ics5341

6 s3 gendac (86c708) and ics5300 (autodetected) s3gendac

7 s3 sdac (86c716) s3_sdac

8 stg 1703 (autodetected) stg1703

9 sierra sc11412 sc11412

10 ti 3025 (autodetected) ti3025

11 ti 3026 (autodetected) ti3026

12 ibm rgb 51x/52x (autodetected) ibm_rgb5xx

just press enter if you don't want a clockchip setting.

what clockchip setting do you want (1-12)?

비디오 카드의 클럭 칩셋을 선택하는 부분이다. 주로 s3 계열의 비디오 카드가 이 항목에 들어간다. 비디오 카드의 매뉴얼 을 보아서 자신의 클럭 칩이 여기에 없다면 엔터를 치고 넘어간다.

for most configurations, a clocks line is useful since it prevents the slow and nasty sounding clock probing at server start-up. probed clocks are displayed at server startup, along with other server and hardware configuration info. you can save this information in a file by running 'x -probeonly 2>output_file'. be warned that clock probing is inherently imprecise; some clocks may be slightly too high (varies per run).

at this point i can run x -probeonly, and try to extract the clock information from the output. it is recommended that you do this yourself and add a clocks line (note that the list of clocks may be split over multiple clocks lines) to your device section afterwards. be aware that a clocks line is not appropriate for drivers that have a fixed set of clocks and don't probe by default (e.g. cirrus). also, for the p9000 server you must simply specify clocks line that matches the modes you want to use. for the s3 server with a programmable clock chip you need a 'clockchip' line and no clocks line. you must be root to be able to run x -probeonly now. the card definition says to not probe clocks.

do you want me to run 'x -probeonly' now?

x 설정에 있어서 모니터의 주파수 대역을 선택한 비디오 카드의 클럭 칩과의 상관관계를 맞추어주는 부분입니다. 만일 맞지 않는다면 에러 메시지를 보여주게 됩니다. 자신의 모니터 설정과 비디오 카드가 맞는지 확인해 보기 위해서 yes 로 설정하고 맞는지 확인해 보시기 바랍니다.

the card definition says to not probe clocks. do you want me to run 'x -probeonly' now? y

it is possible that the hardware detection routines in the server will somehow cause the system to crash and the screen to remain blank. if this is the case, do not choose this option the next time. the server may need a ramdac, clockchip or special option (e.g. "nolinear" for s3) to probe and start-up correctly.

press enter to continue, or ctrl-c to abort.

yes 로 설정을 하였다면 다음과 같은 메세지가 나온다. 엔터를 치고 넘어가면 몇 번 정도 화면이 깜빡이면서 주파수 대역을 찾아내게 된다. 만약, 에러가 난다면 다음과 같은 메세지가 나오게 된다.

running x -probeonly -pn -xf86config /tmp/xf86config.tmp. x -probeonly call failed. no clocks line inserted.

press enter to continue, or ctrl-c to abort.

엔터를 쳐서 해상도 설정을 해보자.

for each depth, a list of modes (resolutions) is defined. the default resolution that the server will start-up with will be the first listed mode that can be supported by the monitor and card. currently it is set to:

"640x480" "800x600" "1024x768" "1280x1024" for 8bpp

"640x480" "800x600" "1024x768" "1280x1024" for 16bpp

"640x480" "800x600" "1024x768" "1280x1024" for 24bpp

"640x480" "800x600" "1024x768" for 32bpp

note that 16, 24 and 32bpp are only supported on a few configurations. modes that cannot be supported due to monitor or clock constraints will be automatically skipped by the server.

1 change the modes for 8pp (256 colors)

2 change the modes for 16bpp (32k/64k colors)

3 change the modes for 24bpp (24-bit color, packed pixel)

4 change the modes for 32bpp (24-bit color)

5 the modes are ok, continue.

enter your choice:

자신이 원하는 컬러수를 고르는 항목이다.

select modes from the following list:

1 "640x400"

2 "640x480"

3 "800x600"

4 "1024x768"

5 "1280x1024"

6 "320x200"

7 "320x240"

8 "400x300"

9 "1152x864"

10 "1600x1200"

11 "1800x1400"

12 "512x384"

please type the digits corresponding to the modes that you want to select. for example, 432 selects "1024x768" "800x600" "640x480", with a default mode of 1024x768.

which modes?

자신이 원하는 컬러수에 대한 해상도를 설정하는 항목이다.

you can have a virtual screen (desktop), which is screen area that is larger than the physical screen and which is panned by moving the mouse to the edge of the screen. if you don't want virtual desktop at a certain resolution, you cannot have modes listed that are larger. each color depth can have a differently-sized virtual screen please answer the following question with either 'y' or 'n'.

do you want a virtual screen that is larger than the physical screen?

x 화면에서의 가상화면을 선택할 수 있도록 하는 항목이다. 가상화면을 사용하고 싶으면 yes 로 설정하고, 필요없으면 no 로 설정하고 넘어가기 바란다. 만일, yes 로 설정을 하였다면 다음과 같은 메세지가 나올 것이다.

for each depth, a list of modes (resolutions) is defined. the default resolution that the server will start-up with will be the first listed mode that can be supported by the monitor and card. currently it is set to:

"640x480" "800x600" "1024x768" "1280x1024" for 8bpp

"1280x1024" for 16bpp

"640x480" "800x600" "1024x768" "1280x1024" for 24bpp

"640x480" "800x600" "1024x768" for 32bpp

note that 16, 24 and 32bpp are only supported on a few configurations.

modes that cannot be supported due to monitor or clock constraints will

be automatically skipped by the server.

1 change the modes for 8pp (256 colors)

2 change the modes for 16bpp (32k/64k colors)

3 change the modes for 24bpp (24-bit color, packed pixel)

4 change the modes for 32bpp (24-bit color)

5 the modes are ok, continue.

enter your choice:

가상화면의 컬러수를 선택하는 부분인데, 자신이 선택하였던 컬러수와 같은 컬러수를 선택해야만 한다.

select modes from the following list:

1 "640x400"

2 "640x480"

3 "800x600"

4 "1024x768"

5 "1280x1024"

6 "320x200"

7 "320x240"

8 "400x300"

9 "1152x864"

10 "1600x1200"

11 "1800x1400"

12 "512x384"

please type the digits corresponding to the modes that you want to select.

for example, 432 selects "1024x768" "800x600" "640x480", with a

default mode of 1024x768.

which modes?

해상도를 설정하는 부분이다.

you can have a virtual screen (desktop), which is screen area that is larger than the physical screen and which is panned by moving the mouse to the edge of the screen. if you don't want virtual desktop at a certain resolution, you cannot have modes listed that are larger. each color depth can have a differently-sized virtual screen please answer the following question with either 'y' or 'n'.

do you want a virtual screen that is larger than the physical screen?

가상 화면을 이용할 것인가를 묻는 화면이다. 가상화면을 사용하고자 한다면 yes로 설정하면 되고, 그렇지 않다면 no로 설정하고 넘어가기 바란다.

for each depth, a list of modes (resolutions) is defined. the default resolution that the server will start-up with will be the first listed mode that can be supported by the monitor and card.

currently it is set to:

"640x480" "800x600" "1024x768" "1280x1024" for 8bpp

"1280x1024" for 16bpp

"640x480" "800x600" "1024x768" "1280x1024" for 24bpp

"640x480" "800x600" "1024x768" for 32bpp

note that 16, 24 and 32bpp are only supported on a few configurations.

modes that cannot be supported due to monitor or clock constraints will

be automatically skipped by the server.

1 change the modes for 8pp (256 colors)

2 change the modes for 16bpp (32k/64k colors)

3 change the modes for 24bpp (24-bit color, packed pixel)

4 change the modes for 32bpp (24-bit color)

5 the modes are ok, continue.

enter your choice:

컬러수와 해상도를 다 설정한 유저는 5번을 선택하고 다음으로 넘어가기 바란다.

i am going to write the xf86config file now. make sure you don't accidently overwrite a previously configured one. shall i write it to /etc/x11/xf86config?

지금까지의 x 설정을 /etc/x11/xf86config 파일에 저장을 할 것인지 묻는 항목이다. yes 로 설정하고 xf86config 를 마치면 x 설정은 끝나게 된다.

3. 리눅스 시스템의 기본 활용

1. 파일 다루기

어떤 운영체제를 사용하더라도 가장 먼저 배우게 되는 것이 아마도 파일의 복사와 이동, 저장, 생성 등에 관한 것일 것이다. 사실 리눅스에서 사용하는 기본 파일에 관한 명령어들은 유닉스 시스템에서 사용하는 명령어와 거의 다를바가 없기 때문에 유닉스 시스템을 경험해본 사람이라면 쉽게 이용할 수 있을 것이다. 여기서는 유닉스를 경험해보지 못한 초보 사용자를 위하여 리눅스에서 파일을 다루는 기본 명령어를 간단하게 살펴보고 몇가지 중요한 사항을 짚고 넘어가고자 한다.

% cd - directory를 이동합니다.

ex.) cd /usr/doc (절대경로)

cd usr (상대경로)

cd ~ (홈 디렉토리로 이동, 간단히 cd 라고만 입력해도 결과가 갈다.)

cd .. (상위 디렉토리로 이동)

cd / (루트 디렉토리로 이동)

*루트 디렉토리: /root 디렉토리가 아닌 최상위 디렉토리를 말한다.

*절대 경로: 루트 디렉토리부터 시작한 모든 경로

*상대 경로: 현재 디렉토리부터 시작한 경로

한가지 주의할 점은 ms-dos에서는 디렉토리의 경로명을 나타낼 때 \(역슬래쉬)를 사용하지만 리눅스의 경우 /(슬래쉬)를 사용한다는 것에 주의하기 바란다.

* 기타 디렉토리 관련 명령어

mkdir (디렉토리만들기), rmdir (디렉토리지우기), pwd(현재 위치를 보여준다.)

% ls - dos의 dir과 같은 명령어, 화일 혹은 디렉토리 정보를 출력합니다.

ex.) ls -l /usr (/usr directory의 내용을 상세히 출력합니다.)

기타 옵션: -f (파일의 속성 출력) -a (모든파일출력)

--color=yes,auto,no( 컬러 사용여부 선택)

% cp - 파일을 복사합니다.

ex.) cp ~/babo ~/babo2

% mv - 파일이나 디렉토리를 옮깁니다. 아래와 같이 파일의 이름을 바꾸기 위해서도 사용합니다.

ex.) mv ~/babo ~/babo2

% rm - 파일을 지웁니다.

ex.) rm ~/babo

% more - 주어진 파일의 내용을 한 페이지씩 보여줍니다.

ex.) ls /usr | more

* more 실행시 : b (한화면 뒤로) space bar (한화면 앞으로) q (종료)

여기서는 파이프를 사용하여 ls를 통한 표준 출력을 more에 표준 입력으로 보냈다.

이처럼 파이프를 통하여 여러개의 명령어를 조합해서 쓰는 것이 가능하다.

% cat - 표준입력으로 받아 표준출력으로 보낸다.

ex.) cat /etc/inittab

간단한 파일을 화면에 출력하거나 파일로 만들 때 자주 쓰인다.

ex.) cat > babo.txt babo.txt라는 텍스트파일 생성

cat < babo.txt babo.txt라는 파일의 내용을 화면에 보여준다.

% echo - 주어진 인수를 화면에 그대로 보여준다.

ex.) echo "hello world"

% grep - 주어진 파일 혹은 표준입력에서 특정 패턴에 맞는 줄을 출력합니다.

ex.) rpm -qa | grep hangul

% find - 파일을 검색한다.

ex.) find 경로명 -name 파일 이름

% touch - 파일의 수정일을 변경합니다.

ex.) touch babo (바보라는 파일의 날짜를 바꿉니다.)

% tr - 특정 문자열을 치환 한다.

ex.) tr babo notbabo < mylife

* mylife 라는 파일에 babo 라는 글자를 babo2 로 치환한다.

% df - 파일시스템의 정보를 보여줍니다. 현재 마운트되어 있는 모든 시스템에 대한 확인이 가능합니다.

* -h (메가바이트 단위로 출력한다.)

% du - 파일 혹은 디렉토리의 사용 공간을 출력합니다. 즉 각각의 파일들이 점유하고 있는 디스크의 용량을 표시합니다.

2. file permission 변경

* 파일 퍼미션의 해석

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

:속 성 : 소유자 : 그 룹 : 타 인 :

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

: d : r w x : r w x : r w x :

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

속성: d (디렉토리), l (링크), b (block device), c (character device)

% chmod - 파일 퍼미션을 변경합니다.

ex.) chmod u+rwx babo

chmod {a,u,g,o}{+,-}{r,w,x} 파일명

chmod 755 babo ( 4:read 2:write 1:excute )

3. 파일 링크하기

% ln - 파일이나 디렉토리를 링크합니다.

ex.) ln -s /dev/cua2 /dev/modem

% mount - 특정 file system을 특정 위치에 마운트 시킵니다.

ex.) mount -t iso9660 /dev/cdrom /mnt/cdrom

* umount ( 마운트를 해제합니다. )

4. 계정(account) 만들기

% adduser - 새로운 사용자 계정을 만듭니다.

ex.) adduser altair

% passwd - 패스워드를 새로 지정합니다.

ex.) passwd altair

5. 프로세스의 제어

% ps - 작동중인 프로세스를 출력합니다.

ex.) ps -x

% kill - 프로세스를 종료시킵니다.

ex.) kill %1

% bg, fg - 실행중인 작업을 각각 background, foreground로 전환합니다.

ex.) bg(fg) %1

6. 파일 묶고 압축하기

% tar - 여러개의 파일을 묶고 풀어줍니다.

ex.) tar cvf backup.tar /etc

tar xvf backup.tar

tar tvf backup.tar

% gzip - 파일을 압축하는데 사용합니다.

ex.) gzip -9 backup.tar

*gunzip (압축을 풀어줍니다.)

* 종합

% tar cvf - /etc | gzip -9c > backup.tar.gz

gunzip -c backup.tar.gz | tar xvf -

7. rpm 설치 제거

% rpm -ivh <패키지명>

rpm -e <패키지명>

rpm -qa


반응형
반응형

네트웍에 문제가 발생 했을 때 해결할 수 있는 방법 몇가지

ping, traceroute, nslookup, netstat, top, ifconfig



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

1. ping 명령으로 연결 확인

ping 명령은 한마디로 얘기해서 상대 호스트의 up,down 상태를 확인하는 명령어이다. 아주 간단한 명령이지만 어떤 호스트의 다운여부나 네트워크 불능여부를 파악하는 데는 이 보다 좋은 명령어가 없을 것이다. ping은 실질적으로 icmp의 echo request 기능을 이용하는 것이다. 그러나 ping은 단지 네트웍상에서 상대 호스트가 살았는지 죽었는지만을 확인하는 명령어 이기에 이것 만으로는 네트웍의 문제점을 찾아 내기란 어려운게 사실이다. 이런 경우는 dns 혹은 nfs 등의 서비스를 테스트해서 부수적인 정보를 더 얻을 필요가 있다.

[root@slug /root]# ping ccs

ping ccs.sogang.ac.kr (163.239.1.1): 56 data bytes

64 bytes from 163.239.1.1: icmp_seq=0 ttl=255 time=0.9 ms

64 bytes from 163.239.1.1: icmp_seq=1 ttl=255 time=0.9 ms

64 bytes from 163.239.1.1: icmp_seq=2 ttl=255 time=0.9 ms

64 bytes from 163.239.1.1: icmp_seq=3 ttl=255 time=0.9 ms

64 bytes from 163.239.1.1: icmp_seq=4 ttl=255 time=0.9 ms

64 bytes from 163.239.1.1: icmp_seq=5 ttl=255 time=0.9 ms

64 bytes from 163.239.1.1: icmp_seq=6 ttl=255 time=0.9 ms

64 bytes from 163.239.1.1: icmp_seq=7 ttl=255 time=0.9 ms




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

2. traceroute 명령의 사용

ping이 상대 호스트의 up,down 상태를 점검하는 것이라면 traceroute는 보다 구체적으로 패킷의 경로를 추적해 주는 똑똑한 녀석이다. 즉, 외부망으로의 접속이 차단되거나 라우터 단에서 문제가 발생했을 때에는 라우팅 경로를 확인하면서 어느 호스트에서 패킷이 차단되는지를 점검해야 할 것이다.바로 이러한 기능을 해주는 도구가 traceroute 인 것이다. 다음의 예는 정상적으로 네트워크가 동작하는 경우의 결과를 보인 것이다. 목적지까지 패킷이 제대로 전달됨을 볼 수 있다. 참고로 도메인 이름이 아닌 ip주소로 나타난 호스트는 dns에 등록이 되지 않았다는 의미이다.

[/slug]# traceroute www.kornet.nm.kr

traceroute to www.kornet.nm.kr (168.126.63.18), 30 hops max, 40 byte packets

1 sogang-fddi-1 (163.239.1.10) 1.044 ms 2.671 ms 1.072 ms

2 168.126.59.77 (168.126.59.77) 8.609 ms 3.248 ms 168.126.47.193 (168.126.47

.193) 3.202 ms

3 168.126.16.121 (168.126.16.121) 5.645 ms 5.053 ms 6.427 ms

4 www.kornet.nm.kr (168.126.63.18) 5.489 ms 12.361 ms 4.291 ms

이제 다음의 예를 보자. 3번째 호스트 혹은 라우터에 ‘!n’이 표시된 것을 볼 수 있을 것이다. 이는 ‘network unreachable’을 의미하는 것으로 pado-inha.kreonet.re.kr 호스트의 라우팅 테이블에 문제가 있어 패킷을 전달시키지 못하는 것을 말한다.

[/slug]# traceroute www.lg.co.kr

traceroute to www.lg.co.kr (165.243.5.37), 30 hops max,

40 byte packets

1 165.246.10.250 (165.246.10.250) 1 ms 1 ms 1 ms

2 165.246.15.1 (165.246.15.1) 2 ms 1 ms 1 ms

3 pado-inha.kreonet.re.kr (134.75.181.1) !n !n !n

다음의 예는 그리 흔한 예는 아니지만 멀티플렉싱 라우터의 예이다. 즉 아래의 호스트중에 5번의 taejon-seoul-t3.kreonet.re.kr 호스트는 kfddi3.kreonet.re.kr과 mix-serial4-1.sanfrancisco.mci.net 두군데로 패킷을 동시에 전송하는 것이다.

일반적인 경우.

[root@slug /root]# traceroute www.oracle.com

traceroute to v-www.us.oracle.com (205.227.44.16), 30 hops max, 40 byte packets

1 sogang-fddi-1 (163.239.1.10) 2.202 ms 1.554 ms 0.930 ms

2 168.126.47.193 (168.126.47.193) 4.945 ms 168.126.59.77 (168.126.59.77) 3.4

64 ms 168.126.47.193 (168.126.47.193) 21.727 ms

3 apgateway3-noc.kornet21.net (168.126.16.75) 16.272 ms 13.969 ms 3.701 ms

4 210.183.28.65 (210.183.28.65) 4.045 ms 3.569 ms 10.228 ms

5 203.234.255.210 (203.234.255.210) 198.941 ms 193.242 ms 199.559 ms

6 main3-249-192.sjc.above.net (209.249.192.4) 197.496 ms 200.980 ms 195.862

ms

7 core1-main3.sjc.above.net (209.249.0.53) 202.879 ms 192.557 ms 193.170 ms

8 mae-west-core1-oc12.sjc.above.net (207.126.96.246) 192.456 ms 194.697 ms

195.558 ms

9 mae-west-core1-oc3-2.maew.above.net (209.133.31.182) 195.194 ms 200.176 ms

194.591 ms

10 s2-1-0.sanjose1-cr2.bbnplanet.net (4.0.85.6) 270.570 ms 266.020 ms 240.87

8 ms

11 p2-1.sanjose1-nbr2.bbnplanet.net (4.0.3.197) 228.333 ms 235.643 ms 237.29

7 ms

12 p1-0.sanjose1-nbr1.bbnplanet.net (4.0.5.85) 242.226 ms 262.068 ms 243.828

ms

13 p4-0.paloalto-nbr2.bbnplanet.net (4.0.1.1) 239.771 ms 231.898 ms 242.323

ms

14 p9-0-0.paloalto-br1.bbnplanet.net (4.0.1.221) 233.567 ms 242.865 ms 236.5

04 ms

15 f0-0.paloalto-cr11.bbnplanet.net (131.119.0.211) 271.271 ms 231.349 ms 23

2.981 ms

16 h2-0.oracle2.bbnplanet.net (4.0.43.218) 232.256 ms 237.982 ms 232.040 ms

17 v-www.us.oracle.com (205.227.44.16) 242.197 ms 233.464 ms 234.834 ms

특이한 경우

[/slug]# traceroute www.oracle.com

traceroute to inet07-1.us.oracle.com (192.86.154.111), 30 hops max,

40 byte pacs

1 165.246.10.250 (165.246.10.250) 2 ms 2 ms 2 ms

2 165.246.15.1 (165.246.15.1) 2 ms 2 ms 1 ms

3 hongneung-nca-t3.kreonet.re.kr (134.75.27.1) 16 ms 8 ms 17 ms

4 gurum.kreonet.re.kr(134.75.28.1) 9 ms 14 ms 6 ms

5 taejon-seoul-t3.kreonet.re.kr(134.75.3.1) 10 ms 9 ms 31 ms

6 kfddi3.kreonet.re.kr (134.75.20.3) 68 ms 23 ms 16 ms

mix-serial4-1.sanfrancisco.mci.net (204.189.216.181) 298 ms

520 ms 545 ms

traceroute 명령의 결과에 ‘*’ 표시가 나타나는 경우가 있다. 이는 게이트웨이가 제대로 동작하지 않음을 의미하는 것이다. 즉 패킷을 제대로 처리하지 못함을 의미한다. 이러한 ‘*’ 표시가 계속적으로 보이면 그 라우터에 문제가 있거나 회선상의 단절이 발생한 것일 것이다.

그리고 산발적으로 보이는 경우는 네트워크의 패킷 흐름양이 너무 많아져 게이트웨이가 늦어져서 그러는 경우와 라우팅 테이블이 꼬였을 경우에 생기는 결과이다.

다음이 그 예이다.

[root@slug /root]# traceroute -q 4 www.yahoo.com

traceroute: warning: www.yahoo.com has multiple addresses; using 204.71.200.67

traceroute to www.yahoo.com (204.71.200.67), 30 hops max, 40 byte packets

1 sogang-fddi-1 (163.239.1.10) 1.032 ms 0.895 ms 1.321 ms 0.889 ms

2 168.126.47.193 (168.126.47.193) 6.737 ms 168.126.59.77 (168.126.59.77) 3.7

37 ms 10.318 ms 168.126.47.193 (168.126.47.193) 40.684 ms

3 apgateway3-noc.kornet21.net (168.126.16.75) 4.758 ms 9.192 ms 6.471 ms

14.804 ms

4 210.183.28.65 (210.183.28.65) 5.724 ms 3.737 ms 3.924 ms 3.843 ms

5 203.234.255.210 (203.234.255.210) 198.024 ms 207.542 ms 192.772 ms 198.9

27 ms

6 main3-249-192.sjc.above.net (209.249.192.4) 193.939 ms 216.425 ms 192.676

ms 205.461 ms

7 core1-main3.sjc.above.net (209.249.0.53) 202.330 ms 234.493 ms 198.564 ms

194.141 ms

8 pao-sjc-oc12.pao.above.net (209.133.31.150) 198.832 ms 229.429 ms 195.057

ms 193.342 ms

9 fe1-0-0.br1.pao.globalcenter.net (206.251.8.122) 212.004 ms 195.591 ms 26

7.010 ms 214.233 ms

10 pos4-1-155m.cr2.pao.globalcenter.net (206.132.254.153) 164.988 ms 201.973

ms * 192.052 ms

11 pos5-3-155m.cr2.snv.globalcenter.net (206.132.254.213) 242.607 ms 212.896

ms 180.360 ms 202.198 ms

12 pos1-0-2488m.hr8.snv.globalcenter.net (206.132.254.41) 190.198 ms 176.827

ms 180.186 ms 223.997 ms

13 bas1r-ge3-0-hr8.snv.yahoo.com (208.178.103.62) 201.429 ms 174.161 ms 185.

353 ms 169.829 ms

14 * www2.yahoo.com (204.71.200.67) 191.594 ms 194.505 ms *

위의 예에서 옵션 ‘-q’에 이어지는 4는 각 호스트마다 4개의 패킷을 보내어 확인하라는 의미이다. 이 경우

pos4-1-155m.cr2.pao.globalcenter.net (206.132.254.153) 164.988 ms 201.973 ms * 192.052

14 * www2.yahoo.com (204.71.200.67) 191.594 ms 194.505 ms *

사이의 네트워크 전송 부하가 크며 호스트는 문제가 있다고 보면 무난하다. 하지만 당부하고 싶은 것은 여러 이유로 인해 위의 리스트를 보고 예측한 것이 틀릴 수도 있다는 점이다. 그러므로 최종적인 확인은 각각의 호스트로의 ping 명령을 통해 확인해야 한다.




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

3. netstat 네트웍의 문제를 파악하자!!!

* netstat 명령어

일반적으로 netstat 명령어는 네트워크와 관련된 상태정보를 보여준다. 다음은 보여줄 수 있는 상태의 종류이다.

(1) 네트워크의 연결 상황을 보여준다( 옵션 없이 사용 ).

(2) 인터페이스 설정 정보를 검사한다( -i 옵션 ).

(3) 라우팅 테이블을 조사한다(-n, -r 옵션, 여기서 -n 옵션은

호스트의 주소를 숫자로 표시하라는 옵션).

(4) 여러 네트워크 프로토콜에 대한 운용 상태 정보를 보여준다 (-s 옵션).

[root@slug /root]# netstat

active internet connections (w/o servers)

proto recv-q send-q local address foreign address state

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1307 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1306 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1305 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1304 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1303 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1302 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1301 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1300 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1299 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1298 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1297 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1296 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1295 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1294 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1293 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1292 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1291 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1290 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1289 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1288 time_wait

tcp 0 0 slug.sogang.ac.kr:www slug2.sogang.ac.kr:1287 time_wait

tcp 0 1066 slug.sogang.ac.k:telnet ccsadm25.sogang.ac:1182 established

tcp 0 0 slug.sogang.ac.k:telnet cspclab40.sogang.a:1088 established

active unix domain sockets (w/o servers)

proto refcnt flags type state i-node path

unix 1 [ ] stream connected 307684 @00016c05

unix 1 [ ] stream connected 443 @0000001d

unix 1 [ ] stream connected 306986 @00016bc9

unix 1 [ ] stream connected 307047 @00016bd2

unix 1 [ ] stream connected 736 @00000032

unix 1 [ ] stream connected 513 @00000024

unix 1 [ ] stream connected 531 @00000025

unix 0 [ ] stream connected 131 @00000014

unix 1 [ ] stream connected 307685 /dev/log

unix 1 [ ] stream connected 307048 /dev/log

unix 1 [ ] stream connected 306987 /dev/log

unix 1 [ ] stream connected 737 /dev/log

unix 1 [ ] stream connected 555 /dev/log

unix 1 [ ] stream connected 554 /dev/log

unix 1 [ ] stream connected 444 /dev/log

인자없이 쓰는 경우 활성화된 tcp 와 udp 포트의 상황을 볼 수 있다. 또한 -a 옵션을 쓰면 연결을 기다리는 비활성화 된 서버도 볼 수 있다.

* 게이트웨이 혹은 라우터에 이상이 없는데 특이하게도 특정 컴퓨터나 혹은 몇개의 컴퓨터만이 네트워크가 매우 느리거나 하는 경우가 있다. 이 경우netstat 명령을 통해 확인한다.

우선, 다음의 예를 보자. ‘-i’ 옵션은 네트워크 인터페이스(카드)의 상태를 보여주는 것이다.

[root@slug /root]# netstat -i

kernel interface table

iface mtu met rx-ok rx-err rx-drp rx-ovr tx-ok tx-err tx-drp tx-ovr flg

eth0 1500 0 20989404 614 0 630 870886 0 0 0 bru

lo 3924 0 48462 0 0 0 48462 0 0 0 lru

앞에서 보면 ‘eth0’이 받은 패킷 수는 20989404 이며 입력 에러 수는 614개, 출력 패킷 수는 870886개이며 출력에러가 없다는 것을 알 수 있다.

여기서 입출력 에러의 비가 지나치면 어떠한 문제가 있다는 얘기이다. 만약 특정 컴퓨터 하나에서만 이런 결과가 나온다면 그 컴퓨터의 네트워크 카드에 문제가 있다는 것이므로 네트워크 카드의 교체를 검토해야 할 것이다. 주위의 다른 컴퓨터들에서도 같은 결과가 나온다면 이는 이들 컴퓨터 사이에 연결된 선로에 문제가 있다는 것을 의미한다. 이런 경우 선로를 교체해야 할 것이다. 아래는 다양한 netstat 의 명령 옵션이다. 참조해서 활용하기 바란다.

[root@slug /root]# man netstat

usage: netstat [-veennccf] [<af>] -r netstat {-v|--version|-h|--help}

netstat [-vnncaeol] [<socket> ...]

netstat { [-veennac] -i | [-cnne] -m | -s }

-r, --route display routing table

-i, --interfaces display interface table

-g, --groups display multicast group memberships

-s, --statistics display networking statistics (like snmp)

-m, --masquerade display masqueraded connections

-v, --verbose be verbose

-n, --numeric dont resolve names

-n, --symbolic resolve hardware names

-e, --extend display other/more information

-p, --programs display pid/program name for sockets

-c, --continuous continuous listing

-l, --listening display listening server sockets

-a, --all, --listening display all sockets (default: connected)

-o, --timers display timers

-f, --fib display forwarding information base (default)

-c, --cache display routing cache instead of fib

<socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom

<af>=use '-a <af>' or '--<af>' default: inet

list of possible address families (which support routing):

inet (darpa internet) ax25 (ampr ax.25) netrom (ampr net/rom)

ipx (novell ipx) ddp (appletalk ddp)




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

* nslookup

이 명령어는 자신이 ip를 알고 있는데 도메인을 모를 경우나 반대로 도메인은 알고 있는데 ip를 모를 경우에 사용하는 명령어이다.

[root@slug /root]# nslookup

default server: ccs.sogang.ac.kr

address: 163.239.1.1

nslookup을 실행시키면 위와같은 꺽새 프롬프트가 떨어진다. 여기에다 자신이 궁금해 하는-자신이 알고 있는 것이 도메인명이고 알고자 하는 것이 ip address라면 도메인명을 친다. 아래와 같이.

[root@slug /root]# yahoo.com

server: ccs.sogang.ac.kr

address: 163.239.1.1

non-authoritative answer:

name: yahoo.com

addresses: 204.71.200.245, 204.71.200.243

반대로 자신이 알고자 하는 것이 도메인명이라면 아래와 같이 ip address를 입력하면 자신이 원하는 정보를 얻을수 있다.

[root@slug /root]# 210.120.129.180

server: ccs.sogang.ac.kr

address: 163.239.1.1

name: chollian.net

address: 210.120.129.180

간혹가다 이런 경우도 있을 것이다. ip나 도메인명을 올바로 입력했는데 찾아주지 못하는 경우가 있을 것이다. 이는 네임서버나 호스트 화일에 등록이 되어 있지 않거나 올바른 주소가 아니기 때문에 발생하는 에러일 것이다.

[root@slug /root]# 166.145.10.4

server: ccs.sogang.ac.kr

address: 163.239.1.1

*** ccs.sogang.ac.kr can't find 166.145.10.4: non-existent host/domain

nslookup은 외부로부터 들어오는 다양한 형태의 접속 시도를 확인할 수 있는 좋은 프로그램이다. 이것은 /etc/resolv.conf 의 네임서버에서 시작한다.



------------------------------------------------------
top

네트웍의 관리란 시스템의 자원을 어떻게 잘 활용하는가와 맥락이 같을 수 있어서 중요한 프로그램 하나를 소개하고자 한다. 아래는 top을 실행시킨 후의 결과치이다.

[root@slug /root]# top

10:17am up 11:43, 2 users, load average: 1.01, 1.02, 1.00

65 processes: 61 sleeping, 4 running, 0 zombie, 0 stopped

cpu states: 23.3% user, 76.6% system, 0.0% nice, 0.0% idle

mem: 63200k av, 61584k used, 1616k free, 31316k shrd, 21836k buff

swap: 68508k av, 8528k used, 59980k free 17848k cached

pid user pri ni size rss share stat lib %cpu %mem time command

4872 root 15 0 12236 7756 3828 r 0 99.0 12.2 573:41 netscape-com

15451 root 2 0 1028 1028 828 r 0 0.9 1.6 0:05 top

1 root 0 0 164 116 92 s 0 0.0 0.1 0:04 init

2 root 0 0 0 0 0 sw 0 0.0 0.0 0:00 kflushd

3 root 0 0 0 0 0 sw 0 0.0 0.0 0:00 kpiod

4 root 0 0 0 0 0 sw 0 0.0 0.0 0:00 kswapd

5 root -20 -20 0 0 0 sw< 0 0.0 0.0 0:00 mdrecoveryd

111 root 0 0 68 0 0 sw 0 0.0 0.0 0:00 apmd

260 bin 0 0 244 216 160 s 0 0.0 0.3 0:03 portmap

307 root 0 0 240 172 128 s 0 0.0 0.2 0:00 syslogd

318 root 0 0 448 164 136 s 0 0.0 0.2 0:00 klogd

332 daemon 0 0 152 112 68 s 0 0.0 0.1 0:00 atd

346 root 0 0 176 120 76 s 0 0.0 0.1 0:00 crond

364 root 0 0 140 72 44 s 0 0.0 0.1 0:00 inetd

378 root 0 0 1044 464 300 s 0 0.0 0.7 0:00 named

392 root 0 0 100 0 0 sw 0 0.0 0.0 0:00 lpd

409 root 0 0 92 0 0 sw 0 0.0 0.0 0:00 rpc.statd

각 프로세스들의 cpu,메모리 점유율등이 일목 요연하게 나타나는 편리한 프로그램이다.

반응형

'블라베 IT world > Linux Document' 카테고리의 다른 글

리눅스 보안에 대하여  (0) 2013.02.13
레드햇 리눅스 6.0 설치와 활용  (0) 2013.02.13
Centos day 02 - commands  (0) 2013.02.13
Centos day 01 - install  (0) 2013.02.13
6.DNS 세팅을 변경  (0) 2013.01.03
반응형

1.file command : 파일정보를 상세히 출력한다.

 

  # file /bin/ls
  # file /root/anaconda-ks.cfg

 

2. cat command : 파일의 내용을 보거나 생성, 수정을 담당.

 

  1). cat viewer : 파일내용보기
  # cat /root/anaconda-ks.cfg

 

  2). file create & append
  # cat > newfile 
  input text
  <ctrl+D>

  # cat >> newfile  

  input new text
  <ctrl+D>

 

  3). special case
  # cat -n /root/ananconda-ks.cfg

 

3.more command : 긴 문장을 하나의 화면으로 출력, 긴 문장 볼 때 사용

  # more /root/ananconda-ks.cfg

 

 command 응용

  # cat -n /root/anaconda-ks.cfg | more

 

 4.wc command  : 라인수, 글자수, 사이즈수로 파일을 표시

 

  # wc -l /root/anaconda-ks.cfg
  # wc -w newfile
  # wc -c newfile (file size 정보)
  # ls -l newfile (5번 필드 - size 정보)
  # wc -m newfile

  command 응용

  # ls -l /bin | wc -l


1. ip 확인 방법

ipconfig           : ip 주소를 확인한다.

ipconfig /all     : 좀더 자세히 확인한다.

 

2. 명령 프롬프트 기본 명령어

cls : clear screen

dir : 디렉토리 보기

date : 날짜 보기

time : 시간 보기

mkdir : 폴더 만들기

cd : 디렉토리 이동

 

F7 : 그 전에 친 문자들 재활용

 

3.  프로그램 사용

- putty.exe (SSH : 보안쉘 이용)

- 파인텀 설치

 

- 명령어

* 시간 관련

 -> date : 날짜

 -> cal : 이번달 달력

 -> cal 2010 : 2010년 달력 출력

 -> uptime : 컴퓨터 켜진 시간

 

* ID 관련

 -> hosty name : host 이름

 -> LANG=C : 언어 변경 (글자가 깨질때 사용한다.)

 -> who : 접속자 알아보기

 -> who | sort | ln : 정렬된 접속자

 

* message 관련

 -> wall message 모든 접속자에게 메시지

 -> mesg no : 수신거부 , mesg on : 수신

 -> write ID : 단방향 메시지 ( ID 에게 보냄)

 -> ctrl + c : 복귀

 -> ctrl + d : 끄기

 -> ctrl + L : 화면 비우기 ( clear )

 

* mail 사용

 -> mail 상대아이디  : 상대에게 매일 보내기 ( 제목 , 내용(.쓰면 내용 끝)  , Cc : 참조인 )

 -> mail : 매일 확인 (q 종료)

 

4. ftp를 이용하여 홈페이지 올리기

 - 파인텀으로 접속하여 폴더를 만들고 권한을 수정한다.

    mkdir public_html (폴더 생성) -> chmod 701 ~ (권한 변경)

 

 - 명령프롬프트에서 html 파일을 올린다.

    ftp ijj.kr : ftp 서버에 접속

    pwd : 현재 디렉토리 알기

    cd public_html : public_html 디렉토리로 이동

    pwd

    !dir : 지금 내 컴퓨터의 디렉토리 보기

    put index.html : index.html 을 서버에 올린다. ( chmod 701 을 안했다면 올라가지 않는다. )

    bye ( 종료 )

 

 - 직접 명령프롬프트에서 html 쓰기

    public_html 디렉토리 안에서

    cat > index.html 입력

    입력 완료 후 Ctrl + D

 

 - 파일 다운받기

    * Internet Explorer 에서 다운받기 : ftp://ijj.kr (도메인 ftp 에 접속이 된다.)

    * get (파일이름) : 파일을 가져온다. 

 


[관리명령 lab]

 

1. mkdir command

  # mkdir dir1  ---> directory 1개 생성
  # mkdir dir2 dir3 --> 다수 directory 생성
  # mkdir -p dir4/dir5 --> dir4 생성 후 dir5 생성

 

2. rmdir command : 디렉토리 삭제

  # rmdir dir1
  # rmdir dir2 dir3
  # rmdir install.log --> Error 발생 (file 삭제 불가능)

 

3. touch command

  1. 0kb file 생성
  # touch file1
  # touch file2 file3

  2. 시간 정보 변경
  # ls -l  --> 존재하는 파일의 시간 정보 확인
  # touch install.log --> 시간 정보

 

4. rm command : 파일삭제

  # rm file1
  # rm file2 file3
  # rm dir2  ---> Error 발생 (dir 삭제 불가능)
  # rm -r dir4 --> (-r에 의해 dir 삭제 가능)

 

5. cp command : 파일복사, 디렉토리복사는 불가

  # cp file4 dir3
  # cp -r dir3 dir4
  # cp -i file3 dir3

 

6. mv command

  1. file 이동
  # mv file2 dir3
 
  2. rename
  # mv file1 new_file1

 

7. grep command (egrep, fgrep)

  # grep 'root' /etc/passwd
  # grep -c 'root' /etc/passwd --> line count
  # grep -n 'root' /etc/passwd --> line number
  # grep -i 'ROOT' /etc/passwd --> ignore case
  # grep -v 'root' /etc/passwd --> except
  # grep -w 'root' /etc/passwd --> word

  * Regular Expression
  # grep '^root' /etc/passwd  --> line  처음부분
  # grep 'login$' /etc/passwd --> line 마지막 부분
  # grep 'ro.t' /etc/passwd
  # grep 'ro.*' /etc/passwd
  # grep '[Rr]oot' /etc/passwd

  * grep command 응용
  # ps -ef | grep http

 

8. find command

 # mkdir core
 # mkdir dir1 dir2
 # touch dir1/core dir2/core

 # find /root -name core
 # find /root -name core -ls
 # find /root -name core [-a] -type f
 # find /root -name core -type f -ok rm {} \;
 # find /root -name core -type f -exec rm {} \;

 # touch sizefile
 # touch timefile
 # find /root -size 2
 # find /root -size -2
 # find /root -mtime 2
 # find /root -mtime -2

 # find / -user root

 

1. vi lab

 

 # vi new_file  --->  새 파일 제작
 # ls  -l  /etc  >  list
 # vi list ---> 존재하는 파일


 ---------------------------------
 
2. 파일 permission Lab

 # ls -l list
 # chmod o-r list : others 그룹에서 Readonly 권한을 뺌
 # chmod a=rw list : all(모든그룹)을 Read&Write 로 변경
 # chmod o-rw list : others 에서 Read&Write 권한을 뺌
 # chmod g-rw list : Group에서 Read&write 권한을 뺌
 # chmod g+r list : Group에서 Readonly 권한을 추가
 # chmod 644 list : User 를 6(Read&write), Group 을 4(Read only), others 를 4(Readonly)로 변경
 # chmod 444 list : User, Group, others 모두를 Readonly로 변경

 # mkdir dir1
 # useradd user1 ----> 계정 발급
 # passwd user1  ----> 임시 패스워드 발급
 # touch dir1/file1 dir1/file2
 # chmod 755 /root
 # chmod 754 dir1
 # su user1
 $ ls -ld dir1
 $ ls -l dir1  ---> -l 옵션 동작 불가능
 $ exit
 # chmod 753 dir1
 # su user1
 $ ls -l dir1  ---> 리스트 참조 불가능
 $ exit
 # chmod 757 dir1  ---> w 권한 부여시 파일 생성/삭제 가능
 # su user1
 $ touch dir1/file3
 $ ls -l dir1
 $ exit

 

3. umask filter lab

 # umask
 # touch dir2/file1
 # umask 027
 # touch dir2/file2
 # umask



[special permission Lab]

 1. SetUID 설정

  # ls -l /usr/bin/passwd
  # chmod 555 /usr/bin/passwd  --> setuid 삭제
  --------------------------------------------
  <ctrl+alt+F2>
  login : user1
  password :
  $ passwd                
  --------------------------------------------
  # ps -ef | grep passwd    -----> passwd 명려을 user1이 실행
  # chmod 4555 /usr/bin/passwd --> setuid 설정
  # ls -l /usr/bin/passwd
  --------------------------------------------
  $ passwd
  --------------------------------------------
  # ps -ef | grep passwd    -----> passwd 명령을 root가 실행

 2. Sticky bit 설정

  # mkdir /data
  # ls -ld /data
  # chmod 1777 /data
  # touch /data/file1 /data/file2 /data/file3
  --------------------------------------------
  $ cd /data
  $ ls -ld /data
  $ rm file1         ----------> 파일 삭제 불가능
  --------------------------------------------
  # chown user1 /data  --------> 디렉터리 소유자 변경 root->user1
  --------------------------------------------
  $ ls -ld /data
  $ rm file2           --------> 파일 삭제가 가능


[파일 백업 및 압축 Lab]

 1. tar 백업

  # mkdir /root/data
  # cp /usr/sbin/sys* /root/data
  # tar cvf data.tar data
  # tar cf data2.tar data

 2. gzip 압축

  # gzip data.tar   --->  gz 확장자 생성

  <압축 해제>
  # gunzip data.tar.gz
  # gzip -d data.tar.gz  

 3. 압축과 백업 해제

  # tar zxvf data.tar.gz  --> z옵션에 의해 압축 해제 후 백업 해제

[Source 형 패키지 설치 Lab]

 1. 압축 백업 해제
 
  # tar zxvf package_name.tar.gz

 2. Makefile 확인

  # cd package_name
  # ls Makefile

  2-1. 존재하지 않을 경우

  # ls configure  ---> Makefile 생성 명령
  # ./configure  ---> Makefile 생성

 3. 프로그램 생성

  # make         --->  프로그램을 임의 위치에 생성
  # make install --->  프로그램 디렉터리를 생성하고 프로그램을 위치

 

 

 


반응형
반응형

1. http://www.centos.org/modules/tinycontent/index.php?id=13 로 이동후 Korea의 Mirror버전을

다운로드 한다.

 

 

Tip: Mirror 중 Http 에서 다운로드 받을 경우 끊기면 재연결이 어려우므로 되도록 FTP에서 다운로드 받는다.

 

2. VM-Ware를 사용할 경우 VM-Ware를 설치한다.

 

Tip: 인터넷상에서 VM-Ware Server버전을 구할 수 있다.

 

 

Local Host로 두고 OK 클릭

 

3.  New-Virtual machine 을 눌러 설치 진행

4.  OS 선택화면에서 Linux를 선택하고 Linux 종류를 선택, 종류 없을 경우 "other Linux 2.4 나

2.6 정도를 선택

 

 

5. 이름과 저장할 장소 설정

 

 

 

6. 가상랜카드의 사용방법 결정, Bridge, NAT 중 선택, 일반적으로 NAT로 사용

 

7. 사용할 용량을 선택, 선택하면 가상의 디스크 용량을 할당한다.

 

 

 

8. HDD공간 할당 후 아래와 같은 화면이 나타난다.


반응형
반응형

* DNS 세팅을 변경하는 일이 자주 있는게 아니어서
   COMMAND를 잊어버리기 일쑤라 여기 적어둔다. 참고하시려면 마음껏~

1. 준비 작업
가끔은 내가 어느 서버에 어느 위치에 들어와 있는지 잊을때가 있어서 확인

ip 확인하기 : # ifconfig
서버이름 확인하기 : # hostname

접속한 내 계정 확인하기 : # whoami
다른 접속자가 있는지 확인하기 : # w

현재 디렉토리 확인 : # pwd

zone file 변경하기 전에 기존 파일을 복사해둔다.
  # cd /var/named

현재 zone file 내용을 확인하고, 변경내용을 검토하고, 현재 serial 번호를 확인
  # cat zone-abc.com          
history관리 및 원상복구 목적으로, 현재 serial을 붙여서 사본파일을 보관해둔다
  # cp zone-abc.com oldzone/zone-abc.com_serialno    

2. zone 파일 수정하기
  # vi zone-abc.com
(zone 파일의 작성법과 Tip은 따로 준비)

3. dns 재시작 :  /etc/rc.d/init.d/named reload

4. dns 응답 점검
   - 주변 몇대의 서버나 PC에서 nslookup 결과를 확인해본다.
   - zone 파일내 주요 host 들을 모두 확인해볼것. 

반응형

'블라베 IT world > Linux Document' 카테고리의 다른 글

Centos day 02 - commands  (0) 2013.02.13
Centos day 01 - install  (0) 2013.02.13
5. CENTOS에 DNS 설정하기  (0) 2013.01.03
3. ip address 설정  (0) 2012.05.16
2. ubuntu에 root 비번 설정하기  (0) 2012.05.16
반응형

DNS 설치하기
도메인은 fool.com, IP는 1.1.1.123으로 가정

1. rpm 패키지 설치
다음과 같이 리눅스 네임서버 패키지를 설치합니다.
이중 redhat-config-bind-1.9.0-13.noarch.rpm은 설치시 의존성 문제로 --nodeps 명령을 주었습니다.

rpm -Uvh http://ftp.superuser.co.kr/pub/redhat/9/RPMS/bind-utils-9.2.1-16.i386.rpm

rpm -Uvh http://ftp.superuser.co.kr/pub/redhat/9/RPMS/bind-9.2.1-16.i386.rpm

rpm -Uvh http://ftp.superuser.co.kr/pub/redhat/9/RPMS/redhat-config-bind-1.9.0-13.noarch.rpm

rpm -Uvh http://ftp.superuser.co.kr/pub/redhat/9/RPMS/caching-nameserver-7.2-7.noarch.rpm


2. 설정파일 세팅
(1) /etc/hosts : 수정하지 않았습니다.

(2) /etc/resolv.conf : 수정하지 않아도 됩니다.

(3) /etc/hos.conf : 수정하지 않았습니다.

(4) /etc/named.conf 에 다음을 추가합니다.
zone "fool.com" IN { type master; file "fool.com.zone"; allow-update { none; }; };


(5) /var/named/fool.com.zone 파일을 생성합니다.
$TTL 86400
@  IN  SOA  ns.fool.com. root.fool.com. (
                2012030405      ; 시리얼값 (년월일시간)으로 대부분 설정합니다.
                3H               ; 2차 네임서버가 1차 네임서버에 접속하는 시간
                15M              ; 접속 실패시 다시 시작할 시간 간격
                1W               ; 1차 네임서버에 데이터가 없다면 1주 이후에 지워진다.
                3H )             ; 위에서 설정한 TTL값과 같은 의미
;
   IN      NS      ns.fool.com.              ; 도메인을 소유한 DNS의 도메인
   IN      MX     10 mail.fool.com.        ; 메일을 보낼 도메인 또는 주소
   IN      A       1.1.1.123          ; 도메인이 찾아갈 IP주소
www   IN      A       1.1.1.123   ; www.fool.com 도메인이 찾아갈 IP주소
mail    IN      A       1.1.1.123
*        IN      A       1.1.1.123   ; 모든 서브 도메인이 찾아갈 서버 IP


3. DNS 서버 시작
다음과 같은 서버 명령으로 DNS 서버를 실행합니다.
- 시작 : /etc/rc.d/init.d/named start
- 재시작 : /etc/rc.d/init.d/named reload
- 정지 : /etc/rc.d/init.d/named stop
- 자동실행 : ntsysv 실행후 named 체크


4. DNS 서버 등록
 도메인 등록업체에서 dns 서버 host 등록하기

-- 이거 어디서 퍼왔는데 ...

반응형

'블라베 IT world > Linux Document' 카테고리의 다른 글

Centos day 01 - install  (0) 2013.02.13
6.DNS 세팅을 변경  (0) 2013.01.03
3. ip address 설정  (0) 2012.05.16
2. ubuntu에 root 비번 설정하기  (0) 2012.05.16
1. virtual box에 ubuntu 설치하기  (0) 2012.05.16
반응형

기본적으로 ssh client는 설치되어 있을 것이고...

ssh daemon 은 이렇게 설치하고 확인한다

출처: http://blog.naver.com/tei2434/130115024773

--

테스트 환경 : ubuntu10.04

우분투 설치시 openssh를 선택하지 않고 진행하면 클라이언트에서 ssh 접속이 안됨

그렇기에 콘솔에서 openssh-server 설치해야함

 

설치여부 확인

# dpkg -l|grep ssh

 

설치

# apt-get install openssh-server 설치 종료후 자동으로 데몬실행

 

만약 아래와 같은 메세지가 나오고 설치가 안될 경우 apt-get update를 하면 해결됨

Package openssh-server has no installation candidate

 

서비스 확인

# netstat -ntl

     --> local address에  :22 포트가 보일겁니다.

ssh 포트 변경

# vi /etc/ssh/sshd-config

위 파일을 열어 #port 22 부분을 주석제거후 원하는 포트로 변경

 

ssh 재시작

# /etc/init.d/ssh resstart

 

ip확인할때는

ifconfig


--



이것도 참고


http://ubuntu.or.kr/wiki/doku.php?id=program:ssh%EC%84%A4%EC%B9%98



반응형

'블라베 IT world' 카테고리의 다른 글

ssh 접속 포트 바꾸기  (0) 2013.04.16
gzip 과 tar 동시에 풀기  (0) 2011.11.18
(펌)정보처리기술사가 되는길  (0) 2010.04.04
반응형

Virtual box에서 bridge mode를 선택했다면

network은 eth0 를 쓸 수가 있다.

이렇게 하면 됩니다.

출처: http://cshong.tistory.com/entry/ubuntu-%EC%9A%B0%EB%B6%84%ED%88%AC-ip-%EC%84%A4%EC%A0%95



--

$ sudo ifdown eth0 (생략가능)
$ sudo vi /etc/network/interfaces

    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    gateway 192.168.0.1
    dns-nameservers 168.126.63.1 168.126.63.2

$ sudo ifup eth0 (생략가능)
$ sudo /etc/init.d/networking restart
ip를 자동으로 할당하고 싶으면 진하게 표시된 iface eth0 inet static 부분을 iface eth0 inet dhcp로 수정하고 그 아래 문자열들을 삭제하거나 주석처리하면 된다.


--



반응형

'블라베 IT world > Linux Document' 카테고리의 다른 글

6.DNS 세팅을 변경  (0) 2013.01.03
5. CENTOS에 DNS 설정하기  (0) 2013.01.03
2. ubuntu에 root 비번 설정하기  (0) 2012.05.16
1. virtual box에 ubuntu 설치하기  (0) 2012.05.16
0. ubuntu go  (0) 2012.05.16
반응형

처음 ubuntu를 설치한 상태에서는 root 계정으로 접속이 안된다.

개인 계정으로 접속한 상태에서 

$ sudo passwd root

를 실행하고 password를 설정한다.

관리자 권한을 가지려면 이것 먼저 해야됬던거야.

끝.

반응형

'블라베 IT world > Linux Document' 카테고리의 다른 글

6.DNS 세팅을 변경  (0) 2013.01.03
5. CENTOS에 DNS 설정하기  (0) 2013.01.03
3. ip address 설정  (0) 2012.05.16
1. virtual box에 ubuntu 설치하기  (0) 2012.05.16
0. ubuntu go  (0) 2012.05.16
반응형


1) virtualbox 설치방법은 생략

  - virtualbox에 설치된 서버가 외부 통신이 되도록

    VM의 네트워크 설정에서 '브리지 어댑터','가상머신에 허용'을 설정했다.

    이렇게 하면, Virtualbox에 설치된 서버가 eth0 네트워크를 인식하고

    ip address도 VirtualBox의 설정을 그대로 사용하게 된다.

  - 다른 분들은 NAT 방식으로 설정한 경우도 있나보다.

     아래 포스팅을 따라가면   eth1을 사용하고 IP도 바꿀 수 있다고 한다. (아직 안해봤음)

         http://simples.kr/21200


2) ubuntu 사이트에서 설치cd 받기

   http://www.ubuntu.com/download

  - 나는 server를 받았다

3) ubuntu install 방법

   http://blog.daum.net/_blog/BlogTypeView.do?blogid=0LNmi&articleno=7730811#ajax_history_home


끝.

날로 먹는 포스팅인걸....


자료 공개해주신 분들께 감사드립니다.

반응형

'블라베 IT world > Linux Document' 카테고리의 다른 글

6.DNS 세팅을 변경  (0) 2013.01.03
5. CENTOS에 DNS 설정하기  (0) 2013.01.03
3. ip address 설정  (0) 2012.05.16
2. ubuntu에 root 비번 설정하기  (0) 2012.05.16
0. ubuntu go  (0) 2012.05.16
반응형

ubuntu를 써보려고 한다.

인터넷에 많은 글들이 있기에 검색만 하면 되는 것들은 그대로 따라하기로 하고 ...^^

다른 선각자분들이 닦아놓으신 좋은 글들에  ~~감사합니다. ~~.

start  !!

반응형

'블라베 IT world > Linux Document' 카테고리의 다른 글

6.DNS 세팅을 변경  (0) 2013.01.03
5. CENTOS에 DNS 설정하기  (0) 2013.01.03
3. ip address 설정  (0) 2012.05.16
2. ubuntu에 root 비번 설정하기  (0) 2012.05.16
1. virtual box에 ubuntu 설치하기  (0) 2012.05.16
반응형

xxx.tar.gz 파일을 한번에 tar까지 풀려면 아래와 같이 사용.

 

gzip -d -c xxxxx.tar.gz | tar xvf -



----------------
gzip

압축하기  gzip cvs.pdf
압축풀기  gzip -d cvs.pdf.gz 또는 gunzip cvs.pdf.gz

 

bzip2

압축하기  bzip2   cvs.pdf
압축풀기  bzip2   -d   cvs.pdf.bz2    또는   bunzip2 cvs.pdf.bz2


 

tar로 묶어서 gzip으로 압축된 파일 풀기

가장 많이 사용되는 형식이다. 이렇게 압축된 파일은 tar.gz 또는 tgz 과 같은 확장자 형식을 지니며 아래와 같이 간편하게 풀 수 있다.

tar  xvfz  test.tar.gz

tar로 묶고 bzip2로 압축된 파일은 tar.bz2 와 같은 확장자 형식을 가지며 다음과 같이하여 푼다.

tar  xvfj   test.tar.bz2

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

http://towanouta.tistory.com/101

뭐...리눅스를 사용하시는 분들에게는 가장 기본적인 일이지만 초보에게는 살짝 햇갈리면서 의외로 많이 쓰이는 것...
압축하고 풀기입니다.

일단 우분투를 포함한 대부분의 리눅스의 압축과 윈도우즈에서의 압축은 조금 다르달까요...

윈도우즈에선 zip같은 방식으로 압축을 할 때에는 선택한 파일들을 통째로 묶어주면서 각 파일에 압축을 넣어주는데요
리눅스에선 묶어주는 역할과 압축해주는 역할이 나누어져있다고 보면 됩니다. (어느쪽이 더 효율적이냐는 넘겨놓고~)

보통 가장 많이 보는 형식은 tar.gz입니다.
이것은 tar형식과 gz형식의 혼합입니다. tar형식은 파일들을 묶어주고 gz은 파일을 압축하는 역할을 하게 됩니다.

----<압축풀기>-----------------------------------------------------------------------------------------

1. tar.gz 압축풀기

$gunzip filename.tar.gz    // tar.gz에서 gz을 풀어냅니다.
$tar xvf filename.tar         // tar를 풀어냅니다.  ( x: 압축풀기 , v: 압축푸는 상태를 본다, f: 파일이름 )

압축푸는 상황을 보고 싶지 않으시다면 v옵션을 주지 않으셔도 됩니다만 보통은 적습니다.

2. tar.gz 한번에 풀기

$tar xvzf filename.tar.gz

이렇게 간단하게 풀어버리는 방법도 있습니다.ㅋ

----<압축하기>-----------------------------------------------------------------------------------------

3. tar.gz 압축하기

$tar cvf filename.tar file1...    //file1의 폴더나 파일을 filename.tar로 묶는다 (압축아님)
$gzip filename.tar                //filename.tar을 filename.tar.gz로 압축한다 (이땐 압축)

4. tar.gz 한번에 압축하기

$tar cvzf filename.tar.gz file1...     //file1의 폴더나 파일을 filename.tar.gz로 묶고 압축한다.
반응형

'블라베 IT world' 카테고리의 다른 글

ssh 접속 포트 바꾸기  (0) 2013.04.16
4. ssh daemon 설치하기  (0) 2012.05.16
(펌)정보처리기술사가 되는길  (0) 2010.04.04

+ Recent posts