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

2009년 11월 12일 목요일

nfs 환경 설정

#apt-get install nfs-kernel-server
#vi /etc/exports
-exports파일에서 다음과 같이 수정.
<NFS 적용할 폴더>    localhost(rw,no_root_squash,no_all_squash)
<NFS 적용할 폴더>    Target IP(즉 보드 IP or 접근 허용 IP)(rw,no_root_squash,no_all_squash)

ex)
/nfs    localhost(rw,no_root_squash,no_all_squash)
/nfs    Target IP(즉 보드 IP or 접근 허용 IP)(rw,no_root_squash,no_all_squash)

#/etc/init.d/nfs-kernel-server restart
--nfs가 마운트 되는지 시험--
#mount -n localhost:<위 NFS에서 적용한 폴더 경로> <마운트 시킬 폴더 경로>

ex)
#mount -n localhost:/nfs /home/temp

위에서 마운트 되었다면 이상 없음.

NFS를 이용해 마운트 시키는 방법.
#mount -t nfs -o nolock 접근할 IP:<접근할 IP의 폴더 경로> <마운트 시킬 폴더 경로>

ex)
#mount -t nfs -o nolock 192.168.0.1:/nfs    /temp



tftp 환경 설정

tftp 환경 설정

-xinetd 설치 후 설정 경우.
#apt-get install xinetd tftpd tftp
#vi /etc/xinetd.d/tftp

service tftp
{
    socket_type    = dgram
    protocol         = udp
    wait              = yes
    user             = root
    server           = /usr/sbin/in.tftpd
    server_args    = -s /tftpboot
    disable          = no
} 

#/etc/init.d/xinetd restart
#netstat -a | grep tftp
udp        0      0 *:tftp                  *:*
#tftp localhost
tftp>get "연결한 폴더에 있는파일"


inetd 경우.
#apt-get install tftpd tftp
#vi /etc/inetd.conf
-inetd.conf파일 내부에서 다음과 같이 바꾼다.
tftp    dgram    udp    wait    root    /usr/sbin/tcpd    in.tftpd    <연결할 폴더>

#killall -HUP inetd
#netstat -a | grep tftp
udp        0      0 *:tftp                  *:*
#tftp localhost
tftp>get "연결한 폴더에 있는파일"

apt-get 사용법

1. 패키지 캐쉬 갱신 및 자동 업그레이드
# apt-get update
# apt-get upgrade


2. 개별 패키지 설치
# apt-get install <패키지명>


3. 원하는 패키지 찾기
# apt-cache  serach <패키지명>


4. 원하는 패키지 찾은 다음 정보 출력
# apt-cache show <패키지명>


5. 의존성 검사 수행하면서 업그레이드
# apt-get -s dist-upgrade


6. 설치한 패키지에 이상이 있어 다시 설치시
# apt-get --reinstall install <패키지명>


7. CD-ROM 목록 추가
# apt-cdrom add


8. 패키지 삭제
# apt-get remove <패키지명>
또는 # dpkg -P <패키지명>


9. 삭제하는 패키지의 설정화일들가지 모두 삭제시
# apt-get --purge remove <패키지명>


10. dselect에서 선택한 패키지의 설치 및 삭제
# apt-get dselect-upgrade

11. 설치된 패키지를 볼때
# dpkg -l



2009년 10월 18일 일요일

GDB 기본 사용법

GDB 기본 사용법


gdb를 이용해 디버깅을 하기 위해서는... 컴파일 옵션에 -g 옵션을 붙여야 한다.


$gcc -g -o test test.c


-g 옵션을 붙이게 되면, 컴파일 되는 실행 파일에 여러 디버깅 정보가 삽입된다..

아무튼 이렇게 생성한 실행파일로 gdb디버깅을 시작해 보자.

프롬프트 창에서

 $gdb test

라고 입력한다.



프롬프트 변경


(gdb)set prompt haha:


이렇게 하면...(gdb)대신에 haha: 가 나오게 된다.

 

gdb 종료방법


(gdb) q



1. 소스보기

    명령어 : l (list)


그냥 단순히 프롬프트 창에서 l을 입력하면 된다.

리눅스에서와 마찬가지로..여기서도 tab키의 기능을 마음껏 사용할 수 있는데..축약 명령어보다 정확한 명령어를 사용하고 싶다면... l을 누르고 tab를 누르면 자동완성 기능이 사용된다.


l 명령은 기본적으로 10줄의 소스코드를 보여주는데.. 더 많이 보거나 적게 보기위해서는..

이렇게 하면 20줄씩 보게 되겠다..

또, 특정 줄이나 함수로 이동하고자 할 때는,..


l main

l 25

위와 같이 명령을 내리면 되겠다.

 

l file.c:func

또한 특정 파일의 func함수를 보고 싶다면...위와 같이 입력하면 된다.



1.5 프로그램 실행

    명령어 : r (run)

아까 순서에는 적지 않았지만... 브레이크 포인트 설명 전에 미리 언급해야 할 사항이다. 일단.. gdb를 실행하고 나면... 아직 디버깅할 준비만 된 것이지... 실제로 디버깅을 시작한 것은 아니다. r명령을 내림으로써 실제로 디버깅에 들어간다.

 

2. 브레이크 포인트

    명령어 : b (break)


이제 특정 부분에 브레이크를 거는 작업이다. 요것이 무엇인고...하니, 간략히 말하자면... 문제가 발생한 부분에 브레이크를 걸어, r명령으로 프로그램을 수행하면, 브레이크를 건 부분에서 프로그램이 멈추는 것을 볼 수 있다.

브레이크는 특정 라인에 걸거나 함수에 걸수 있다.


b 19

b main

b file.c:10

b -2

b 10 if tmp ==0


위와 같이 브레이크를 걸 수 있는데...

4번째 명령은 현재 행으로부터 2줄 이전에 브레이크를 거는 것이고,

마지막 명령은, 10행에 브레이크를 거는데...tmp라는 변수가 0일 때 작동한다는 의미이다.

어떤 상황에 맞게 브레이크를 걸게 할 수도 있고, 그냥 통과 시킬 수도 있는 기능은 매우 편리하기 때문에 자주 사용된다.


또한, 브레이크 포인트를 지울 수도 있는데...
cl (clear)명령어를 사용한다.

cl hello

cl 10

cl file.c:20

d


위에 나열한 명령어가 브레이크를 지우는 역할을 한다.

다른 것들은 말 안해도 알겠고...마지막에 d라는 명령어는 모든 브레이크를 지우는 역할을 한다.


지금 어떤 라인이나 함수에 브레이크 포인트가 설정되어있는지 확인할 때는 어떻게 할까?

당연히 설정되어 있는 브레이크 포인트를 보는 명령어도 있다.

 

info breakpoints


명령어가 조금 길게 느껴지지만...tab을 이용하면 된다.


사용을 했다가 안했다가 하는 브레이크 포인터를 지워버릴 수도 있지만...

활성화 비활성화 기능을 사용하는 것도 좋다.

 

enable 2

disable 2

 

여기서 뒤에 나와 있는 숫자는 라인넘버가 아닌 브레이크포인터의 넘버다.

브레이크 포인터의 넘버는 info breakpoints로 확인 할 수 있다.

 

3. 프로그램 수행

    명령어 : r (run) : 프로그램 수행

               r arg1 arg2 : 프로그램 수행 시 arg1과 arg2를 전달

    명령어 : k (kill) : 프로그램 수행 종료

    명령어 : s (step) : 현재 행 수행 후 정지, 함수 호출 시 함수 내부로 들어감

    명령어 : n (next) : 현재 행 수행 후 정지, 함수 호출 시 함수 수행 후 다음 행으로 감

    명령어 : c (continue) : 브레이크 포인트를 만날 때까지 계속 진행

    명령어 : u (until) : 현재 루프를 빠져나감

    명령어 : finish : 현재 함수를 수행하고 빠져나감

    명령어 : return : 현재 함수를 수행하지 않고 빠져나감

               return arg1 : 현재 함수를 수행하지 않고 빠져나가는데... arg1을 리턴

    명령어 : si : 현재의 인스트럭션을 수행, 함수 호출 시 함수 내부로 들어감

    명령어 : ni : 현재의 인스트럭션을 수행, 함수 호출 시 함수 내부로 들어가지 않음

 

프로그램 수행에 관한 부분은 따로 설명할 것이 없는 것 같다. ^^;;

실제로 프로그램을 돌리면서 하나하나 해 보는 것이 제일 좋다.



4. 와치 포인트

    명령어 : watch

 

watch i

이렇게 명령을 내린다면... i 변수에 와치 포인트를 설정하고 i 변수가 바뀔 때마다 브레이크가 걸리면서 i변수의 이전 값(Old value)과 현재값(new value)을 출력한다.

 

5. 변수와 레지스터 값 출력    명령어 : info locals : 현재 상태에서의 지역변수 출력

    명령어 : info variables : 현재 상태에서의 전역변수 리스트 출력

    명령어 : p (printf) : 개별 변수 출력

 

위에 명령어 옆에 써 놓은 간략한 설명 그대로다.

info locals 는 지역변수를, info variables는 전역변수를 보여준다.

p는 하나의 개별 변수를 출력하는데..


p number1


이렇게 입력하면 number1의 값을 출력하게 된다.

p명령어는 포인트 변수도 출력이 가능한데...C에서처럼.. 앞에 *를 붙여주면 된다.


p *pointer


라고 한다면... pointer가 가리키는 값이 출력된다. 만약 여기서, 앞에 *를 빼 먹는다면...그냥 pointer의 주소 값을 출력하게 된다.


또한, 포인트가 가지는 구조체 배열을 출력할 수도 있는데...이를 위해서는, *를 사용함과 동시에 배열의 크기도 알려야하는데..그때는 @를 사용하고, 기존에 포인터가 가리키는 곳을 출력한다는 의미의 p *pointer의 뒤에 배열의 크기를 알려주는 @4 (배열의 크기가 4라고 생각)를 더 쓰면 된다.


p *pointer@4


마지막으로... p명령어로 레지스터 값도 출력할 수 있는데...


p $eax

와 같이, $뒤에 레지스터 명을 적어주면 된다.




5.5 display를 이용한 변수 값 출력

    명령어 : display i

 

다시 한 번 예상치도 못했던...설명 부분이다..^^;; 그냥 변수 값을 확인하고자 할 때 p만을 사용해도 괜찮지만, 계속해서 그 변수를 확인해야 할 때, 매번 p명령을 내려야 하는 수고를 덜 때 편리한 방법을 소개하고자 한다. 위에 적어 놨듯이, 명령법은 간단하다.

 

display i

이 명령을 쓰면, s명령으로 한 행씩 진행하면서 p명령으로 매번 변수 값이 어떻게 변경되었는지 확인을 쉽게 할 수 있다.

이 명령은, 어떠한 범위를 넘어가면 자동으로 변수를 나타내지 않는데...

음...예를 들자면... 어떠한 함수에 num이라는 변수를 display명령으로 출력했다고 하자.

이 함수가 리턴되고 main함수로 돌아간다면...num이라는 변수는 더 이상 출력되지 않는다는 것이다.

또한 더 이상 디스플레이 되지 않는 변수를 지우거나, 변수 값의 출력이 충분할 때에는

 

undisplay i

라는 명령을 사용하면 되겠다.

 

또한, display명령도 브레이크 포인트처럼, 활성화 비활성화 기능이 있으므로, undisplay를 사용하기 싫다면...잠깐 비활성화 시켜 놓아도 괜찮겠다.

 

enable display 3    : 디스플레이 번호 3번을 활성화 시키겠다..

disable display 4   : 디스플레이 번호 4번을 비활성화 시키겠다..



6. 스택 상태 검사

    명령어 : bt (backtrace) : 전체 스택 출력

    명령어 : info f (frame) : 스택의 정보 출력

    명령어 : info args : 함수가 호출 될 때 인자를 출력

    명령어 : info locals : 함수의 지역변수를 출력

 

이 명령은...일단 프로그램이 실행 중이어야 한다. 그렇지 않고 그냥 info f 를 한다거나 bt를 한다면 스택이 없다고 출력된다. 스택은 하나일 수도 있고, 여러 개 일수도 있다.

일단 bt 명령으로 전체 스택을 보면, 각 스택의 번호가 매겨져 있다.

여기서

 

frame 3

한다면... bt로 봤던 여러 스택 중, 3번 스택으로 이동하게 되겠다.

 

up

한다면... 한 단계 상위 스택 프레임으로 이동

 

down

한다면... 한 단계 하위 스택 프레임으로 이동 한다.



세그먼테이션 오류나 다른 기타 오류 등을 판별할 때, 스택의 상태를 검사해 봄으로써 해결 할 수 있는 경우가 많고, 스택프레임 정보에는 함수를 호출하거나 할 때 인자와 함께 리턴 어드레스가 들어가 있기 때문에 디버깅 시에 더 중요하다고 할 수 있다. 그래서 함수의 인자 값을 읽어봄으로써 함수가 제대로 호출되었는지 확인할 수 있고, 리턴 어드레스를 읽어봄으로써 어떤 함수의 어떤 부분에서 해당 함수를 호출 했는지 알 수 있다.

 


2009년 6월 23일 화요일

Redhat Linux 패키지 목록

Redhat Linux 패키지 목록

     패키지명                                                          설명                        

 

APM_Install-tools-1.0-1 Apache, PHP, MySQL 다양한 버전 최적화 설치툴
MAKEDEV-3.15-2 /dev 디렉토리에 속한 장치 파일들을 작성하는 데 쓰이는 프로그램
ORBit2-2.12.0-3 고성능 CORBA Object Request Broker
SULinux-release-1-0 SULinux 릴리즈 노트 등.
SysVinit-2.85-34.3 기초 시스템 프로세스를 관리하는 프로그램
acl-2.2.23-5 접근 제어 목록 유틸리티.
acpid-1.0.3-2 ACPI 이벤트 데몬
anacron-2.3-32 크론(cron)처럼 시스템이 다운 되었을때에도 작업을 계속 실행할 수 있게 하는 프로그램.
apmd-3.0.2-24 Advanced Power Management(APM) BIOS 유틸리티
ash-0.3.8-20 Bourne shell (sh)의 작은 버전.
aspell-0.50.5-3.fc3 맞춤법 검사
a spell-en-0.51-11 English dictionaries for Aspell.
at-3.1.8-78_EL4 작업 스풀링 도구들.
atk-1.8.0-2 액세스 가능 지원을 돕는 인터페이스.
attr-2.4.16-3 파일 시스템 확장 속성을 관리하는 유틸리티.
audit-1.0.3-6.EL4 User space tools for 2.6 kernel auditing.
audit-libs-1.0.3-6.EL4 Dynamic libra ry for libaudit
authconfig-4.6.10-rhel4.1 NIS와 섀도우 패스워드를 설정하는 텍스트 모드 도구.
autoconf-2.59-5 소스 코드를 자동적으로 설정하는데 쓰이는 GNU 도구.
autofs-4.1.3-155 파일 시스템을 자동으로 마운트하고 언마운트하는 도구.
automake-1.9.2-3 자동으로 Makefiles를 작성하는 GNU 도구.
basesystem-8.0-4 단순한 Red Hat Linux 시스템을 정의하는 skeleton 패키지.
bash-3.0-19.2 GNU Bourne Again 쉘 (bash).
bc-1.06-17.1 GNU의 bc (수치 처리 언어)와 dc (계산기).
beecrypt-3.1.0-6 공개 소스 암호화 라이브러리.
bind-9.2.4-2 A DNS (Domain Name System) server.
bind-libs-9.2.4-2 Libraries used by various DNS packag es
bind-utils-9.2.4-2 DNS 네임 서버들을 질의(query)하는 유틸리티.
binutils-2.15.92.0.2-15 바이너리 유틸리티의 GNU 모음.
bzip2-1.0.2-13.EL4.2 파일 압축 유틸리티.
bzip2-libs-1.0.2-13.EL4.2 bzip2를 사용하는 응용 프로그램에 사용되는 라이브러리.
caching-nameserver-7.3-3 캐싱 네임서버 설정
checkpolicy-1.17.5-1 SELinux 정책 컴파일러
chkconfig-1.3.13.2-1 /etc/rc*.d 디렉토리 계층을 관리하는 시스템 도구.
compat-libstdc++-296-2.96-132.7.2 Compatibility 2.96-RH standard C++ libraries
compat-libstdc++-33-3.2.3-47.3 Compatibility standard C++ libraries
comps-1.0-2 SUlinux의 Comps파일과 헤더리스트
convmv-1.08-3.EL 파일이름 에코딩
coreutils-5.2.1-31.2 GNU 핵심 유틸리티들
cpio-2.5-8.RHEL4 CNU 파일 저장(archiving) 프로그램.
cpp-3.4.4-2 C 전처리기(Preprocessor).
cracklib-2.7-29 암호 확인 라이브러리.
cracklib-dicts-2.7-29 표준 CrackLib 사전들.
crash-4.0-2 crash utility for live systems; netdump, diskdump, LKCD or mcore dumpfiles
crontabs-1.10-7 프로그램을 계획에 따라 실행할 때 사용되는 루트 crontab 파일.
cryptsetup-0.1-4 A utility for setting up encrypted filesystems
cups-libs-1.1.22-0.rc1.9.8 Common Unix Printing System - libraries
cvs-1 .11.17-8.RHEL4 A version control system.
cyrus-sasl-2.1.19-5.EL4 Cyrus SASL 라이브러리.
cyrus-sasl-md5-2.1.19-5.EL4 CRAM-MD5와 DIGEST-MD5는 Cyrus SASL을 지원합니다.
cyrus-sasl-plain-2.1.19-5.EL4 PLAIN과 LOGIN는 Cyrus SASL을 지원합니다.
db4-4.2.52-7.1 C 에 사용되는 Berkeley DB 데이터베이스 라이브러리.(버전 4)
dbus-0.22-12.EL.5 D-BUS message bus
dbus-glib-0.22-12.EL.5 GLib-based library for using D-BUS
desktop-file-utils-0.9-2 .desktop 파일을 수정하는 유틸리티
device-mapper-1.01.04-1.0.RHEL4 device mapper library
dhclient-3.0.1-12_EL DHCP 서버와 접속시키기 위한 개발용 헤더 파일들과 라이브러리들.
dhcp A DHCP (Dynamic Host Configuration Protocol) server and relay agent.
dhcp-devel Development headers and libraries for interfacing to the DHCP server
dhcpv6_client-0.10-8 DHCPv6 client
dialog A utility for creati ng TTY dialog boxes.
diffutils-2.8.1-12 GNU diff 유틸리티 모음
diskdumputils-1.1.9-4 diskdump utilities
dmraid-1.0.0.rc8-1_RHEL4_U2 dmraid (Device-mapper RAID tool and library)
dos2unix-3.1-21 텍스트 파일 포맷 변환기
dosfstools-2.8-15 Linux 상에서 MS-DOS FAT 파일 시스템을 만들고 검사하는 유틸리티들
dump-0.4b39-3.EL4.2 파일 시스템을 백업하고 복구하는 프로그램
e2fsprogs-1.35-12.2.EL4 ext2 파일 시스템을 관리하는 유틸리티
e2fsprogs-devel-1.35-12.2.EL4 Ext2 파일시스템용 정적 라이브러리와 헤더들
ed-0.2-36 GNU 라인 편집기
eject-2.0.13-11 소프트웨어 제어를 사용하여 이동 저장 매체를 자동으로 열리도록 하는 프로그램
e lfutils-0.97-5 컴파일된 객체를 처리하는 유틸리티 모음.
elfutils-libelf-0.97-5 ELF 파일을 읽고 쓰는데 사용되는 라이브러리.
ethtool-1.8-4 PCI 이더넷 카드에 사용되는 이더넷 설정 도구
expat-1.95.7-4 XML 을 파싱하는 라이브러리
expat-devel Libraries and include files to develop XML applications with expat.
fbset -2.1-17 프레임 버퍼의 비디오 모드 등록 정보를 관리하는 도구들.
file-4.10-2 파일 종류를 결정하는 유틸리티.
filesystem-2.3.0-1 Linux 시스템에 사용되는 기본 디렉토리 레이아웃.
findutils-4.1.20-7 찾기 유틸리티(find 와 xargs)의 GNU 버전.
flex-2.5.4a-33 스캐너(텍스트 패턴 인식기들)를 작성하는 도구.
fontconfig-2.2.3-7 글꼴 설정과 사용자 정의 라이브러리
freetype-2.1.9-1 자유롭고 이동가능한 TrueType 글꼴 표현 엔진.
freetype-demos-2.1.9-1 FreeType 데모 모음.
freetype-devel-2.1.9-1 FreeType을 개발하는데 쓰이는 헤더 파일들과 정적 라이브러리.
freetype-utils-2.1.9-1 TrueType 글꼴들을 조작하고 시험하는 유틸리티들.
ftp-0.17-22 표준 유닉스 FTP (파일 전송 프로토콜) 클라이언트 .
gamin-0.1.1-3.EL4 Library providing the FAM File Alteration Monitor API
gawk-3.1.3-10.1 awk 텍스트 프로세싱 유틸리티의 GNU 버전.
gcc-3.4.4-2 CNU cc 와 gcc C 컴파일러들.
gcc-c++-3.4.4-2 CNU gcc 컴파일러에 사용되는 C++ 지원.
gdbm-1.8.0-24 확장 가능 해싱을 사용하는 데이타 베이스 루틴들의 GNU 세트.
gettext-0.14.1-13 다양한-언어 메세지들을 만들어내는 GNU 라이브러리들과 유틸리티들.
glib-1.2.10-15 GDK, GTK+ 와 많은 응용 프로그램에 사용되는 기능이 모인 라이브러리.
glib2-2.4.7-1 유용한 유틸리티 기능을 모은 라이브러리.
glib2-devel The GIMP ToolKit (GTK+) and GIMP Drawing Kit (GDK) support library
glibc-2.3.4-2.13 GNU libc 라이브러리.
glibc-common-2.3.4-2.13 glibc에 사용되는 일반 바이너리와 로케일 자료
glibc-devel-2.3.4-2.13 정규 C 라이브러리를 사용한 개발에 사용되는 헤더와 객체 파일들.
glibc-headers-2.3.4-2.13 Header files for development using standard C libraries.
glibc-kernheaders-2.4-9.1.98.EL glibc에 의해 사용될 Linux 커널의 헤더 파일들
gmp-4.1.4-3 GNU 임의의 정확도 라이브러리.
gmp-devel-4.1.4-3 GNU MP 임의 정밀도 라이브러리에 사용되는 개발용 도구들.
gnupg-1.2.6-1 의사 소통과 데이타 저장을 안전하게 하는 GNU 유틸리티.
gpm-1.20.1-66 리눅스 콘솔에 사용되는 마우스 서버.
grep-2.5.1-31 grep 패턴 맞추기 유틸리티의 GNU 버전.
groff-1.18.1. 1-3 문서 포맷시키는 시스템.
grub-0.95-3.5 GRUB - 중요 통합 부트 로더.(Grand Unified Boot Loader)
gzip-1.3.3-15.rhel4 GNU 데이터 압축 프로그램.
hal-0.4.2-1.EL4 Hardware Abstraction Layer
hdparm-5.7-2 하드 디스크 파라미터들을 보여주고 설정하는 유틸리티.
hesiod-3.0.2-30 Hesiod 라이브러리와 단순 프로그램들.
ho tplug-2004_04_01-7.6 USB 장치들을 위해 모듈들을 로딩하는 도우미 응용 프로그램.
hwdata-0.146.12.EL-1 하드웨어 식별 자료.
imap imap-devel info A stand-alone TTY-based reader for GNU texinfo documentation.
info-4.7-5 GNU texinfo 문서에 사용되는 독립형 TTY-기반 브라우저 프로그램.
initscripts-7.93.20.EL -1.4  
iproute-2.6.9-3 어드밴스 IP 라우팅과 네트워크 장치 설정 도구들.
ipsec-tools-0.3.3-6 Tools for configuring and using IPSEC
iptables-1.2.11-3.1.RHEL4 Linux 커널 패킷 필터링 능력을 관리하는 도구들.
iptstate-1.3-4 A top-like display of IP Tables state table entries
iputils-200 20927-18.EL4.1 ping을 포함한 네트워크 모니터링 도구들
jfbterm-0.4.6-han 프레임버퍼를 이용하여 콘솔에서 사용자가 다국어(CJK)를 볼 수 있게 해 줍니다.
jwhois-3.2.2-6.EL4.1 인터넷 whois/nicname
jwhois-3.2.2-6.EL4.1 인터넷 whois/nicname 클라 이언트
kbd-1.12-2 콘솔 설정에 필요한 도구 (키보드, 가상 터미널 등)
kernel the linux kernel (the core of the linux operating system)
kernel-2.6.9-22.0.1.EL Linux 커널 (Linux 운영 체제의 핵심).
kernel-2.6.9-22.EL  
kernel-hugemem kernel-smp The Linux kernel compiled for SMP machines.
kernel-utils-2.4-13.1.69 커널과 하드웨어 관련 유틸리티들
krb5-devel -1.3.4-17 Kerberos 5 프로그램을 컴파일하는데 필요한 개발용 파일.
krb5-libs-1.3.4-17 Kerberos 5에서 사용되는 공유 라이브러리.
krb5-workstation-1.3.4-17 워크 스테이션에서 사용될 Kerberos 5 프로그램들.
kudzu-1.1.95.15-1 Red Hat Linux 하드웨어 추적 도구.
kudzu-devel Development files needed for hardware pro bing using kudzu.
less-382-4 텍스트 파일 브라우저는 more와 비슷하지만 추가 기능을
lftp-3.0.6-3 고성능 파일 전송 프로그램
lha-1.14i-17 LHarc 포맷 저장에 사용되는 기록과 압축 유틸리티.
libIDL-0.8.4-1 IDL (인터페이스 정의 언어)를 구문 분석하는 라이브러리
libacl-2.2.23-5 접근 제어 목록 지원에 사용되는 동적 라이브러리.
libart_lgpl-2.3.16- 3 libgnomecanvas에 의해 사용되는 그래픽 루틴 라이브러리
libattr-2.4.16-3 확장 속성 지원에 사용되는 동적 라이브러리.
libbonobo-2.8.0-2 Bonobo 구성요소 시스템
libc-client-2002e-14 C-client mail access routines for IMAP and POP protocolslibc-client-devel-2002e-14
libcap-1.10-20 POSIX.1e 능력을 가져오고 설정하는데 사용되는 라이브러리.
libgcc-3.4.4-2 GCC 버전 3.0 공유 지원 라이브러리.
libgcrypt-1.2.0-3 A general-purpose cryptography library.
libgpg-error-1.0-1 libgpg-error
libjpeg-6b-33 JPEG 이미지 포맷 파일들을 조작하는데 쓰이는 라이브러리.
libjpeg-devel-6b-33 libjpeg 라이브러리를 사용할 프로그램에 사용되는 개발용 도구들.
libpcap-0.8.3-10.RHEL4 사용자-단계 패킷 캡쳐에 사용되는 시스템-독립 인터페이 스.
libpng-1.2.7-1 PNG 이미지 포맷 파일들을 조작하는 기능들의 라이브러리.
libpng-devel-1.2.7-1 PNG 포맷 파일들을 조작하는데 필요한 개발용 도구들.
libselinux-1.19.1-7 SELinux library and simple utilities
libsepol-1.1.1-2 SE Linux binary policy manipulation library
libstdc++-3.4.4-2 GNU 표준 C++ 라이브러리 v3.
libstdc++-devel-3.4.4-2 C++ 개발에 필요한 헤더 파일들과 라이브러리들.
libtermcap-2.0.8-39 termcap 데이타베이스에 접근하는데 사용되는 기초 시스템 라이브러리.
libtiff-3.6.1-8 TIFF 포맷 이미지 파일들에 사용되는 기능들의 라이브러리.
li btool-1.5.6-4.EL4.1 GNU libtool은 공유 라이브러리의 이용을 간소화합니다.
libtool-libs-1.5.6-4.EL4.1 GNU libtool에 사용되는 런타임 라이브러리들.
libusb-0.1.8-3  
libusb-0.1.8-3 사용자공간이 USB 장치들에 접근할 수 있도록 해주는 라이브러 리.
libuser-0.52.5-1 사용자와 그룹 계정 관리 라이브러리.
libwvstreams-3.75.0-2 WvStreams는 C++로 작성된 네트워크 프로그래밍 라이브러리입니다.
libxml2-2.6.16-6 XML 과 HTML 지원을 제공하는 라이브러리.
libxml2-devel-2.6.16-6 XML 과 HTML 응용 프로그램들을 개발하는 데 필요한 라이 브러리들과 기타 등등의 포함물들.
libxml2-python-2.6.16-6 libxml2 라이브러리에 사용되는 Python 바인딩
libxslt-1.1.11-1 XSLT 지원을 제공하는 라이브러리.
lksctp-tools-1.0.2-6.4E.1  
lockdev-1.0.1-6.1 장치들을 잠그는데 사용되는 라이브러리.
logrotate-3.7.1-5.RHEL4 시스템 로그 파일들을 회전시키고, 압축하고, 제거하며 메일로 보냄.
logwatch-5.2.2-1.EL4.1 로그 파일 분석 프로그램.
lrzsz-0.12.20-19 lrz 와 lsz 모뎀 의사 소통 프로그램들.
lsof-4.72-1.1 리눅스/유닉스 시스템상에서 오픈 파일들의 목록을 작성하는 유틸리티.
lvm2-2.01.14-2.0.RHEL4 Userland logical volume management tools
m4-1.4.1-16 GNU 매크로 프로세서.
mailcap-2.1.17-1 특정 파일 형태들과 도움말 응용 프로그램들을 결합시킴.
mailx-8.1.1-33 신속한 이메일 메시지 보내기에 사용되는 /bin/mail 프로그램.
make-3.80-5 사용자들을 위해 개발 과정을 단순화해주는 GNU 도구.
man-1.5o1-9 문서 도구들 세트
man-pages-1.67-7.EL4 Linux 문서화 프로젝트의 Man (메뉴얼) 페이지들.
man-pages-ko-1.48-14 Linux 문서화 프로젝트의 한국어 man 페이지들.
mdadm-1.6.0-2 mdadm는 Linux md 장치 (소프트웨어 RAID 배열)을 제어합니다.
mgetty-1.1.31-2 데이타와 팩스 모뎀과 상용하기 위한 getty 대체.
mingetty-1.07-3 가상 콘솔만에 사용되는 컴팩트 getty 프로그램.
minicom-2.00.0-19 텍스트-기본 모뎀 제어와 터미널 에뮬레이션 프로그램.
mkbootdisk-1.5.2-1  
mkinitrd-4.2.1.6-1 모쥴들을 프리로딩하기 위한 초기 ramdisk 이미지를 작성함.
mktemp-1.5-20 /tmp 파일들을 안전하게 만드는 작은 유틸리티.
module-init-tools-3.1-0.pre5.3 Kernel module management utilities.
mt-st-0.8-1 테이프 드라이브를 제어하는데 사용되는 도구.
mtools-3.9.9-9 디스켓을 장착할 필요없이 MS-DOS 디스켓에 접근하게 해주는 프로 그램들.
mtr-0.54-10 네트워크 진단 도구.
mutt A text mode mail user agent.
nano-1.2.4-1 A small text editor
nc-1.10-22 TCP 혹은 UDP를 사용한 네트워크 접속에 데이터를 읽고 씀.
ncurses-5.4-13 CRT 화면 처리와 최적화 패키지.
ncurses-devel-5.4-13 ncurses를 사용하는 응용 프로그램들 개발에 필요한 개발용 파일들.
net-snmp-libs-5.1.2-11.EL4.6 The NET-SNMP runtime libraries.
net-tools-1.60-37.EL4.6 기본 네트워크 도구들.
netconfig-0.8.21-1.1 이더넷 장치의 단순 설정에 사용되는 텍스트-기반 도구.
netdump-0.7.7-3 네트워크 커널 메세지 로그인과 크래시 버리기에 사용되는 클라이언트 셋업
newt-0.51.6-5 텍스트 모드 사용자 인터페이스에 대한 개발용 라이브러리.
nfs-utils-1.0.6-65.EL4 NFS 유틸리티들과 커널 NFS 서버에 사용되는 지원 데몬들.nscd-2.3.4-2.13
nscd A Name Service Caching Daemon (nscd).
nss_db-2.2-29 Berkeley 데이타베이스(DB)에 사용되는 NSS 라이브러리.
nss_ldap-226-10 LDAP에 사용되는 NSS 라이브러리와 PAM 모듈.
ntsysv-1.3.13.2-1 runlevel에서 시스템 서비스의 멈춤/시작을 설정하는 도구.
numactl-0.6.4-1.13 library for tuning for Non Uniform Memory Access machines
openldap-2.2.13-4 OpenLDAP에 사용되는 설정 파일들, 라이브러리들과 문서.
openssh-3.9p1-8.RHEL4.9 SSH 프로토콜 버전 1과 2의 OpenSSH 실현.
openssh-clients-3.9p1-8.RHEL4.9 OpenSSH 클라이언트.
openssh-server-3.9p1-8.RHEL4.9 OpenSSH 서버 데몬.
openssl The OpenSSL toolkit.
openssl-0.9.7a-43.4 OpenSSL 도구키트.
openssl-devel-0.9.7a-43.4 OpenSSL과 함께 사용될 응용 프로그램들을 개발하는데 필요한 파일들.
pam-0.77-66.13 응용 프로그램들에 사용자 인증을 제공하는 보안 도구.
pam-devel Files needed for developing PAM-aware applications and modules for PAM.
pam_ccreds Pam module to cache login credentials
pam_krb5-2.1.8-1 Kerberos 5에 사용되는 Plugggable Authentication Module (PAM).
pam_passwdqc-0.7.5-2 Pluggable password quality-control module.
pam_smb-1.1.7-5 SMB 서버들과 함께 사용되는 Pluggable Authentication Module (PAM).
parted-1.6.19-1.EL GNU 디스크 파티션 조작 프로그램.
passwd-0.68-10.1 PAM을 이용하여 암호를 설정/변경하는 암호 유틸리티.
patch-2.5.4-20 파일들을 수정/업그레이드하는데 쓰이는 GNU 패치 명령.
pax-3.0-9 파일 기록 도구.
pciutils-2.1.99.test8-3.1 PCI 버스 관련 유틸리티들.
pciutils-devel Linux PCI development library.
pcre-4.5-3.2.RHEL4 펄-호환가능 정규식 라이브러리.
pdksh-5.2.14-30.3 Korn 쉘 (ksh)의 공개 도메인 복제복.
perl-5.8.5-16.RHEL4 펄 프로그래밍 언어.
perl-Digest-HMAC Digest-HMAC Perl module
perl-Digest-SHA1 Digest-SHA1 Perl module
perl-Filter-1.30-6 Filter 펄 모듈
perl-HTML-Parser A Perl module for parsing HTML.
perl-HTML-Tagset HTML
perl-Net-DNS Net-DNS Perl module
perl-Time-HiRes A Perl module for precise time measurements.
perl-URI A Perl module implementing URI parsing and manipulation.
pkgconfig A tool for determining compilation options.
policycoreutils-1.18.1-4.7 SELinux policy core utilities.
popt-1.9.1-11_nonptl 명령행 파라미터들을 파싱하는 C 라이브러리.
portmap-4.0-63 RPC 접속을 관리하는 프로그램.
prelink-0.3.3-0.EL4 ELF 프리링킹 유틸리티.
procmail-3.22-14 procmail 메일 프로세싱 프로그램.
procps-3.2.3-8.2 시스템과 프로세스 모니터링 유틸리티들.
psacct-6.3.2-35.rhel4 프로세스 활동을 모니터하는 유틸리티들.
psmisc-21.4-4 여러분의 시스템 상 프로세스들을 관리하는 유틸리티.
pyOpenSSL-0.6-1.p23 OpenSSL 라이브러리를 감싸는 파이썬 래퍼 모듈
python-2.3.4-14.1 해석된, 상호 대화식의 객체 지향 프로그래밍 언어.
python-elementtree-1.2.6-4 Fast XML parser and writer
python-sqlite-1.1.6-1 Python bindings for sqlite.
python-urlgrabber-2.9.6-2 A high-level cross-protocol url-grabber
pyxf86config-0.3.19-1 libxf86config에 사용되는 파이썬 래퍼(Python wrapper)
quota-3.12-5 사용자의 디스켓 사용량을 모니터하는 시스템 관리 도구들.
rdate-1.4-2 원거리 기계로 부터 날짜/시간을 가져오는 도구.
rdist-6.1.5-38.40.1 파일의 동일한 복사본들을 여러 기계상에 보존.
readline-4.3-13 입력된 명령행들을 편집하는 라이브러리.
redhat-logos-1.1.26-1.SULinux Red Hat 관련 아이콘들과 사진들.
rhnlib-1.8.1-1.p23.1 Red Hat Network에 사용되는 파이썬(Python) 라이브러리.
rhpl-0.148.3-1 Red Hat Linux 프로그램이 사용하는 파이썬(Python) 코드 라이브러리.
rmt-0.4b39-3.EL4.2 특정 프로그램들이 원거리 테잎 장치들에 접근할 수 있게 해줍니다.
rootfiles-8-1 루트 사용자의 디렉토리에 기본적으로 필요한 파일들.
rpm-4.3.3-11_nonptl RPM 패키지 관리 시스템.
rpm-build-4.3.3-11_nonptl 패키지 개발에 사용된 스크립트와 실행가능한 프로그램들.
rpm-libs-4.3.3-11_nonptl Libraries for manipulating RPM packages.
rpm-python-4.3.3-11_nonptl RPM 패키지들을 조작하는 응용 프로그램들에 대한 Python 바인딩.
rsync-2.6.3-1 파일들을 네트워크 상에서 동기화하는 프로그램.
samba The Samba SMB server.
samba-client Samba (SMB) client programs.
samba-common Files used by both Samba servers and clients.
samba-swat The Samba SMB server configuration program.
schedutils-1.4.0-2 Utilities for manipulating process scheduler attributes
sed-4.1.2-4 GNU 스트림 텍스트 편집기.
selinux-policy-targeted-1.17.30-2.110 SELinux targeted policy configuration
sendmail-8.13.1-2 널리 사용되는 메일 전송 에이전트 (MTA).
sendmail-cf The files needed to reconfigure Sendmail.
setarch-1.6-1 Personality setter
setools-1.5.1-5 SELinux tools for managing policy
setserial-2.17-17 시리얼 포트를 설정하는 유틸리티.
setup-2.5.37-1.3 시스템 설정과 셋업 파일들 모음.
setuptool-1.17-2 텍스트 모드 시스템 설정 도구.
shadow-utils-4.0.3-58.RHEL4 계정들과 섀도우 패스워드 파일들을 관리하는 유틸리티.
shared-mime-info-0.15-10 Shared MIME information database
slang-1.4.9-8 S-Lang 확장 언어에 사용되는 공유 라이브러리.
slocate-2.7-13.el4.6 중앙 데이타베이스를 통하여 시스템 상에서 파일을 찾습니다.
spamassassin Spam filter for email which can be invoked from mail delivery agents.
specspo-9.0.92-1.3 Red Hat 패키지 설명, 요약과 그룹들.
sqlite-3.2.2-1 Library that implements an embeddable SQL database engine
squid The Squid proxy caching server.
ssu 수퍼유저코리아 서버관리 유티리티
statserial-1.1-35 시리얼 포트 모뎀 선들의 상태를 보여주는 도구.
stunnel-4.05-3 SSL 암호화 소켓 래퍼(wrapper).
sudo-1.6.7p5-30.1.3 특정 사용자들에 대해 제한된 루트 접속을 허용함.
sulinux-yumconf symlinks A utility which maintains a system's symbolic links.
symlinks-1.2-22 시스템의 심볼릭 링크들을 관리하는 유틸리티.
sysklogd-1.4.1-26_EL 시스템 로그인과 커널 메세지 트래핑 데몬.
syslinux-2.11-1 FAT 파일시스템에서 부팅하는 단순 커널 로더.
sysreport-1.3.15-5 시스템 하드웨어와 설정 정보를 모읍니다.
system-config-network-tui-1.3.22-1 The NEtwork Adminstration Tool
system-config-securitylevel-tui-1.4.19.2-1 A text interface for modifying the system security level
tar-1.14-8.RHEL4 GNU 파일 저장 프로그램.
tcp_wrappers-7.6-37.2 TCP 데몬에 사용되는 wrapper로서 활동하는 보안 도구.
tcpdump-3.8.2-10.RHEL4 네트워크 소통량 감시 도구.
tcsh-6.13-9 C 쉘인 csh의 강화된 버전.
telnet-0.17-31.EL4.3 텔넷 원격 로그인 프로토콜에 사용되는 클라이언트 프로그램.
termcap-5.4-3 특정 응용 프로그램들에 의해 사용되는 터미널 기능 데이터베이스.
time-1.7-25 프로그램이 시스템 자원 사용량을 감시하는 GNU 유틸리티.
tmpwatch-2.9.1-1 마지막 접근 날짜에 따라 파일을 제거하는 유틸리티.
traceroute-1.4a12-24 TCP/IP 네트워크 상 패킷이 지나간 경로 탐색
tzdata-2005m-1.EL4 Timezone data
udev-039-10.10.EL4 A userspace implementation of devfs
unix2dos-2.2-24.1 Unix에서 DOS 텍스트 파일 포맷으로 변환기.
unzip-5.51-7 zip 파일들을 여는 유틸리티.
usbutils-0.11-6.1 Linux USB 유틸리티.
usermode-1.74-1 특정 사용자 계정 관리 작업들에 사용되는 도구들.
utempter-0.5.5-5 utmp/wtmp 업데이트에 사용되는 특권이 있는 도우미 프로그램.
util-linux-2.12a-16.EL4.12 기본 시스테 유틸리티들의 집합.
vconfig-1.8-4 Linux 802.1q VLAN 설정 유틸리티
vim-common-6.3.046-0.40E.7  
vim-enhanced-6.3.046-0.40E.7  
vixie-cron-4.1-36.EL4 지정된 시간에 특정 프로그램들을 실행시키는 Vixie cron 데몬.
vsftpd vsftpd - Very Secure Ftp Daemon
wget-1.10.2-0.40E HTTP 나 FTP 프로토콜을 사용하여 파일들을 검색하는 유틸리티.which-2.16-4
which Displays where a particular program in your path is located.
words-3.0-3 /usr/share/dict 디렉토리에 사용되는 영어 단어 사전.
xinetd-2.3.13-4.4E.1 inetd의 보안 대체.
xmlsec1-1.2.6-3 Library providing support for "XML Signature" and "XML Encryption" standards
xmlsec1-openssl-1.2.6-3 OpenSSL crypto plugin for XML Security Library
xorg-x11-Mesa-libGL-6.8.2-1.EL.13.20 A 3D graphics library which uses an OpenGL-like API
xorg-x11-libs-6.8.2-1.EL.13.20 Shared libraries needed by the X Window System
yp-tools-2.8-7 NIS (혹은 YP) 클라이언트 프로그램.
ypbind-1.17.2-3 NIS 클라이언트를 NIS 도메인에 바인드 해주는 NIS 데몬.
ypserv-2.13-5 NIS(Network Information Service) 서버.
yum-2.4.0-1.SULinux RPM 설치/업데이터
zip-2.3-27 PKZIP과 호환이 되는 파일 압축과 패키징 유틸리티.
zlib-1.2.1.2-1.2 zlib 압축과 압축 풀기 라이브러리.
zlib-devel-1.2.1.2-1.2 Zlib 개발에 사용되는 헤더 파일들과 라이브러리들.

 


2009년 6월 19일 금요일

솔라리스 어드민


▒ 솔라리스 어드민

1부. 솔라리스 소개

1. 유닉스 정의

유닉스는 1969년에 벨 연구소에서 인터랙티브 시분할 시스템으로서 만든 것이 그 시초가 된 운영체계이다. 켄 톰슨과 데니스 리치가 유닉스의 창시자로 알려져 있다. 유닉스라는 이름은 그 이전의 시스템인 멀틱스에 기반을 두고 지은 일종의 말장난이었다. 1974년에 유닉스는 C 언어로 쓰여진 최초의 운영체계가 되었다. 유닉스는 여러 회사들이나 대학 및 개인들에 의해 많은 확장판과 새로운 아이디어들이 다양한 버전의 유닉스에 추가됨으로써, 대형 프리웨어 제품의 한 종류로 진화하였다. 유닉스는 앞서가는 특정 컴퓨터 회사들에 의해 소유된 독점적인 운영체계가 아니었다는 것과, 또 그것이 표준 프로그래밍 언어로 작성되고, 대중적인 많은 아이디어를 받아들였다는 이유 때문에, 누구에 의해서도 개선되고 강화될 수 있는 최초의 개방형 표준 운영체계가 되었다. 다양한 버전의 유닉스로부터 나온 C 언어와 쉘 인터페이스의 복합체는 IEEE의 찬조 하에서 POSIX로 표준화되었다. POSIX 인터페이스들은 번갈아 가며, X/Open 프로그래밍 가이드 4.2 ("단일 유닉스 규격"과 "유닉스95"로 알려져 있다)에 명기되었다. 단일 유닉스 규격의 버전2는 유닉스98로도 알려져 있다. 유닉스의 공식적인 등록상표는 현재 산업표준기구인 오픈 그룹이 소유하고 있으며, 유닉스 관련 제품들의 인증과 상표부여 등을 관장하고 있다.
유닉스 운영체계는 널리 판매된 썬마이크로시스템즈(Solaris), 실리콘그래픽스(IRIX), IBM(AIX), 그리고 그 외 많은 회사들의 워크스테이션 제품들에서 사용된다. 유닉스 환경과 클라이언트/서버 프로그램 모델은 인터넷 개발과 네트워크 중심의 컴퓨팅 국면을 새로이 하기 위한 중요한 요소였다. 유닉스에서 파생하여, 현재 무료 소프트웨어와 상용버전이 모두 존재하는 리눅스는 독점 운영체계의 대안으로서 명성을 더해가고 있다.

2. 유닉스의 특징

- 멀티태스킹과 멀티유저 지원
- 용이한 이식성
- 계층적 파일 시스템 구조 (Hierarchical File System)
- Security 및 Protection 기능
- 입출력의 방향 전환 및 파이프 기능
- 확장성과 조직성이 풍부한 Shell
- 각종 Special Devices의 독립성
- 유연성 있는 커뮤니케이션을 할 수 있는 운영체제
- 언어 및 유틸리티가 다양하여 프로그램 개발이 용이

3. UNIX의 구성요소

1) Kernel : Unix의 핵이며 File system, Device, Memory, Process 관리.
2) Shell : Command Interpreter로 사용자와 커널간의 인터페이스 역할과 명령을 해석.
3) File System (Directory Tree)
파일 시스템은 커널이 데이터를 관리하기 위한 파일 또는 디렉터리의 관리 구조이다.

4. UNIX의 종류

- Sun OS : 썬 마이크로시스템즈에서 제공하는 BSD 계열의 UNIX
- Solaris : 썬 마이크로시스템즈에서 제공하는 System V 계열의 UNIX
- HP/UX : HP의 UNIX 시스템은 OSF/1(Open Software Foundation)의 여러 특징을 도입한 System V의 변형된 형태
- AIX : IBM에서 System V release 4의 4.4 BSD 버전과 OSF/1을 기반으로 만들어낸 UNIX
- Digital UNIX: OSF그룹에서 System VR3과 4.3 BSD버전을 결합시키고 OSF/1을 기반으로 발전된 DEC(현재 Compaq)의 UNIX
- IRIX : 실리콘 그래픽스에서 BSD와 System V계열의 UNIX를 기반으로 만들어진 UNIX

5. Solaris OS

4.2 버전까지 BSD를 만들던 버클리의 빌 조이가 썬 마이크로시스템즈로 옮겨가서 만든 것이 SUN OS이며 썬 마이크로시스템즈가 AT&T의 System V release 4.0의 라이선스를 받아 만든 것이 Solaris이다.

1) 버전간의 관계
Solaris 2.x = Sun OS 5.x + Open Windows + ONC+(Open Network Computing: NFS, NIS, NIS+등)
Solaris 7 = Sun OS 5.7 + Open Windows, CDE(Common Desktop Env) + ONC+(Open Network Computing: NFS, NIS, NIS+등)
Solaris 8 = Sun OS 5.8 + OpenWindows, CDE(Common Desktop Env) + ONC+(Open Network Computing: NFS, NIS, NIS+등)
Solaris 9 = Sun OS 5.9 + OpenWindows, CDE(Common Desktop Env) + ONC+(Open Network Computing: NFS, NIS, NIS+등)

2) 장비 별 지원 OS 버전

SunOS 5.x = Solaris 2.x
Sun dropped the "2." when Solaris (2.)7 came out.
I.e. Solaris 7 = "Solaris 2.7" = SunOS 5.7,
Solaris 8 = "Solaris 2.8" = SunOS 5.8 and so on.

Sun2: SunOS 4.0.3 or earlier.
Sun386i: SunOS 4.0, 4.0.1, 4.0.2 only.
Sun3: SunOS 4.1.1 or earlier.
4/100, 4/200 series: SunOS 3.2, SunOS 4.0 through 5.4
4/300 series: SunOS 4.0.3 through 5.4
4/400 series: SunOS 4.1PSR_A through 5.4
600 models 120, 140: SunOS 4.1.2 through 5.5.1
600 model 41, 51: SunOS 4.1.3 through 5.5.1
SPARCstation 1, 1+, SLC, IPC: SunOS 4.0.3 through 5.7
SPARCstation 2, ELC, IPX: SunOS 4.1.1 through 5.7
SPARCstation 4: SunOS 4.1.4 or later.
SPARCstation 5: SunOS 4.1.3_U1B or later.
SPARCstation 10 models 20, 30, 40, 41, 51, 61, 71: SunOS 4.1.3 or later.
SPARCstation 20 models 50, 51, 61, 71: SunOS 4.1.3_U1B or later.
SPARCstation 20 model HS11, HS21, 151: SunOS 4.1.4 or later.
SPARCclassic, SPARCstation LX: SunOS 4.1.3C or later.
SPARCstation Voyager: Solaris 2.3 edition II or later.
Ultra 1 model 140, 170: Solaris 2.5 or later.
Ultra 1 model 140E, 170E, 200E: Solaris 2.5.1 or later.
Ultra 2: Solaris 2.5.1 or later.
Ultra 5, 10, 30, 60, 250, 450: Solaris 2.5.1HW1297 or Solaris 2.6HW0398 or later.
Ultra Enterprise: Solaris 2.5.1 or later.
SunBlade 100, SunBlade 1000, SunFire 280R: Solaris 8HW1000 or later.
SunFire 3800, 4800, 4810, 6800: Solaris 8HW0401 or later.

- OS 버전의 확인
# uname -a
SunOS sonamu 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-1

- 솔라리스 정보
솔라리스 9
http://kr.sun.com/products/software/os_platforms/solaris/index.html
솔라리스 8
http://kr.sun.com/products/software/os_platforms/solaris/8/index.html
전체 버전 간의 차이 비교
http://wwws.sun.com/software/solaris/fcc/fcc.html
솔라리스 x86(Intel) 하드웨어 호환 리스트(HCL)
http://www.sun.com/bigadmin/hcl/


6. SUN & Solaris 관련 사이트

1) 썬 관련 레퍼런스 (추천)
http://www.stokely.com/unix.sysadm.resources/faqs.sun.html

2) 썬 공식 도큐먼트
http://docs.sun.com
http://www.sun.com/bigadmin/ (BigAdmin System Administration Portal)

3) SUN관련 FAQ
http://www.science.uva.nl/pub/solaris/solaris2.html (Solaris2 FAQ)
http://www.mreriksson.net/faqs/solaris8/ (Ola Eriksson's FAQ for Sun Solaris )
http://wks.uts.ohio-state.edu/sun/faqs/s86faq.html ( Intel FAQ)
http://item-hunter.com/~chang/src/lecture/faq/sol2faq.html (한글)
http://hawk.com.kyungnam.ac.kr/~opti21/unix/faq/index.html (han.comp.sys.sun FAQ 한글)

4) Sun Managers Summaries & Archives Search
http://www.sunmanagers.org ( 공식 홈페이지)
http://www.sunmanagers.org/archives.html ( 아카이브 리스트)
http://www.latech.edu/sunman-search.html ( 아카이브 검색)
http://news.google.co.kr ( 모든 뉴스 그룹 검색)

5) 장비 관련
http://sunsolve.sun.com/handbook_pub/Systems/ ( SUN 시스템 핸드북)
http://sunsolve.sun.com/handbook_pub/Devices/ ( SUN 부붐별 핸드북)


2부. 솔라리스의 접근과 사용자 관리

1. 시스템의 접근

1) Consol로 직접 로그인과 telnet, rsh, ssh (Shell 사용), Xmanager(Windows 사용) 등의 원격 로그인
- telnet : 이 기종간의 시스템 접근 가능 ( Port 23)
- rsh : Unix 기종간의 시스템 접근 가능
- ssh: Unix 기종간의 시스템 접근 가능 (보안쉘, Port 22)
http://www.openssl.org
http://www.openssh.org

2) 시스템 사용자: root와 일반 사용자
root: 슈퍼유저, 시스템 어드민, 초기 설치 시 패스워드 결정, 모든 권한, 기본쉘은 /sbin/sh
일반유저: 일반사용자.

3) 관련 파일
/etc/passwd 파일
user1:x:102:10:User Account 1: /export/home/user1:/bin/ksh
/etc/shadow 파일
user01:haN3NqcDfof.2:::::::
/etc/group 파일
other::1:user01,user02

4) 사용자 관리
/usr/bin/passwd 명령 : 자신의 패스워드 변경 (일반 유저), 다른 사용자의 패스워드 변경(root)
* 패스워드 생성 규칙(일반유저)
- 6~8 문자
- 두 개의 알파벳과 하나의 특수문자 또는 숫자 포함
- 로긴 이름과 다르게
- 변경 전 패스워드와 다르게
- 공백을 포함할 수 있다.

/usr/sbin/groupadd 명령 : 그룹을 생성 ( GID는 100 ~ 60000 번까지)
ex) # groupadd -g 100 class1

/usr/sbin/useradd 명령 : 유저를 생성 ( UID는 100 ~ 60000 번까지)
ex) # useradd -u 501 -g 100 -d /export/home/user01 -m -c "User Account 1" -s /bin/ksh user01

/usr/sbin/groupdel 명령 : 그룹을 제거
ex) # groupdel class1

/usr/sbin/userdel 명령: 유저를 제거
ex) # userdel [-r] user01

/usr/sbin/usermod, /usr/sbin/groupmod 는 수정 시 사용

* 어드민 GUI 툴 : 사용자, 그룹, 호스트, 프린터, 직렬포트, 소프트웨어, 14(sysadmin) 그룹은 사용가능.
/usr/bin/admintool


3부. 사용자 기본 명령

사용자 기본명령은 다음을 참고한다.
http://www.gohtml.pe.kr/lec/unix1.html
http://unix.co.kr/data/solaris/?p=16
http://whoami21.com/~kimlee/telnet1.htm
http://www.hwaseong.ms.kr/unix1.htm

1. 정보 출력

1) 시스템 이름 및 OS버전 확인
$ uname -a
$ cat /etc/release (=> OS의 릴리즈 확인)

2) 현재 로그인한 사용자 정보
$ who (/var/adm/utmpx)

3) 최근 로긴했던 사용자 정보 + 재 부팅 정보
$ last (/var/adm/wtmpx)
$ last user01
$ last reboot

4) 프로세스 정보
$ ps -ef | grep netscape
$ pgrep netscape (solaris 8부터)

5) 날짜 및 시간 출력
$ date
$ cal

6) 맨 페이지
$ man man
$ man -k calendar
cf. # catman -w (관리자 root가 실행)
$ man -s5 man (5 section manual)

- Section Definition -
관련 파일: /usr/share/man/man.cf, /usr/share/man/entities/*
1: User Commands
1M: System Administration Commands
2: System Calls
3: Basic Library Functions
4: File Formats
5: Standards, Environments and Macros
6: Demos
7: Device and Network Interfaces
9: Device Driver Interfaces

- 맨페이지 위치
/usr/share/man/
/usr/openwin/man/
/usr/dt/man

- 맨페이지 추가
# vi /etc/profile
...
MANPATH=/usr/share/man:/usr/openwin/man:/usr/dt/man:<추가할 맨페이지 디렉토리>
export MANPATH

2. 파일과 디렉토리 접근

주의 - 파일과 디렉토리, 명령 등은 모두 대소문자를 구별한다.

1) 패스이름
- 절대경로(Absolute Path Name) : root(/)를 기준으로 기술, /usr/local/src/file1
- 상대경로(Relative Path Name) : 현재 디렉터리를 기준으로 .또는 ..으로 기술, dir1/subdir1/file2

2) 관련 명령어
- ls(list) : 파일 또는 디렉터리의 리스트를 출력
- pwd(print working directory) : 현재 작업 디렉터리의 위치를 출력
- cd(change directory) : 작업 디렉토리를 변경

3. 파일과 디렉토리를 다루는 명령

- file : 파일 타입을 확인 (text, data, executable or binary)
- cat(catenate) : 주로 짧은 text파일을 볼 때
- more : 주로 긴 text파일을 볼 때
- strings: 바이너리 파일의 문자열만 보고자 할 때
- head: text파일의 머리부분(디폴트 10줄)만 보고자 할 때
- tail: text파일의 끝부분(디폴트 10줄)만 보고자 할 때 (tail -f /var/log/messages)
- wc(word count) : text파일의 라인 수, 단어 수, 문자 수를 알고자 할 때 ( wc file1)
- touch : 빈 파일을 생성할 때
- tee : 화면 출력과 파일 저장을 동시에 하고자 할 때 (ls -lR | tee logfile | more)
- mkdir : 디렉토리를 생성할 때
- rmdir : 빈 디렉토리를 제거할 때
- rm -r : 디렉토리를 제거할 때
- cp : 파일을 복사할 때
- cp -r : 디렉토리를 복사할 때
- mv : 파일 또는 디렉토리를 이름변경 또는 옮길 때

4. 파일과 텍스트 검색

- find : 파일 또는 디렉토리를 찾을 때
$ find / -name core
$ find ~ -name core -exec rm {} \;
$ find . -mtime +90
$ find ~ -size +57
$ find /usr -name '*tif'
- cmp, diff : 두 파일의 차이를 비교할 때
- sort : 파일의 내용 또는 리스트를 정렬할 때
$ ls -l | sort
$ du -ks /etc/* | sort -nr
- grep : 파일의 특정 문자열이 있는 라인을 출력
$ grep user01 /etc/passwd
$ ps -ef | grep ksh

5. 파일의 보안

$ ls -l
-rw-r--r-- 1 borisu staff 8239 2002년 8월 29일 backup.txt
-rw-r--r-- 1 borisu staff 2361 2002년 9월 3일 memo.txt
drwx------ 5 borisu staff 512 5월 20일 11:55 shell/
-rw-r--r-- 1 borisu staff 1660 4월 25일 01:37 ssh-setup.sh

File Type: -, f , d, c, b
Permission: read(r:4), write(w:2), execute(x:1)
User, Group, Others

1) 퍼미션 설정
$ chmod u+x file1 (symbolic mode)
$ chmod a=rx file1 (symbolic mode)
$ chmod 644 file1 (octal mode)

2) 소유권 변경 (root)
# chown user01 file1 (파일 소유자 변경 시)
# chgrp class1 file1 (파일 그룹 소유자 변경 시)
# chown -R user01:class1 dir1 (디렉토리 변경 시)

3) umask : 기본 퍼미션 제한
$ umask (확인)
$ touch file1
$ mkdir dir1
$ umask 027 (재설정)
$ touch fie2
$ touch dir2

6. Visual Editor (VI)

유닉스의 기본 편집기는 vi가 있고, 그밖에 emacs 등이 있다. GUI로는 dtpad가 있다.

- vi의 세가지 모드
Command Mode (명령 모드)
Edit Mode (편집 모드)
Last Line Mode (마지막 명령 라인 모드)

- vi 레퍼런스 카드 및 메뉴얼
http://kldp.org/응용_프로그램/에디터/Vi/


7. Archiving User Data

1) Archive 관련 명령

tar - Creates and extracts files from a tape device or file archive
compress, uncompress - Compress and uncompress a file
zcat - Uncompress a compressed file and sends the output to the screen without changing the compressed file.
gzip, gunzip - Compresses and uncompressed
gzcat - Uncompress a gzipped file and sends the output to the screen without changing the gzipped file
zip, unzip - Packages and compresses files and uncompressed files.
jar - Packages and comresses multiple files to a single archive file
cpio - Copies and extracts files fro a file archive or tape device.

[ tar ]

내용만 볼 때: tar tvf name.tar
풀 때 : tar xvf name.tar
만들 때 : tar cvf name.tar file1 file2 file3
tar cvf name.tar dir1

$ cd
$ mkdir testdir
$ cd testdir
$ cp /etc/profile file1
$ man ls | col -b > file2
$ tar cvf first.tar file1 file2
$ rm file? ; ls
$ tar tvf first.tar
$ tar xvf first.tar

$ cd ..
$ tar cvf second.tar testdir
$ rm -rf testdir
$ tar tvf second.tar
$ tar xvf second.tar

[ compress & uncompress ]

$ compress second.tar
$ ls
$ uncompress second.tar.Z
$ tar xvf second.tar

cf. zcat second.tar.Z | tar xvf -
cf. compress -dc second.tar.Z | tar xvf -
cf. uncompress -c second.tar.Z | tar xvf -

[ gzip ]

$ cd
$ cd ..
$ ls
$ tar cvf /var/tmp/myhome.tar user01
$ cd /var/tmp; ls
$ gzip myhome.tar
$ ls

$ gzip -d myhome.tar.gz
$ tar tvf myhome.tar
$ tar xvf myhome.tar

cf. gzcat myhome.tar.gz | tar xvf -
cf. gzip -dc myhome.tar.gz | tar xvf -
cf. gunzip -c myhome.tar.gz | tar xvf -
cf. gtar xvfz myhome.tar.gz

[ jar ]
$ jar cvf dir1.jar dir1
$ jar tvf dir1.jar
$ jar xvf dir1.jar

8. 원격지 접속

원격지 접속은 telnet, rlogin, ftp, ssh등이 있다.

1) telnet
원격 호스트의 user name과 password가 필요
$ telnet host1
...(접속해서 사용)
$ exit (로그 아웃)

2) rlogin

원격 호스트에서 허락된 호스트 또는 유저의 경우 패스워드가 필요 없다.
자세한 사용법은 다음을 참고한다.
http://nscp.upenn.edu/aix4.3html/cmds/aixcmds4/rlogin.htm

- 일반유저: /etc/hosts.equiv, $HOME/.rhosts
- root : /.rhosts
- 파일 형식 : 호스트 명 유저

$ rlogin host2
...(접속해서 사용)
$ exit (로그 아웃)

cf. rsh host1 hostname
cf. rcp file1 host1:/tmp

3) ssh (secure Shell)

명령어: ssh, scp, sftp
관련사이트:
http://www.openssl.org
http://www.openssh.org
관련 문서:
ssh howto
http://kldp.org/~eunjea/ssh/index.html
ssh install for solaris
http://www.sunfreeware.com/openssh.html

4) ftp

[ 접속 및 연결 끊기 ]

1) 일반 유저로 로긴
$ ftp server_name
또는
$ ftp
ftp> open server_name
ftp> user login_id
ftp> close
ftp> open new_server
ftp> quit

2) Anonymous 로긴
$ ftp server_name
Login: ftp ( or anonymous)
password:
user01@suned.co.kr

[ 기본 설정 옵션 ]

ftp> hash (on/off: 전송상태를 표시)
ftp> ver (on/off: Verbose mode)
ftp> bin (Binary mode)
ftp> asc (ASCII mode)
ftp> prompt (on/off: 다중 파일 전송시 프롬프트 on/off)

[ 기본 명령 ]

ftp> cd (디렉토리를 옮길 때: REMOTE )
ftp> ls (디렉토리 내용을 볼 때: REMOTE )
ftp> pwd (현재 디렉토리 위치 확인: REMOTE)

ftp> lcd (디렉토리를 옮길 때: LOCAL )
ftp> !ls (디렉토리 내용을 볼 때: LOCAL )
ftp> !pwd (현재 디렉토리 위치 확인: LOCAL)
ftp> ! (Shell로 잠시 빠져나감: LOCAL)

[ 파일 전송 ]

ftp> get remote_file [local_file] (받을 때)
ftp> mget file1 file2 file3 file4 (여러 파일을 받을 때)

ftp> put local_file [remote_file] (올릴 때)
ftp> mput file1 file2 file3 file4 (여러 파일을 올릴 때)

[ 기타 명령어 ]

ftp> del file_name (파일 지우기: REMOTE)
ftp> mkdir dir_name (디렉토리 만들기: REMOTE)
ftp> help (도움말 보기: REMOTE)

5) X 서버로의 접근
윈도우용 Client프로그램으로는 Xmanager가 유명하다. 다음 문서를 참조한다.
- 사용법
http://compedu.inue.ac.kr/~chlee56/wowlinux/xmanager.htm
- 다운로드
http://netsarang.co.kr/download/download.html

9. 시스템 프로세스

process : 프로그램이 메모리에 올라와 동작하고 있는 상태.
PID : 프로세스의 고유 ID (커널이 관리)
Daemon: 백그라운드로 실행, 부팅 시 동작, 서버 프로세스

1) 프로세스 정보
$ ps -ef | more
UID PID PPID C STIME TTY TIME CMD
root 0 0 0 4월 25 ? 0:00 sched
root 1 0 0 4월 25 ? 0:05 /etc/init -
root 2 0 0 4월 25 ? 0:00 pageout
root 3 0 0 4월 25 ? 86:09 fsflush
root 279 1 0 4월 25 ? 0:00 /usr/lib/saf/sac -t 300
root 204 1 0 4월 25 ? 0:00 /usr/lib/utmpd
root 134 1 0 4월 25 ? 0:02 /usr/sbin/rpcbind
$ ps -ef | grep lp
$ pgrep -l lp (solaris 8부터)

2)프로세스 종료

- 시그널 정의
$ man -s 3HEAD signal

Name Value Default Event
SIGHUP 1 Exit Hangup (see termio(7I))
SIGINT 2 Exit Interrupt (see termio(7I))
SIGKILL 9 Exit Killed
SIGTERM 15 Exit Terminated (==> Control + C)

- 프로세스 종료
$ kill [-signal] PID ...
$ kill <PID>
$ kill -9 <PID>
$ kill -KILL <PID>
$ pgrep -l mail
215 sendmail
12047 dtmail
$ kill 12047
$ pkill -KILL 프로세스 이름

- 자신이 사용하는 워크스테이션이 윈도우 hang시 처리요령
다른 시스템에서 다음과 같이 한다.
$ telnet (또는 rlogin) host1
$ pkill -9 <자신의 쉘이름, ex) ksh>
또는
$ pkill -KILL <자신의 쉘이름 ex) ksh>

3) 잡 제어 ( Job Control )
여러 개의 작업을 수행하고 이를 제어할 수 있다. 단 본쉘(sh)는 불가

$ find . -name core > list & ( Job을 background로 실행)
$ jobs ( Job을 확인)
[1] = running find . -name core > list &
$ fg %1 ( 백그라운드 잡을 포그라운드로)
Control + Z ( 포그라운드 잡을 중지)
$ jobs ( job을 확인)
$ bg %1 (중지된 잡을 백그라운드로 실행)
$ kill %1 (잡을 종료)


10. 쉘 (Shell)

명령해석기, 사용자 인터프리터라고도 한다. 쉘 각각의 자세한 문서는 다음을 참고한다.
http://dir.yahoo.com/Computers_and_Internet/Software/Operating_Systems/UNIX/Shells/



Shell 종류 Shell 프로그램 위치 프롬프트 프롬프트 변수 쉘초기화 파일
Bourn Shell /bin/sh, /sbin/sh #, $ PS1 /etc/profile, $HOME/.profile
Korn Shell /bin/ksh #, $ PS1 /etc/profile, $HOME/.profile, $HOME/.kshrc
C Shell /bin/csh hostname#, hostname% prompt /etc/.login, $HOME/.cshrc, $HOME/.login


- 현재 사용쉘 확인
$ ps
$ echo $SHELL
- 기타 쉘
bash, tcsh, zsh, ssh
- 관련 디렉토리
/etc/skel : 샘플 초기화 파일 위치

1) 입출력의 전환
$ mailx user1 < ~/myfile ( 입력의 방향을 파일로부터 )
$ ps -ef > file_list (출력의 방향을 파일로 전환)
$ cat /etc/passwd >> file_list (출력의 방향을 파일로 전환, append)
$ ls /var /no 1> dat 2>&1

2) 파이프 (프로세스 간 통신)
$ who | wc -l
$ ls -F /etc | grep "/"
$ head -10 file1 | tail -3 | lp
$ ps -ef | tail +2 | wc -l

3) Meta Character
- Backslashes (\)
- Dollar signs ($)
- Back quotation marks (` `)
- quotation marks (' ')
- double quotation marks (" ")

$ rm \*


$ echo '$SHELL'
$ echo "$SHELL"
$ echo "\$SHELL"

$ echo date
$ echo `date`

11. Korn Shell Features

1) Aliases
alias aliasname="command"
ex)
$ alias h=history
$ alias c=clear
$ alias home='cd;ls'
$ alias ls='ls -F'
$ alias copy="cp -r"

2) Command line Editing
- Command line 편집 기능
$ set -o vi
$ [esc] + k (=> vi command mode )

3) History
- 128개를 유지 ( 변수 HISTSIZE -> .kshrc)
- $HOME/.sh_history (변수 HISTFILE -> .kshrc)
ex)
$ history ( 최근 16개 명령을 list)
$ history 23 (23 ~ 최근명령)
$ history -10 (최근 명령 10개)
cf)
$ r ( 가장 최근 명령 실행)
$ r p ( p로 시작된 가장 최근 명령어 실행)
$ r 23 ( 히스토리가 23번인 명령어 실행)

4) Ignore Control-d (ignoreeof)
- Control-d의 기능: 1) EOF, 2) EXIT
ex)
$ ^d
$ set -o ignoreeof (=>설정 eof:on, exit:off)
$ ^d
$ set +o ignoreeof (=>해제 eof:on, exit:on)

5) .profile과 분리된 초기화 파일 (.kshrc)
- $HOME/.kshrc (C쉘: $HOME/.cshrc)
- 환경변수는 .profile에 기록
- 기타변수 및 콘쉘 제공 기능 등은 .kshrc에 기록
ex)
$ . ~/.kshrc ( 재 초기화 )

6) Job Control
ex)
$ find / -name core -exec rm {} \;
^Z (=> suspend)
[1] + stop ... (=> [1]은 잡번호)
$ bg %1 ( 1번 잡을 백그라운드로 실행)
$ jobs ( 잡 확인)
$ fg %1 ( 1번 잡을 포그라운드로 실행)
$ ^+C ( 포그라운드 잡을 종료)
$ jobs

7) 덮어쓰기 방지 (noclobber)
ex)
$ touch testfile
$ cat /etc/passwd > testfile
$ cat testfile
$ cat /etc/profile > testfile
$ cat testfile
$ set -o noclobber
$ cat /etc/hosts > testfile ( => 경고메시지가 떨어짐)

12. Korn Shell Initialization

- Korn Shell 초기화 순서

(1) /etc/profile
(2) $HOME/.profile
(3) $HOME/.kshrc


1) $HOME/.profile 설정하기

$ vi ~/.profile

stty cs8 erase '^H' -istrip ( -> 터미널 설정 )

PATH=$PATH:/usr/local/bin:/usr/ccs/bin:/usr/ucb (-> Path 설정)
EXINIT="set ai nu ts=3 showmode" (-> vi 환경설정)
ENV="$HOME/.kshrc" ( -> .kshrc 확장쉘 변수 설정)
LPDEST="lp1" (-> Default Printer Set )
EDITOR="vi" ( -> Default Editor Set )

export PATH EXINIT ENV LPDEST EDITOR ( 전역변수 선언 )

$ . ~/.profile ( .profile 재 초기화)


2) $HOME/.kshrc 설정하기

$ vi ~/.kshrc

HOSTNAME=`uname -n`
PS1='[$LOGNAME@$HOSTNAME:$PWD]$ ' (-> 프롬프트 변경)

export PS1 HOSTNAME (-> 전역변수 선언)

## My Alias Def (-> 엘리어스 설정 )
alias ls='ls -F'
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
alias home='cd;ls'
alias c=clear
alias h=history
alias d=date

## Other ksh feature set
set -o noclobber
set -o vi
set -o ignoreeof

$ . ~/.kshrc (-> .kshrc 재 초기화)


13. 쉘 프로그래밍

- 쉘 프로그래밍 강좌

http://kldp.org/KoreanDoc/Shell_Programming-KLDP
http://myhome.naver.com/yskim511/21.htm

4부. 시스템 어드민

1. UNIX 파일의 종류와 특성

- 파일은 파일이름, inode, data block으로 구성되어 있다.
- 파일의 종류는 ls -l , ls -F, file 등의 명령어로 확인할 수 있다.

1) 파일의 종류
-: Regular File (Ordinary File) : vi, ed, cp, mv, cat, touch, cc 등에 의해 생성
d: Directory File : mkdir, cp -r 등에 의해 생성
c,b: Special File ( 디바이스 파일) : 장치 파일이며 drvconfig, devfsadm등에 의해 생성
brw-r----- 1 root sys 32, 0 2000년 7월 4일 /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a
crw-r----- 1 root sys 32, 0 2000년 7월 4일 /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a
l: Symbolic Link File: 심볼릭 링크 파일
lrwxrwxrwx 1 root root 12 2000년 7월 4일 /etc/hosts -> ./inet/hosts

$ ln -s file1 file2 (심볼릭 링크)
$ ln file2 file3 (하드 링크)
$ rm file1 (원본을 제거함)
$ cat file2 file3 ( file2는 볼 수 없음)

- 링크란 어떤 파일의 또 다른 이름이다.
- 하드링크는 같은 inode를 심볼릭 링크는 다른 inode를 갖는다.
- 하드링크는 디렉토리를 링크할 수 없다.
- 하드링크는 서로 다른 파일시스템 간에 링크할 수 없다.
- 하드링크는 원본파일의 데이터와 같은 데이터를 공유하며, 심볼릭 링크는 원본의 PATH값을 데이터로 갖는다.

- 심볼릭 링크의 예
/etc/hosts -> /etc/inet/hosts
/bin -> /usr/sbin
- 하드링크의 예
/etc/init.d/* -> /etc/rc#.d/*

2) inode
모든 파일은 하나의 inode를 가지며 이것은 해당 파일에 대한 정보를 가진다. inode table은 inode들로 구성되어 있으며
하나의 inode는 ls-l정보, 데이터블록 포인터, shadow inode 포인터로 이루어져 있다. 포인터들이 가리킬 수 있는 데이터 블록의
사이즈는 최대 1T까지 가능하다.

- 파일과 파일시스템의 최대 사이즈
solaris 2.6 이전 : 2G (파일), 1TB (파일 시스템)
solaris 2.6부터 : 2G이상 1TB (파일), 1TB (파일 시스템)

파일의 경우 실재로는 866G까지 가능하며, 파일 시스템의 1T이상은 Virtual Volume(Meta Device, Veritas Volume Manager)을 구성해야 한다.


2. Boot PROM (Programmable Read Only Memory)

- PROM 관련 문서
Frequently Asked Questions about Sun NVRAM/hostid
http://www.squirrel.com/squirrel/sun-nvram-hostid.faq.html
Sun Flash PROM Guide for Workstations and Workgroup Servers - Standalone Version
http://www.sun.com/products-n-solutions/hardware/docs/pdf/802-3233-23.pdf
Updating the Flash PROM on the Ultra 1, Ultra 2, Ultra 450, and Sun Enterprise 450 Systems
http://docs.sun.com/db/doc/816-2583-10/6m8u2cukc?a=view
Updating the Flash PROM on the Sun Enterprise 3x00, 4x00, 5x00, and 6x00 Systems
http://docs.sun.com/db/doc/816-2583-10/6m8u2cukk?a=view


1) PROM이 하는 역할
- Test the system hardware (POST: Power on Self Test)
- Boot the operating system

[ POST ]
- Initialize the system
- Probes Memory and the CPU
- Probes devices, interprets their devices and build a dev tree
- Install the console

2) PROM으로 가는 방법
- # halt
- # init 0
- # /usr/sbin/shutdown -y -g0 -i0
- Stop + A ( 부팅 시 바로 누르거나 시스템 hang시에만 적용)

3) PROM에서의 얻을 수 있는 정보
OK banner ( 시스템 모델명, 메모리, hostid, Ethernet Addr, Boot PROM 버전 )
OK probe-scsi ( 연결된 SCSI 장치들의 정보 확인)

4) PROM 버전
1.x : Original Sparc Boot PROM
2.x : Open Boot PROM (OBP) => sparc 시리즈 (sparc4,5,10,20...등)
3.x : Open Boot PROM with Flash Update (Flash PROM) => ultra sparc 시리즈

5) PROM에서 사용되는 명령어
OK help (도움말)
OK probe-scsi (스카시 장비 체크)
OK prebe-ide ( IDE장비 체크)
OK devalias (PROM에 설정되어 있는 장비의 물리적 장치명과 별명)
OK show-devs ( PROM에 설정되어 있는 물리적 장치의 트리구조 보기)
OK printenv (PROM에 설정되어 있는 부트 파라미터의 기본 값을 확인)
OK setenv <parameter_name> <value>
OK reset ( setenv에 의해 변경된 파라미터 값들을 재 저장하는 명령)
OK set-default <parameter_name> ( 지정한 파라미터 값을 초기화)
OK set-defaults ( 지정한 모든 파라미터 값들을 초기화 => STOP + N)

6) PROM의 부트 명령어
OK boot [ device name ] -[option]

OK boot [disk, net, cdrom] (=> default는 disk)
OK boot -s (싱글유저로 부팅)
OK boot -a (Interactive 모드로 부팅)
OK boot -r (Reconfiguration Boot => 장치를 추가했을 때)

7) OS의 PROM관련 시스템 명령어
# eeprom (확인)
# eeprom boot-device ( 확인)
# eeprom auto-boot?=false (설정)
# eeprom 'auto-boot?=false' (csh의 경우)


3. 부트 프로세스 (Boot Process)

1) 부팅의 단계는 다음과 같다.

(1) 부트 PROM 단계
- PROM이 POST(Power On Self Test)를 실행
- 부트 디바이스를 결정
- 부트 프로그램인 bootblk를 로드

(2) 부트 프로그램 단계
- bootblk는 두 번째 부트 프로그램인 ufsboot를 로드
- ufsboot는 커널을 로드( 32bit, 64bit kernel)

(3) 커널 초기화 단계
- 커널(/kernel/unix, /usr/kernel, /platform/`uname -m`/kernel)은 자신을 초기화하고 모듈을 로드 한다.
- Configuration 파일인 /etc/system을 읽는다.

(4) init 단계
- 커널이 /sbin/init을 실행한다.
- init은 /etc/initab을 읽는다.
- 필요한 데몬을 실행한다.


2) 32 또는 64 bit 커널의 확인 및 변경
64bit의 경우 OS는 Solaris7부터, 시스템 아키텍처는 sun4u(ultra sparc) 이상에서이다.

- 확인하기
# isainfo -kv
32-bit sparc kernel modules (=> 32일 경우)
64-bit sparc kernel modules (=> 64일 경우)

- 64bit -> 32bit
OK boot kernel/unix
- 32bit -> 64bit
OK boot kernel/sparcv9/unix

cf. 64bit 커널 지정하기
# vi /platform/sun4u/boot.conf
...
ALLOW_64BIT_KERNEL_ULTRASPARC_1_CPU=true

3) 커널 파라미터 수정
보다 자세한 사항은 다음을 참조한다.
- Solaris Tunable Parameters Reference Manual
http://docs.sun.com/db/doc/816-0607

i) 최대 사용자수 지정( maxusers)
set maxusers=100

ii) 최대 프로세스 개수 지정 (max_nprocs)
set max_nprocs=100

iii) 가상 단말기 개수 지정 ( pt_cnt)
- 리부팅시에는 반드시 reconfiguration boot
set pt_cnt=128
set npty=128

iiii) 최대 파일 디스크립트 개수 지정하기 (rlim_fd_cur)
- 하나의 프로세스가 동시에 오픈할 수 있는 최대 파일 개수
- # ulimit descriptors 512
- # ulimit -n 512
set rlim_fd_max=1500
set rlim_fd_cur=128

iiiii) 최대 UFS inode수 지정( ufs_ninode)
- 시스템에서 파일을 오픈 하면 하나의 파일에 대하여
하나의 ufs_ninode를 가지게 된다.
set ufs_ninode=10000

[ How to Setup Kernel Parameter ]

i) backup /etc/system file
# cp /etc/system /etc/system.org

ii) Edit /etc/system file
# vi /etc/system
... (다음을 추가)
set pt_max_pty=10

iii) Reconfiguration Boot
# reboot -- -r

iiii) 윈도우에서 터미널을 여러 개 띄워 max값을 확인

[ How to recover /etc/system File ]

i) Edit /etc/system file
# vi /etc/system
... (다음을 추가)
exclude: drv/dad

ii) reboot
# reboot

iii) Boots the system interactively
OK boot -a
...
Enter filename of kernel (kernel/unix): <Enter>
Enter default directory for modules (kernel, /usr/kernel): <Enter>
Enter name of system file (etc/system): /etc/system.org
Enter default root file system type (ufs): <Enter>
Enter physical name of root device: <Enter>

iiii) Recover /etc/system file
# cp /etc/system.org /etc/system
# init 6


4. init 단계

kernel은 init을 실행하고 init은 /etc/inittab파일을 일고 초기화 하며 해당 설정대로 관련 명령을
수행한다. 시스템 운영에 필요한 데몬 들을 실행하고 동작레벨(Run Level)을 관리하는 것이 주 역할이다.

1) /etc/inittab 파일
ap::sysinit:/sbin/autopush -f /etc/iu.ap (*)
ap::sysinit:/sbin/soconfig -f /etc/sock2path (*)
fs::sysinit:/sbin/rcS sysinit >/dev/msglog 2<>/dev/msglog </dev/console (*)
is:3:initdefault: (*)
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog (*)
sS:s:wait:/sbin/rcS >/dev/msglog 2<>/dev/msglog </dev/console (*)
s0:0:wait:/sbin/rc0 >/dev/msglog 2<>/dev/msglog </dev/console
s1:1:respawn:/sbin/rc1 >/dev/msglog 2<>/dev/msglog </dev/console
s2:23:wait:/sbin/rc2 >/dev/msglog 2<>/dev/msglog </dev/console (*)
s3:3:wait:/sbin/rc3 >/dev/msglog 2<>/dev/msglog </dev/console (*)
s5:5:wait:/sbin/rc5 >/dev/msglog 2<>/dev/msglog </dev/console
s6:6:wait:/sbin/rc6 >/dev/msglog 2<>/dev/msglog </dev/console
fw:0:wait:/sbin/uadmin 2 0 >/dev/msglog 2<>/dev/msglog </dev/console
of:5:wait:/sbin/uadmin 2 6 >/dev/msglog 2<>/dev/msglog </dev/console
rb:6:wait:/sbin/uadmin 2 1 >/dev/msglog 2<>/dev/msglog </dev/console
sc:234:respawn:/usr/lib/saf/sac -t 300 (*)
co:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` console login: " -T sun -d /dev/console -l console -m ldterm,ttcompat (*)

2) Run Level
0 : PROM monitor level. 부트 PROM의 OK 프롬프트 상태로 시스템을 종료하기 위한 Level이다. (==> halt, init 0, shutdown -i0)
s,S : Single User(관리자) 상태로서 마운트된 모든 파일 시스템을 접근할 수 있다.
1 : Single User(관리자) 상태로서 사용 가능한 모든 파일 시스템을 접근할 수 있다.
2 : 다중 사용자 레벨 (Multi User Level)
3 : 다중 사용자 레벨 (Multi User Level) with NFS(Network File Service)
4 : User Define Level (사용되지 않음)
5 : Shutdown(0) and power off (==> poweroff , init 5, shutdown -i5 )
6 : Shutdown(0) and reboot (==> reboot, init 6, shutdown -i6)

3) 각 Run Level별 데몬 프로세스의 실행
init --> /sbin/rc# --> /etc/rc#.d/{S##스크립트, K##스크립트} --> 데몬 실행
root(관리자) --> /etc/init.d/스크립트 --> 데몬 종료, 재실행

/etc/init.d/스크립트 ==> /etc/rc#.d/{S##스크립트, K##스크립트}는 하드링크 됨. 관련 파일 검색은 다음과 같다.
# ls -i /etc/init.d/nfs.server
28562 /etc/init.d/nfs.server*
# find /etc -inum 28562
/etc/init.d/nfs.server
/etc/rc0.d/K28nfs.server
/etc/rc1.d/K28nfs.server
/etc/rc2.d/K28nfs.server
/etc/rc3.d/s15nfs.server
/etc/rcS.d/K28nfs.server

4) RC 스크립트 추가하기

(1) Edit banner script in /etc/init.d
# cd /etc/init.d
# cp lp banner
# vi banner
#!/bin/sh
#
# Boot Process test script
#

case "$1" in
'start')
[ -f /usr/bin/banner ] && /usr/bin/banner "SYSTEM UP"
/usr/bin/audioplay /usr/demo/SOUND/sounds/rooster.au
;;
'stop')
[ -f /usr/bin/banner ] && /usr/bin/banner "SYSTEM DOWN"
/usr/bin/audioplay /usr/demo/SOUND/sounds/flush.au
;;
'*')
echo "Usage: $0 { start | stop }"
exit 1
esac
exit 0

(2) Test script
# chmod 744 banner
# chown root:sys /etc/init.d/banner
# ./banner start
# ./banner stop

(3) link to /etc/rc2.d
# cd /etc/rc2.d
# ln /etc/init.d/banner S22banner

(4) link to /etc/rcS.d
# cd /etc/rcS.d
# ln /etc/init.d/banner K99banner

(5) link to /etc/rc0.d
# cd /etc/rc0.d
# ln /etc/init.d/banner K99banner

(6) Test init state
# init s
...
# init 6
...
# halt


5. Device Configuration

1) 장치 명
- Logical Device Name ( 관리자)
- Physical Device Name ( kernel, system )
- Instance Name (kernel이 부팅 시 빠른 참조를 위해)

2) Logical Device Name
/dev/[r]dsk/c#t#t#d#s#
c# : Controller Number
t# : Target Number
d# : Disk Number
s# : Slice or partition number (0-7)
예) /dev/dsk/c0t0d0s0(raw device) /dev/rdsk/c0t3d0s (block device)

3) Physical Device Name
# ls -lL /dev/dsk/c0t0d0s0
brw-r----- 1 root sys 32, 0 2000년 7월 4일 /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a
# ls -lL /dev/rdsk/c0t0d0s0
crw-r----- 1 root sys 32, 0 2000년 7월 4일 /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a

4) Instance Name
시스템 커널에 의해 부여된 Physical Device Name의 축약된 이름이다.
# cat /etc/path_to_inst
"/sbus@1f,0" 0 "sbus"
"/sbus@1f,0/SUNW,fas@e,8800000" 0 "fas"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@f,0" 14 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@6,0" 6 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@d,0" 12 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@4,0" 4 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@e,0" 13 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@5,0" 5 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@b,0" 10 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@2,0" 2 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@c,0" 11 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@3,0" 3 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/st@0,0" 0 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@a,0" 9 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@1,0" 1 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@6,0" 6 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@4,0" 4 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@5,0" 5 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@2,0" 2 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@3,0" 3 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0" 0 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@1,0" 1 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@8,0" 7 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@9,0" 8 "sd"
"/sbus@1f,0/sbusmem@2,0" 2 "sbusmem"
"/sbus@1f,0/sbusmem@3,0" 3 "sbusmem"
"/sbus@1f,0/sbusmem@0,0" 0 "sbusmem"
...

5) 디바이스의 재구성

장치를 새로 장착하고 /devices 및 /dev의 장치파일을 재구성하기 위한 명령어는 다음과 같다.
- (재)부팅이 필요
i) # reboot -- -r
ii) OK boot -r
iii) # touch /reconfigure
# reboot ( or init 6)
- (재)부팅이 불필요
i) # drvconfig -i sd ( Solaris 2.6부터 )
# disks (tapes, ports, devlinks)
ii) # devfsadm -c disk [ -c tape -c audio ]


6) 장치 추가 용례
- reconfigure file 생성
# touch /reconfigure
- 시스템의 정지
# init 5
- 시스템의 전원을 끈다
- 시스템에 새로운 디바이스를 연결한다.
- 외장형일 경우 외장 디바이스의 전원을 켠다.
- 시스템의 전원을 켠다.
- 부팅 후 추가된 장치의 Reconfiguration을 확인한다.

7) 장치의 연결확인
- PROM 단계에서
OK probe-scsi
- OS에서
# prtconf | grep -v not
# format (디스크의 경우, 확인만 하고 Control + d )
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0
1. c0t1d0 <IBM-DCAS-32160W-S65A cyl 8186 alt 2 hd 3 sec 171>
/sbus@1f,0/SUNW,fas@e,8800000/sd@1,0
Specify disk (enter its number):


6. DISK, SLICE, FORMAT

1) Disk Label (VTOC: Volume Table Of Contents)
- 디스크의 파티션 테이블 (Partition Table)
- 디스크 디바이스를 구별하는 볼륨명(volume name)
- Optional Partition Tag (각 파티션의 표준 마운트 포인트 이름으로 디스크 라벨에서만 사용되고 OS에서는 사용되지 않는 제한된 값)
- Optional Partition Flag (각 파티션이 Writable이지 Mountable인지를 결정하는 값으로 디스크 라벨에서만 사용되고 OS에서는 사용되지
않는 제한된 값)

VTOC의 정보확인은 prtvtoc로 변경(파티션)은 format을 이용한다

# prtvtoc /dev/rdsk/c0t3d0s2 (=> VTOC 정보 확인)
# format

2) 파티션 정하기
솔라리스에서는 하드디스크의 파티션을 하기 위해 format이라는 utility를 사용한다.
솔라리스에서는 하나의 디스크에 최대 8개의 파티션 까지 나눌 수 있으며 2번은 전체를 나타낸다. 따라서 실제 파티션 수는 7개이다.
디스크를 추가하고 파티션을 하기 위한 자세한 사용법은 다음을 참조한다.
http://www.ussg.iu.edu/usail/peripherals/disks/adding/solaris.html
http://docs.sun.com/db/doc/805-7228/6j6q7uet8

# format (==> 포맷하고자 하는 디스크 번호를 선택)
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0
1. c0t1d0 <IBM-DCAS-32160W-S65A cyl 8186 alt 2 hd 3 sec 171>
/sbus@1f,0/SUNW,fas@e,8800000/sd@1,0
Specify disk (enter its number):

주의사항 1) 슬라이스 2번은 디스크 전체를 의미하므로 절대 수정하지 않는다.
주의사항 2) 파티션은 실린더 단위로 구성되는데 Offset이 정확히 일치해야 한다.
주의사항 3) 레이블 저장 명령 ( label)을 수행하지 않는다면 메모리에서만 변경되므로 디스크에는 영향을 주지 않는다.

[ 하드 디스크 추가하기 ]

# init 5
(디스크 연결하고 파워를 켠다)
OK probe-scsi
OK boot -r
# prtconf | grep -v not
# format (추가된 디스크를 선택하여 파티션 한다.)
# newfs /dev/rdsk/c0t1d0s6 (각 파티션을 파일시스템으로 만든다.)
# fsck /dev/rdsk/c0t1d0s6 (파일시스템을 체크한다.)
# mkdir /data (마운트할 디렉토리를 생성한다)
# mount /dev/dsk/c0t1d0s6 /data (마운트 한다)
# df -k 또는 mount (마운트 정보를 확인한다.)
# vi /etc/vfstab (해당 파티션의 정보를 추가하여 부팅 시 마운트 되도록 한다.)


7. Solaris 파일 시스템

1) 파일 시스템의 종류
- Disk Based File System : ufs(Unix File System), hsfs(High Sierra File System), pcfs(PC File System), udfs(Universal disk Format File System:sol7)
- Distributed File System: nfs ( Network File System)
- Pseudo File System: tmpfs(Temporary File System), swapfs(Swap File System), fdfs(File Descriptor File System), procfs(Process File System)

2) UFS의 파일 시스템 구조
- label(VTOC)(1 sector)
- Boot Bolck(15 sectors) : bootblk
- SuperBlock(16 sectors)
. 파일시스템 사이즈
. 레이블(파일 시스템명과 볼륨명)
. 파일 시스템의 Logical block 의 사이즈
. 마지막으로 업데이트된 날짜와 시간
. 실린더 그룹의 사이즈
. 실린더 그룹 안의 데이터 블록의 number의 fragment의 사이즈
. 데이터 블록의 요약 정보
. 파일 시스템 상태 값 (clean, stable, active, logging or unknown)
. 마지막 마운트 포인트의 경로명
- First Cylinder Group (보통 그룹당 16개의 실린더)
|__ backup Super Block
|__ Cylinder Group Block
| . inode 수
| . 실린더 그룹에서의 데이터 블록 수
| . 디렉터리의 수
| . free block의 map
| . 실린더 그룹에서 free block, free_inode, free fregment의 수
| . 사용된 inode의 map
|__ inode table
|__ Data Block(한 블록당 8K bytes, 1K는 fregment라 함)
- Second Cylinder Group
....

3) 파일 시스템의 생성
# newfs /dev/rdsk/c0t0d0s0
newfs: /dev/rdsk/c0t0d0s0 last mounted as /images
newfs: construct a new file system /dev/rdsk/c0t0d0s0: (y/n)? y
/dev/rdsk/c0t0d0s0: 4199508 sectors in 6603 cylinders of 4 tracks, 159 sectors
2050.5MB in 104 cyl groups (64 c/g, 19.88MB/g, 3392 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 40896, 81760, 122624, 162848, 203712, 244576, 285440, 325664, 366528,
407392, 448256, 488480, 529344, 570208, 611072, 651296, 692160, 733024,
773888, 814112, 854976, 895840, 936704, 976928, 1017792, 1058656, 1099520,
1139744, 1180608, 1221472, 1262336, 1302560, 1343424, 1384288, 1425152,
1465376, 1506240, 1547104, 1587968, 1628192, 1669056, 1709920, 1750784,
1791008, 1831872, 1872736, 1913600, 1953824, 1994688, 2035552, 2076416,
2116640, 2157504, 2198368, 2239232, 2279456, 2320320, 2361184, 2402048,
2442272, 2483136, 2524000, 2564864, 2605088, 2645952, 2686816, 2727680,
2767904, 2808768, 2849632, 2890496, 2930720, 2971584, 3012448, 3053312,
3093536, 3134400, 3175264, 3216128, 3256352, 3297216, 3338080, 3378944,
3419168, 3460032, 3500896, 3541760, 3581984, 3622848, 3663712, 3704576,
3744800, 3785664, 3826528, 3867392, 3907616, 3948480, 3989344, 4030208,
4070432, 4111296, 4152160, 4193024,

# newfs -m 1 /dev/rdsk/c0t0d0s0 ( Minfree 값을 조정, default는 10%)
# fstyp -v /dev/rdsk/c0t0d0s0 | grep minfree (기존의 minfree값을 확인)
# tunefs -m 2 /dev/rdsk/c0t0d0s0 ( newfs 이후 다시 재조정)


8. 파일 시스템 마운트 (File System Mount)

파일시스템을 사용하기 위해서는 트리구조의 임의 디렉토리(Mount Point)에 연결시켜야 하는데, 이를 마운트(mount)라 하며
마운트를 해제하는 것을 언마운트(unmount)라 한다.
마운트 포인트(mount point)는 빈 디렉터리로 파일 시스템을 연결할 포인트를 의미한다.

1) 마운트 정보
# mount
/ on /dev/dsk/c0t0d0s0 read/write/setuid/intr/largefiles/onerror=panic/dev=800000 on 금 4월 25 14:18:36 2003
/usr on /dev/dsk/c0t0d0s5 read/write/setuid/intr/largefiles/onerror=panic/dev=800005 on 금 4월 25 14:18:36 2003
/proc on /proc read/write/setuid/dev=3b00000 on 금 4월 25 14:18:35 2003
/dev/fd on fd read/write/setuid/dev=3bc0000 on 금 4월 25 14:18:37 2003
...

==> /etc/mnttab 을 참조함(마운트, 언마운트시 자동 업데이트. No Admin)

2) 마운트(Mount)
마운트는 mount 명령어를 이용하거나, 부팅 시 /etc/vfstab 파일 정보를 읽고 자동으로 마운트되는 두 가지 경우가 있다.

- 수동 마운트
# mount /dev/dsk/c0t3d0s7 /dir1
# mount -o ro /dev/dsk/c0t3d0s6 /dir2
# mount -o ro,nosuid,nolargefiles /dev/dsk/c0t0d0s5 /dir3
# mount -o ro,bg,soft host1:/usr/local /usr/local

- 자동 마운트
# mkdir /newdir
# mount /dev/dsk/c0t1d0s4 /newdir
# vi /etc/vfstab (엔트리를 추가)
# umount /newdir (테스트)
# mount /newdir (테스트)

cf. # mount /dir1 (=> /etc/vfstab에 이미 등록되어 있는 경우)
cf. # mountall [-r|-l] (=> /etc/vfstab에 "mount at boot" 값이 yes인 것만)

[ /etc/vfstab 파일 ]
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /usr ufs 1 no -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /var ufs 1 no -
/dev/dsk/c0t1d0s0 /dev/rdsk/c0t1d0s0 /usr/local ufs 2 yes -
/dev/dsk/c0t1d0s1 /dev/rdsk/c0t1d0s1 /export/home ufs 2 yes nosuid,rq
swap - /tmp tmpfs - yes -

3) 언마운트
# umount /dir1
# umount /dev/dsk/c0t3d0s7

cf. # umountall [-r|-l] (=> /, /usr, /var, /var/run, /proc, /dev/fd, /tmp 는 제외)

[ umount 되지 않은 경우 조치 사항 ]
- 자신 또는 다른 사용자가 해당 파일시스템을 사용하고 있다면, 모든 사용을 중지하고 작업 디렉터리도 다른 곳으로 이동한다.
- 특정 프로세스가 해당 파일시스템을 사용하는 경우 이를 종료한다.
# fuser -u /export/home
/export/home: 4006c(root) 6399c(user01)
# fuser -u -k /export/home
/export/home: 4006c(root)Killed 6399c(user01)Killed
또는
# umount -f /export/home ( Solaris 8 부터)

4) 플로피 디스크와 CDROM 마운트
솔라리스에서는 volume Management를 제공하며, 쉽게 사용할 수 있도록 자동으로 마운트하여 서비스 한다.

[ Volume Management ]
- 서비스 데몬 : /usr/sbin/vold
- 서비스 데몬 제어 스크립트 : /etc/init.d/volmgt {stop|start}
- 설정 파일 : /etc/vold.conf, /etc/rmmount.conf ( 특별히 설정을 할 필요는 없다)
- 플로피 마운트 포인트 : /floppy/floppy0
- CDROM 마운트 포인트 : /cdrom/cdrom0

[ 플로피의 마운트 ]
플로피를 삽입한다.
# volcheck
# mount (마운트 확인)
# cd /floppy/floppy0 (필요한 작업 수행)
# cd /
# eject floppy
# mount (언마운트 확인)

cf. 수동마운트
# /etc/init.d/volmgt stop
# pkill -9 vold
# mount -F pcfs /dev/diskette /mnt (=> msdos file system)
# mount /dev/diskette /mnt (=> ufs file system)

cf. 플로피 포맷
# fdformat -d /dev/rdiskette (msdos 포맷)
# newfs /dev/rdiskette (ufs포맷)

[ CDROM 마운트 ]
CDROM을 삽입한다.
# mount (마운트 확인)
# cd /cdrom/cdrom0 (필요한 작업 수행)
# cd /
# eject cdrom
# mount (언마운트 확인)

cf. 수동마운트
# /etc/init.d/volmgt stop
# pkill -9 vold ( vold가 종료되지 않는 경우에만)
# mount -F hsfs -o ro /dev/dsk/c0t2d0s0 /mnt

cf. CDROM이 빠져 나오지 않거나 마운트, 언마운트가 되지 않는 경우 조치사항
# ps -ef | grep vold (데몬을 확인)
# /etc/init.d/volmgt stop
# /etc/init.d/volmgt start
... (해결이 안되면)
# pkill -9 vold
# ps -ef | grep vold (vold 프로세스가 확실히 종료했는지 확인)
# /etc/init.d/volmgt start
# ps -ef | grep vold (vold가 새로 동작하였는지 확인)

[ ISO 9660 파일 시스템 마운트 ]

- ISO 파일 생성하기
# mkisofs -o test.iso /etc/init.d
# ls -l test.iso

- 루프 백 디바이스 설정하기
# lofiadm
Block Device File
# lofiadm -a /usr/local/test.iso
/dev/lofi/1
# lofiadm /dev/lofi/1
/usr/local/test.iso

- 마운트
# mount -F hsfs -o ro /dev/lofi/1 /mnt
# ls /mnt
(사용한 후)
# umount /mnt
# lofiadm
# lofiadm -d /dev/lofi/1

5) 파일 시스템을 정의하는 파일
mount 명령을 수행할 때 특별히 파일시스템 타입을 명시하지 안는 경우 로컬파일 시스템은 /etc/vfstab, /etc/default/fs순이며
원격파일 시스템은 /etc/vfstab, /etc/dfs/fstypes이다.

/etc/vfstab
ex) /dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /usr ufs 1 no -
/etc/default/fs
ex) LOCAL=ufs
/etc/dfs/fstypes
ex) nfs NFS Utilities
autofs AUTOFS Utilities
cachefs CACHEFS Utilities


9. 파일 시스템 관리

시스템의 부적절한 중지(정전, 비정상 종료 등..)로 인해 파일 시스템이 손상될 경우 fsck 유틸을 이용하여 복구해 주어야 한다.
fsck는 superblock, inode, indirect block, data block 을 검사하고 치료한다.

- Superblock 검사
파일 시스템 사이즈, inode number, free block count, free inode count
- inode 검사
format and type, link count, duplicate block, bad block number, inode size
- Indirect block 검사
블록이 다른 inode에 의해 이미 점유되어 있는 것
블록의 수가 파일 시스템의 범위에 어긋난 것
- data block 검사
평범한 data block
심볼릭 링크 data block
디렉토리 data block

1) fsck (file system check ) 명령의 수행 순서
- Phase 1 : Check Blocks and Sized
- Phase 2 : Check Pathnames
- Phase 3 : Check Connectivity
- Phase 4 : Check Reference Counts
- Phase 5 : Check Cyl groups

주의사항) 마운트 되어 사용하고 있는 파일 시스템은 fsck를 쓸 수 없다. 언마운트하거나 싱글유저 모드에서 처리한다.

2) fsck 명령 사용법
fsck [ -F FSType] [-V] [-m] [special] /dev/rdsk/장치 명

# umount /export/home
# fsck -V /export/home (실행하지는 않고 실행 명령어를 보여줌)
fsck -F ufs /dev/rdsk/c0t0d0s7 ( => /etc/vfstab을 참조한다.)
# fsck /dev/rdsk/c0t0d0s6

cf. SuperBlock 이 손상되어 복구되지 않는 경우
# newfs -N /dev/rdsk/c0t3d0s7 (=> 백업 수퍼블럭 번호를 확인)
/dev/rdsk/c0t3d0s7: 4199508 sectors in 6603 cylinders of 4 tracks, 159 sectors
2050.5MB in 104 cyl groups (64 c/g, 19.88MB/g, 3392 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 40896, 81760, 122624, 162848, 203712, 244576, 285440, 325664, 366528,
407392, 448256, 488480, 529344, 570208, 611072, 651296, 692160, 733024,
773888, 814112, 854976, 895840, 936704, 976928, 1017792, 1058656, 1099520,
1139744, 1180608, 1221472, 1262336, 1302560, 1343424, 1384288, 1425152,
1465376, 1506240, 1547104, 1587968, 1628192, 1669056, 1709920, 1750784,
1791008, 1831872, 1872736, 1913600, 1953824, 1994688, 2035552, 2076416,

# fsck -F ufs -o b=40896 /dev/rdsk/c0t3d0s7 (=> 파일 시스템 체크 )

3) 디스크 사용 관리
- df 명령 : 마운트된 각 파일 시스템의 사용에 관한 정보를 보여주는 명령어
# df -k (Kb 단위로 보여줌)
# df -n (파일 시스템의 유형을 보여줌)
# df -k -F ufs ( ufs 파일 시스템만 보여줌)

- du 명령 : 파일과 디렉터리에 대한 사용 정보를 보여주는 명령어
# du -k . (현재 디렉터리 이하의 사용량)
# du -ks /etc ( /etc 전체의 사이즈)

- quot 명령 : 각 파일시스템에 대한 유저별의 사용량을 보여줌
# quot -a ( 모든 파일시스템을 Kb 단위로 보여줌)
# quot -af ( 디스크 사용량과 함께 파일 수도 보여줌)

4) quota 에 대한 설정
사용자들에 제한된 용량만 사용할 수 있도록 설정하고 관리할 수 있다.
자세한 설정 방법은 다음을 참고한다.
http://docs.sun.com/db/doc/805-7229/6j6q8svfc?a=view
http://www.unix.co.kr/data/solaris/?p=sa13
http://www.jic.co.kr/ypct110.htm

5) swap의 추가
# swap -l (현재 설정된 스왑 정보를 출력)
# mkdir /files (추가할 swap파일이 위치할 디렉토리 생성)
# mkfile 24m /files/swapfile (스왑을 위한 덩어리 파일 생성)
# swap -a /files/swapfile (스왑을 추가, 주의: 절대경로로 써야 한다.)
# swap -l (확인)
# vi /etc/vfstab (부팅 시 자동으로 마운트 되도록 수정)
/files/swapfile - - swap - no -

# swap -d /files/swapfile ( 제거할 경우 )
# rm /files/swapfile
# vi /etc/vfstab (추가된 스왑 설정 라인을 제거)
# swap -l (확인)

10. 솔라리스 설치 (Solaris Installation)

* 솔라리스 9 소개
http://kr.sun.com/products/software/os_platforms/solaris/index.html
* 솔라리스 8 소개
http://kr.sun.com/products/software/os_platforms/solaris/8/index.html
* 전체 버전 간의 차이 비교
http://wwws.sun.com/software/solaris/fcc/fcc.html
* Solaris 9 Installation Guide
http://docs.sun.com/db/doc/806-5205
* Solaris 8 (SPARC Platform Edition) Installation Guide
http://docs.sun.com/db/doc/806-0955
* Solaris for Intel 설치(한글)
http://myhome.naver.com/yasicom/solaris.htm


1) 솔라리스 8 설치 전 준비 사항
설치에 필요한 최소한의 CD (국제판)
- Solaris 8 Installation CD
- Solaris 8 Software 1/2 CD
- Solaris 8 Software 2/2 CD
- Solaris 8 Language CD

2) 하드웨어 요구사항
- Sparc Base 또는 Intel Based 시스템
- 64 MB 메모리
- 2.1 GB 디스크 스페이스
- CD-ROM 드라이브

3) Solaris 8 설치 전 정보 수집
- 호스트 이름
- IP 주소
- 네이밍 서비스(DNS, NIS, NIS+, 없음)의 유형 및 구성 정보
- subnet mask
- root password
- 소프트웨어 그룹
Entire Distribution(2.1G 권장) + OEM, Entire Distribution(1.9G 권장), Developer(1.5G 권장), End User(1.2G 권장), Core(718M 권장)
- OS를 설치할 디스크 설정 및 파티션 설정

4) 설치 방법
- WebStart Installation ( Install CD)
- JumpStart Installation ( from Jumpstart Server System)
- Interactive Installation ( Software 1/2 CD)

5) 설치 순서
CDROM 넣고
# shutdown -i0 -y -g0 ( init 0 또는 Stop + A)
OK set-defaults
OK boot cdrom
- 시스템 식별
- 디스크 선택 및 파티션 설정
- 소프트웨어 그룹 설정
- 설치 후 재부팅
- Software 2/2 CD, Language CD 차례로 설치

6) 설치 시 유의사항
- 32Bit, 64Bit Kernel 선택 ( OS install 후 확인은 isainfo -kv)
- 설치 후 소프트웨어 그룹 유형확인 ( # cat /var/sadm/system/admin/CLUSTER )
SUNWCXall(Entire +OEM), SUNWCall(Entire), SUNWCprog(Developer), SUNWCuser(End User), SUNWCreq(Core)
- 파티션 권장사항 ( / 100M, /usr 500M~1G, /var 128M이상, swap 메모리2~3배, /opt 400M이상, /export/home 필요한 만큼)


11. 패키지 관리

1) 패키지 정보
# pkginfo | more (전체 보기)
# pkginfo | grep SUNWman (특정 패키지 설치여부)
# pkginfo -l SUNWman (특정 패키지의 자세한 정보)
# pkginfo -d /cdrom/solarisxxx/Solaris_8/Product | more (CDROM 내의 패키지 정보)
# pkginfo -d /cdrom/solarisxxx/Solaris_8/Product -l SUNWaudio (CDROM 내의 특정 패키지 정보)
# pkginfo | wc -l ( 설치된 총 패키지 수)

# grep /usr/bin/audioplay /var/sadm/install/contents (audioplay 의 패키지 이름 알아내기1)
# pkgchk -l -p /usr/bin/audioplay (audioplay의 패키지 이름 알아내기2)

# pkgchk SUNWaudio ( 설치 성공 여부 확인, 성공 시 메시지 없음)
# pkgchk -v SUNWaudio (특정 패키지에 대한 자세한 설치 위치)
# pkgchk -p /etc/passwd (특정 파일에 대한 초기 패키지 설치후의 변경 정보)

2) 패키지 추가
# pkgadd -d /cdrom/solxxxx/Solaris_8/Product SUNWaudio
# pkgadd -d /cdrom/solxxxx/Solaris_8/Product -s spool SUNWaudio ( /var/spool/pkg에 패키지 스풀)
# pkgadd -d /cdrom/solxxxx/Solaris_8/Product -s /export/pkgs SUNWaudio ( /export/pkgs에 패키지 스풀)
* GUI의 어드민 툴(admintool)을 이용하여 설치할 수도 있다.(cf. sysadmin(14) 가능)

3) 패키지 제거
# pkgrm SUNWaudio
# pkgrm -s spool SUNWaudio (/var/spool/pkg 의 스풀 패키지 제거)
# pkgrm -s /export/pkgs SUNWaudio (/export/pkgs의 스풀 패키지 제거)
* GUI의 어드민 툴(admintool)을 이용하여 제거할 수도 있다.(cf. sysadmin(14) 가능)

4) 기타 Freeware 패키지 활용
http://www.sunfreeware.com 에서 다양한 무료 패키지를 제공한다.

- 업데이트 및 설치를 위한 편리한 pkg-get 툴도 제공한다. 자세한 정보는 아래 참조.
http://www.sunfreeware.com/pkg-get.html
- 패키지를 직접 제작하고 싶을 경우에는 다음을 참조한다.
http://www.sunfreeware.com/pkgadd.html


12. 패치 관리

패치에 관한 다양한 정보와 패치 파일은 아래 사이트를 참조한다.
http://sunsolve.sun.com
ftp://sunsolve.sun.com/pub/patches

패치를 관리하거나 설치하기 위해서는 패치 번호를 먼저 파악해야 하고, 이는 Solaris#.PatchReport를 다운 받아 확인한다.
OS설치 후 반드시 Recommended Patch및 최신 보안 패치를 해 주어야 한다. 패치번호는 다음과 같이 구성되어있다.
109320-02 (패치번호-revision number)

1) 패치 정보
# showrev -p (시스템에 설치된 패치 정보 보기)
# patchadd -p (Solaris 2.6부터, Shell script)
# showrev -p | grep 109320
# patchadd -p | grep 109320

2) 초기 설치해야 할 패치와 참고 문서
Solaris8.PatchReport : Solaris8의 모든 recommended 패치 정보
8_Recommended.zip : Solaris8의 모든 recommended 패치 파일들
8_Recommended.README : Solaris8의 모든 recommended 패치 설치 방법과 설명

3) 패치 정보 및 저장 디렉토리
/var/sadm/patch

4) 패치 설치
# /usr/bin/unzip 109320-03.zip ( Solaris 7부터)
# /usr/bin/zcat 104040-01.tar.Z | tar xvf - (Solaris2.6)

# more 109320-03/README (반드시 관련 README를 읽어본다.)
# patchadd 109320-03 (패치를 수행)
# showrev -p | grep 109320 (설치 여부를 확인)

# patchrm 109320-03 (패치를 제거)
# showrev -p | grep 109320 (제거 여부를 확인)

- 주의사항 : Solaris2.6이전은 패치 디렉토리 내의 스크립트를 이용한다.
[설치 시]
# cd 109320
# ./installpatch .
[제거시]
# cd /var/sadm/patch/109320
# ./backoutpatch 109320

5) 패치 정보의 관리
http://sunsolve.sun.com의 Patch Portal에는 패치를 체계적이고 편리하게 다룰 수 있는 Patch finder, Patch Pro, Patch Check등을
제공한다.

6) 패치 에러 코드 정리
0 No error
1 Usage error
2 Attempt to apply a patch that's already been applied
3 Effective UID is not root
4 Attempt to save original files failed
5 pkgadd failed
6 Patch is obsoleted
7 Invalid package directory
8 Attempting to patch a package that is not installed
9 Cannot access /usr/sbin/pkgadd (client problem)
10 Package validation errors
11 Error adding patch to root template
12 Patch script terminated due to signal
13 Symbolic link included in patch
14 NOT USED
15 The prepatch script had a return code other than 0.
16 The postpatch script had a return code other than 0.
17 Mismatch of the -d option between a previous patch install and the current one.
18 Not enough space in the file systems that are targets of the patch.
19 $SOFTINFO/INST_RELEASE file not found
20 A direct instance patch was required but not found
21 The required patches have not been installed on the manager
22 A progressive instance patch was required but not found
23 A restricted patch is already applied to the package
24 An incompatible patch is applied
25 A required patch is not applied
26 The user specified backout data can't be found
27 The relative directory supplied can't be found
28 A pkginfo file is corrupt or missing
29 Bad patch ID format
30 Dryrun failure(s)
31 Path given for -C option is invalid
32 Must be running Solaris 2.6 or greater
33 Bad formatted patch file or patch file not found
34 The appropriate kernel jumbo patch needs to be installed

13. 백업

백업에 대한 자세한 문서는 다음을 참조한다.
http://docs.sun.com/db/doc/805-7228/6j6q7uf0u?a=view

- Full dump : 파티션 전체를 백업
- Incremental dump: 전체 백업 후 변경된 것만 백업
- 선택적 backup: 특정 파일이나 디렉토리를 백업
- Multivolume Backup : 여러 의 미디어를 이용한 백업

1) 백업 디바이스 종류
1/2-inch reel tape(140MB)
2.5-Gbyte 1/4 inch Cartridge(QIC) tape (2.5GB)
DDS3 4mm cartridge tape (DAT) (12-24GB)
14-Gbyte 8-mm cartridge tape (14GB)
DLT 7000 1/2-inch cartridge tape (35~70GB)

cf. /dev/rmt/xyn
x: 장치 번호 (0,1,2...)
y; 밀도 (h, m, l, c, u)
n: rewind 여부

2) mt 명령어 (tape을 제어하기 위해 사용)

# mt -f /dev/rmt/0 status (-> backup device의 상태를 표시 )
# mt -f /dev/rmt/0n eom (-> tape의 맨 끝으로 이동 )
# mt -f /dev/rmt/0 rewind (-> tape를 제일 처음으로 되감는다. )
# mt -f /dev/rmt/0n fsf [count] (-> count 개수 만큼 파일 뒤로 건너 띈다. )
# mt -f /dev/rmt/0n nfsf [count] ( -> count+1 개수 만큼 파일 뒤로 건너 띈다. )
# mt -f /dev/rmt/0n bsf [count] (-> count 개수 만큼 파일 앞으로 건너 띈다. )
# mt -f /dev/rmt/0n nbsf [count] (-> count+1 개수 만큼 파일 앞으로 건너 띈다. )
# mt -f /dev/rmt/0 erase (-> tape의 모든 내용을 지운다. tape나 device에 따라 다르나 시간이 많이 걸린다. )
# mt -f /dev/rmt/0 offline (-> tape가 eject 된다. )


3) tar, dd 명령어

# tar tvf /dev/rmt/0 ( -> tape의 내용을 확인함 )
# tar xvf /dev/rmt/0 ( -> tape에있는 내용을 Hard disk로 내림 )
# tar cvf /dev/rmt/0 /etc/hosts (-> Hard disk에있는 file 이나 directory를 tape로 받음 )
# tar cvfb - backup_dir | rsh host dd of=/dev/rmt/0 (-> remote host에있는 drive로 backup 받기)
# rsh -n host_name dd if=/dev/rmt/0 |tar xvBfb - restore_dir ( -> remote host에있는 drive로 backup 내리기 )


4) cpio 명령어

* 현재 디렉토리의 내용을 tape로 backup
# find . -print | cpio -ovcB > /dev/rmt/0
* tape에서 file을 extract
# cpio -ivcB /var/tmp/space < /dev/rmt/0
* 최근 일주일 내에 수정된 file을 tape로 받는다
# find . -mtime -7 -print | cpio -ovcB > /dev/rmt/0n
# find . -name 'file*' -print | cpio -ovcB > file.list
# cpio -ivt < file.list


5) ufsdump, ufsrestore 명령어

* /export/home이 /dev/rdsk/c0t0d0s3이라 가정

- dump할 파일 또는 파일시스템 용량확인
# df -k /export/home
# ufsdump 0S /export/home [ Mega ==> # / (1024 x 1024) ]

- Full Dump
# umount /export/home
# fsck /export/home
# ufsdump 0uf /dev/rmt/0 /export/home

- Incremental Dump
# umount /export/home
# fsck /export/home
# ufsdump 3uf /dev/rmt/0 /export/home
# cat /etc/dumpdates

- ufsrestore
# mount /export/home
# cd /export/home
# ufsrestore tvf /dev/rmt/0 (내용을 확인)
# ufsrestore rvf /dev/rmt/0 (내용을 모두 복구)
# ls /export/home ( Check filesystem restore)

# cd /var/tmp
# ufsrestore ivf /dev/rmt/0 (interactive로 일부만 복구)

- remove restoresymtable file
# rm /export/home/restoresymtable


14. 로그 관찰 및 성능 측정

1) 로그 분석

- /etc/syslog.conf (syslog 데몬 설정파일)
- /var/adm/sulog ( => su 관련 로그)
- /var/adm/messages ( => system 중요 로그 파일)
- /var/adm/loginlog (=> 로긴 관련 로그)
- /var/sadm/* (=> 패키지 관련 로그)

로그는 다음 문서를 참조한다.
http://www.certcc.or.kr/paper/tr2001/tr2001-05/unix_log_analysis.pdf (유닉스 로그 분석 1)
http://www.certcc.or.kr/paper/tr2001/tr2001-07/Unix_log_analysis_II.pdf (유닉스 로그 분석 2)

2) 시스템 퍼포먼스 관리

- System Administration Guide, Volume 2 >> 33. Managing System Performance Topics
http://docs.sun.com/db/doc/805-7229/6j6q8svgf?a=view
- SUN PERFORMANCE
http://www.sun.com/sun-on-net/performance.html
- Solaris Tunable Parameters Reference Manual
http://docs.sun.com/db/doc/816-0607
- 썬 시스템 메모리 정보 (Sun UNIX memconf utility)
http://www.4schmidts.com/memconf.html
- Unix and Windows NT System Tools
http://webperso.easyconnect.fr/sgarnaud/unixtools/index.html



5부. 네트웍 어드민

1. Network Setup

1) /etc/hostname.<Interface> 에 호스트 이름을 기록
ex) host1

2) /etc/hosts 파일에 ip설정
ex) 192.168.1.20 host1 loghost

3) /etc/defaultrouter 에 gw ip 설정
ex) 203.234.247.254

4) Netmask 설정
ex) 203.234.247.0 255.255.255.0

5) /etc/resolv.conf 에 DNS서버 등록
ex) domain ns.hananet.net
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

6) /etc/resolv.conf 에 dns 문자를 추가
....
hosts files dns ( ==> dns 추가)

7) 재부팅
# reboot

cf. 재부팅 없이 IP 변경
# ifconfig -a
# ifconfig hme0 down
# ifconfig hme0 203.234.247.30 net mask 255.255.255.0 broadcast + up (=> 설정)
# ifconfig hme0 (=> 확인)
# route add default 203.234.247.254 1 (=> 기본 게이트웨이 설정)

cf. 호스트 이름 변경
다음 6개 파일을 수정한다.
/etc/hosts
/etc/hostname.<interface>
/etc/nodename
/etc/net/*/hosts (3개)

cf. Network Interface Name
Lance Ethernet(10M Ethernet) : le
Fast Ethernet 1.0 : be
Fast Ethernet 2.0 이상 : hme
Quad Ethernet : qe
Quad FastEthernet 1.0 : hme
Quad FastEthernet 2.0 이상 : qfe
Gigabit Ethernet : vge
ATM 1.0 : sa
ATM 2.0 이상 : ba
FDDI : nf
Token Ring : tr


2. TCP/IP Network Layer

이론에 관한 문서는 다음을 참조한다.
- Introduction to TCP/IP
http://www.yale.edu/pclt/COMM/TCPIP.HTM
- SolarisTM 2.x - Tuning Your TCP/IP Stack and More
http://www.sean.de/Solaris/soltune.html
- TCP/IP 프로토콜
http://jkkang.net/unix/netprg/chap1/net1_2.html
- RFC 문서
ftp://ftp.isi.edu/in-notes/rfc793.txt

1) ifconfig
# ifconfig -a (모든 Network Interface 설정 정보 출력)

# ifconfig hme0 down (=> Interface disable)
# ifconfig hme0 up (=> Interface enable)

# ifconfig hme0 unplumb (=> Interface close)
# ifconfig hme0 plumb (=> Interface open)

# ifconfig hme0 203.234.247.30 netmask 255.255.255.0 broadcast + up (=> 설정)

2) rlogin, rsh, rcp

명령어: rlogin, rsh, rcp
설정파일(user): /etc/hosts.equiv, $HOME/.rhosts
설정파일(root): /.rhosts
서버호스트: sun01
클라이언트: sun02

- 서버 쪽 관리자가 설정
sun01# vi /etc/hosts ( 허락할 클라이언트 호스트 등록)
sun01# echo "sun02 user01" > /etc/hosts.equiv ( 허락할 호스트 및 유저등록)
sun01# chmod 600 /etc/hosts.equiv

- 클라이언트 관리자가 설정
sun02# vi /etc/hosts ( 접근할 서버 호스트 등록)

- test (클라이언트에서)
sun02# su - user01
sun02$ rlogin sun01
sun01$ hostname
sun01$ exit

- 서버 쪽 일반유저가 허락할 때
sun01# rm /etc/hosts.equiv
sun01# su - user01
sun01$ echo "sun02 user01" > $HOME/.rhosts
sun01$ chmod 600 $HOME/.rhosts

- Test (클라이언트에서)
sun02# su - user01
sun02$ rlogin sun01
sun01$ hostname
sun01$ exit

- 기타 r계열 명령어
sun02# su - user01
sun02$ hostname
sun02$ rsh sun01 hostname
sun02$ rcp /etc/profile sun01:a.txt
sun02$ rsh sun01 ls (a.txt가 복사되었는지 확인)

3) 기타 네트웍 명령어
# ping google.co.kr
# ping -s google.co.kr
# rusers (Local Network 사용자 정보, cf who)
# rusers -l hostA ( hostA에 대해 로긴한 사용자 정보)

4) 기타 Freeware
nmap(Port Scanning), traceroute(trace rote inform), nslookup(DNS info), dig(DNS info) ...

3. FTP Server

- 일반적으로 inetd에 의한 중재 방식과 standalone방식이 있다.
- anonymous ftp서비스를 위해서는 맨 페이지나 다음 사이트를 참고한다.
How to Set up a Secure Anonymous FTP Site
http://secinf.net/unix_security/How_to_Set_up_a_Secure_Anonymous_FTP_Site.html
- 보다 많은 설정과 기능을 제공하는 wu-fptd나 proftpd로 대체할 수 있다. (패키지는
www.sunfreeware.com)
WU-FTPD Development Group (http://www.wu-ftpd.org/)
The ProFTPD Project (http://www.proftpd.net/)
vsftpd (http://vsftpd.beasts.org/)

/usr/sbin/inetd (/etc/inetd.conf) ---> /usr/sbin/in.ftpd

4. Telnet Server

- 요즘은 보안 때문에 telnet 보다는 Secure Shell(ssh)을 사용하는 것이 일반적이다.


5. NFS (Network File System)

NFS는 썬에서 개발한 분산 환경 파일시스템으로서 원격지에서 공유한 일부를 로컬에서 쉽게 연결해서 쓸 수 있는 공유파일시스템이다.
자세한 문서는 다음을 참고한다.
- NFS FAQ
http://www.ebsinc.com/solaris/network/nfs.html
- Chapter 29 Solaris NFS Environment
http://docs.sun.com/db/doc/806-0916/6ja8539fd?a=view

1) NFS의 장점
- 여러 대의 컴퓨터가 모두 같은 자료에 접근하여 같은 파일을 사용할 수 있다.
- 데이터의 중복을 줄이고 관리를 최소화할 수 있다.
- 서로 다른 환경을 지원한다.
- 시스템 관리 오버헤드를 줄인다.

2) NFS Server
- 관련 파일
/etc/dfs/dfstab
/e
_________________

 

-- 출처

http://solaris.mesani.net/viewtopic.php?p=181&%3Bsid=181a97b868063a61147140ecbec5f5fe