'Unix'에 해당되는 글 12건
NFS 서버로 원격접속하기
Unix
Helvetica, Arial, sans-serif; font-size: 0.9em; overflow-x: hidden; overflow-y: auto; margin: 0px !important; padding: 5px 20px 26px !important;padding: 20px;padding: 20px; color: rgb(0, 0, 0); font-size: 15px; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', AppleSDGothicNeo-Medium, 'Segoe UI', 'Malgun Gothic', Verdana, Tahoma, sans-serif; background-color: rgb(255, 255, 255); -webkit-font-smoothing: antialiased; background-position: initial initial; background-repeat: initial initial;">

NFS - 파일이나 백업용 서버로 많이씀
mountd Daemon , NFS Server Daemon (NFSD) : 공유해주는 서버
file handle : server에 있는 파일이나 디렉토리 식별
/etc/dfs/dfstab : 공유내역 저장하는 파일

server 역할

vi /etc/dfs/dfstab

  • share -o ro /usr/share/man 이나
  • share -o rw /usr/share/man 이나
  • share -o root /usr/share/man 수정

/etc/init.d/nfs.server start - daemon 시작
share - 공유디렉토리 확인
dfshare - 공유되있는 디렉토리 리스트 확인
dfmounts - 공유되있는 사용자 리스트 확인

client 역할

mv /usr/share/man /usr/share/men -man을 men으로 이름변경
man ls -man있는지 확인
mkdir /usr/share/man -man디렉토리 생성
mount server104/usr/share/man /usr/share/man -server104의 /usr/share/man으로 mount
man ls -man확인
mount -마운트확인
dfmounts server104 -server104에 연결되어있는지 마운트 확인
umount /usr/share/man -마운트해제
dfmounts server104 -server104에 연결되어있는지 마운트 확인




문제풀기

  1. server2 에 100m 디스크 추가 후 /data로 마운트 하세요
  2. server2 의 /data를 읽기/쓰기가 가능하도록 공유하세요
  3. server1에서 server2의 /data를 /server1/backup으로 NFS연결하세요
  4. server1에서 /etc/ssh 디렉토리를 /server1/backup/ssh_backup.tar.zip으로 백업하세요

server2의 역할

touch reconfigure
init 6
100mb 디스크생성
format 파티션설정
100m 디스크추가


newfs dev/rdsk/c1d1s0 -포맷
mount dev/dsk/c1d1s0 -마운트
vi /etc/dfs/dfstab -/data를 읽기/쓰기 가능하도록 설정
share -o root=server104:server105 /data -공유 설정
/etc/init.d/nfs.server stop -server stop
/etc/init.d/nfs.server stop -server start

server1의 역할

mkdir -p /server1/backup -디렉토리생성
mount server104:/data /server1/backup -server1/backup을 server104의 data로 마운트
cd /server1/backup -경로이동
tar cvf /server1/backup/ssh_backup.tar.zip /etc/ssh/* -ssh_backup.tar.zip 으로 압축
cp ssh_backup.tar.zip /data1 -data1로 백업




과정 전문 server b

login as: root
root@172.16.5.110's password:
Last login: Mon Aug 18 17:44:38 2014 from 172.16.5.11
Sun Microsystems Inc.   SunOS 5.9       Generic January 2003
#
#
#
#
#
# bash
bash-2.05# formatAug 18 17:45:03 server110 sendmail[227]: [ID 702911 mail.alert] unable to qualify my own domain name (server110) -- using short name
Aug 18 17:45:03 server110 sendmail[226]: [ID 702911 mail.alert] unable to qualify my own domain name (server110) -- using short name


Searching for disks...
done


AVAILABLE DISK SELECTIONS:
       0. c0d0 <DEFAULT cyl 22189 alt 2 hd 15 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
       1. c2t0d0 <DEFAULT cyl 1020 alt 2 hd 64 sec 32>
          /pci@0,0/pci15ad,1976@10/sd@0,0
Specify disk (enter its number): Specify disk (enter its number): Specify disk (enter its number): 1
selecting c2t0d0
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> q
bash-2.05# touch reconfigure
bash-2.05# reboot
login as: root
root@172.16.5.110's password:
Last login: Mon Aug 18 17:48:00 2014 from 172.16.5.11
Sun Microsystems Inc.   SunOS 5.9       Generic January 2003
#
#
#
# bash
bash-2.05#
bash-2.05#
bash-2.05#
bash-2.05# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0d0 <DEFAULT cyl 22189 alt 2 hd 15 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
       1. c0d1 <DEFAULT cyl 2078 alt 2 hd 16 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0
Specify disk (enter its number): 1
selecting c0d1
Controller working list found
[disk formatted, defect list found]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        show       - translate a disk address
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> part
Please run fdisk first.
format> fdisk
No fdisk table exists. The default partition for the disk is:

  a 100% "SOLARIS System" partition

Type "y" to accept the default partition, otherwise type "n" to edit the
partition table.

 Please answer with "y" or "n": y
format> Aug 18 17:48:23 server110 sendmail[235]: [ID 702911 mail.alert] unable to qualify my own domain name (server110) -- using short name
Aug 18 17:48:23 server110 sendmail[234]: [ID 702911 mail.alert] unable to qualify my own domain name (server110) -- using short name

format> part


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> 0
Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)          0

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: $
partition> label
Ready to label disk, continue? y

partition> q


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        show       - translate a disk address
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> q
bash-2.05#
bash-2.05#
bash-2.05# mount /dev/dsk/c0d1s0 /data
mount: /dev/dsk/c0d1s0 is not this fstype.
bash-2.05# newfs /dev/rdsk/c0d1s0
newfs: construct a new file system /dev/rdsk/c0d1s0: (y/n)? y
/dev/rdsk/c0d1s0:       2093616 sectors in 2077 cylinders of 16 tracks, 63 sectors
        1022.3MB in 130 cyl groups (16 c/g, 7.88MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 16224, 32416, 48608, 64800, 80992, 97184, 113376, 129568, 145760,
 1935904, 1952096, 1968288, 1984480, 2000672, 2016864, 2033056, 2049248,
 2064416, 2080608,
bash-2.05#
bash-2.05#
bash-2.05#
bash-2.05# mount /dev/dsk/c0d1s0 /data
bash-2.05# vi /etc/dfs/dfstab
"/etc/dfs/dfstab" 13 lines, 433 characters

#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command '/etc/init.d/nfs.server start' to run the NFS
#       daemon processes and the share commands, after adding the very
#       first entry to this file.
#
#       share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
        share -o root=server117:server110 /data

~
~
~
~
~
~
~
~
~
~
"/etc/dfs/dfstab" 13 lines, 435 characters
bash-2.05# /etc/init.d/nfs.server stop
bash-2.05# /etc/init.d/nfs.server start
bash-2.05# share
-               /data   root=server117:server110   ""
bash-2.05#
bash-2.05#
bash-2.05# ls
TT_DB       data        home        net         sbin        xfn
bin         dev         kernel      opt         tmp
boot        devices     lib         p1          usr
cdrom       etc         lost+found  platform    var
core        export      mnt         proc        vol
bash-2.05# cd /data
bash-2.05# ls
lost+found          ssh_backup.tar.zip
bash-2.05#

serber a 과정전문

login as: root
root@172.16.5.117's password:
Last login: Mon Aug 18 17:25:10 2014 from 172.16.5.18
Sun Microsystems Inc.   SunOS 5.9       Generic January 2003

********************
* 여기는 server117 *
*    welcome ㅋㅋ  *
********************


You have new mail.
bash-2.05# mount server110:/usr/share/man /usr/share/man
nfs mount: server110:/usr/share/man: Permission denied
bash-2.05# vi /etc/dfs/dfstab








"/etc/dfs/dfstab" 12 lines, 428 characters

#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command '/etc/init.d/nfs.server start' to run the NFS
#       daemon processes and the share commands, after adding the very
#       first entry to this file.
#
#       share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
#       share -o root=server117 /usr/share/man
~
~
~
~
~
~
~
~
~
~
~
:q!
bash-2.05#
bash-2.05# mount server110:/usr/share/man /usr/share/man
bash-2.05# touch /usr/share/man/test
bash-2.05# dfmounts server110
RESOURCE     SERVER PATHNAME                  CLIENTS
  -       server110 /usr/share/man           server117
  -       server110 /usr/share/men2          server117
bash-2.05# umount /usr/share/man
bash-2.05# dfmounts server110
RESOURCE     SERVER PATHNAME                  CLIENTS
  -       server110 /usr/share/men2          server117
bash-2.05#
bash-2.05# vi /etc/dfs/dfstab
"/etc/dfs/dfstab" 12 lines, 428 characters

#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command '/etc/init.d/nfs.server start' to run the NFS
#       daemon processes and the share commands, after adding the very
#       first entry to this file.
#
#       share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
#       share -o ro /usr/share/man
#       share -o root=server110 /usr/share/man
~
~
~
~
~
~
~
~
~
~
"/etc/dfs/dfstab" 13 lines, 469 characters
bash-2.05# vi /etc/dfs/dfstab
"/etc/dfs/dfstab" 13 lines, 469 characters

#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command '/etc/init.d/nfs.server start' to run the NFS
#       daemon processes and the share commands, after adding the very
#       first entry to this file.
#
#       share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
#       share -o ro /usr/share/man
#       share -o root=server110 /usr/share/man
#       share -o root=server110 /data
~
~
~
~
~
~
~
~
~
"/etc/dfs/dfstab" 14 lines, 508 characters
bash-2.05# pwd
/
bash-2.05# ls
1           data        home        opt         sbin        vol
TT_DB       dev         kernel      p1          test        xfn
bin         devices     lib         p2          test.ls
boot        dir_test    lost+found  platform    tmp
cat         etc         mnt         proc        usr
cdrom       export      net         rhosts      var
bash-2.05# mkdir -p /server1/backup
bash-2.05# mount server110:/data /server1/backup
bash-2.05# rfmounts
bash: rfmounts: command not found
bash-2.05# dfmounts
nfs dfmounts: can't contact server: server117: RPC: Program not registered
bash-2.05# ls
1           data        home        opt         sbin        var
TT_DB       dev         kernel      p1          server1     vol
bin         devices     lib         p2          test        xfn
boot        dir_test    lost+found  platform    test.ls
cat         etc         mnt         proc        tmp
cdrom       export      net         rhosts      usr
bash-2.05# cd /server1/backup
bash-2.05# tar cvf /server1/backup/ssh_backup.tar.zip /etc/ssh/*
a /etc/ssh/ssh_config 1K
a /etc/ssh/ssh_host_dsa_key 1K
a /etc/ssh/ssh_host_dsa_key.pub 1K
a /etc/ssh/ssh_host_rsa_key 1K
a /etc/ssh/ssh_host_rsa_key.pub 1K
a /etc/ssh/sshd_config 5K
bash-2.05# ls
lost+found          ssh_backup.tar.zip
bash-2.05# cp ssh_backup.tar.zip /data
bash-2.05#

'Unix' 카테고리의 다른 글

unix crontab, runlevel,init 정의 및 사용법  (0) 2014.10.31
unix swap,top 정의 및 명령어  (0) 2014.10.31
UNIX,LINUX 사용자 관리 및 그룹관리  (0) 2014.10.31
서버보안 및 원격접속  (0) 2014.10.31
solaris10 설치 + Oracle 10g  (0) 2014.09.02
solaris10 설치 + Oracle 10g
Unix


solaris10(vmware)


Oracle 10g


하드디스크는 IED나 SCSI나 상관없고

RAM은 최소1024, 권장 1538이상


랭귀지 CD2장

솔라리스10 인스톨 CD 5장




STEP.1 Solaris 기본값 엔터



STEP.2 여기도 기본값 1



STEP3 . 한국어를 추가해줘도 되고, 여기선 영어로 한다.



STEP4. 엔터



STEP5. 솔라리스9와는 다르게 그래픽ui로 설치한다.

엔터



STEP6. 5번 korean 5번 엔터



STEP7. 주요설치 과정

다음


STEP8. 첫번째 네트워크에 연결되어 있음 체크하고 다음



STEP9. 예를 누르고 다음

유동아이피라면 예를 누르고 (DHCP)

고정아이피라면 아니오를 누른다.



STEP10. IPv6은 사용하지 않는다.

아니오를 누르고 다음으로 넘어가자



STEP11.방화벽 켈베로스는 선택하지 않는다.



STEP12. DNS를 체크하고 넘어간다.



STEP13. 아래 DBSERVER라고 되어있지만

kornet.net 써주고 넘어가면 된다.(KT도메인이름)



STEP14. KT도메인주소를 치고 넘어간다.

168.126.63.1



STEP15 . 걍 넘어간다.



STEP16. 시스템으로부터 자동으로 받기

다음



STEP17. 시간대를 입력해야 한다.

첫번째 체크후에 넘어가자.



STEP18. 대한민국 체크하고 다음으로



STEP19. 현재 시간을 설정하고 다음으로 넘어가자.



STEP20. root 계정의 암호를 적어주면 된다.



STEP21. 원격서비스 예 하고 넘어간다.


STEP22. 정보를 확인하고 맞으면 확인을 누르자



STEP23. 정보확인중 기다리자.



STEP24. 다음



STEP25. 두개 전부 예 로 체크하고 넘어가자



STEP26. 확인



STEP27. 여기서도 그렇고 아마 거의 cd/dvd로 설치할것이다.



STEP28.  초기화 중



STEP29. 라이센스 확인



STEP30. 설치유형은 사용자 설치로 간다.

사용자 설치 체크하고 넘어가자



STEP31. 설치 지역 체크

아시아->한국어



STEP32. 아시아 한국어 선택 후에 다음



STEP33. 없음에 체크하고 넘억가자



STEP34. 기본값인 전체 그룹 선택하고 넘어가자.

나중에 필요에 따라 선택하시면 된다.


STEP35. 하드디스크는 하나니까 그냥 넘어가면 된다.



STEP36. 기본 디스크 체크하고 넘어가면 된다.



STEP36. 현재 c0d1의 전체 크기 확인


STEP37. 슬라이스를 나눌건데

/  -> 8000

swap -> 2048 (램의 2배)

/export/home -> 나머지 (오라클을 설치할 자리)






STEP39. 슬라이스 정보

확인하고 넘어가면 된다.



STEP39. 이제 cd를 넣고 설치하기 전에 앞에서 설정했던 시스템 정보



STEP40. 그냥 계속 누르면 됨



STEP41. 계속을 누르면 reboot된다.



STEP42. 이제 솔라리스 cd를 넣고 2~5번까지 선택해 설치한다.



STEP43. 솔라리스 2번 cd를 넣고 위의 connect를 꼭 체크해주고 확인을 눌러주자.



STEP44. cd2를 넣었다면 확인을 눌러주자. 설치가 시작된다.



STEP45. cd2 설치중


STEP46. 설치가 완료되면 일시 중지라는 창이 앞으로 계속 뜬다.

계속을 눌러서 설치를 진행해주자.



STEP47. 3번도 cd를 넣고 설치한다.

cd/dvd체크후에  다음을 눌러서 설치를 하자.



STEP48. cd3번



STEP49. 설치전 정보확인.



STEP50. cd3 설치중



STEP51. cd4도 동일하다.



STEP52. cd4를 넣었다면 확인을 눌러주면 된다.



STEP53. 설치전 정보확인



STEP54. 설치가 완료되면 계속을 눌러주면 된다.



STEP55. cd/dvd








STEP56. 위의 솔라리스10의 모든 cd가 설치되면 이제 language cd2번을 넣어서 설치하면 끝이다.





STEP58. 위의 모든 cd가 전부 설치가 되면 재부팅을 하게 된다.



STEP59. root계정으로 로그인해야하고

암호는 설치전에 입력하였다.



STEP60. 모든 설치가 완료되고 root계정으로 접속

아래는 gui화면에서 조금만 있으면 실행되는 창인데

마지막으로 등록하지 않는다고 체크하고 닫으면 솔라리스 10 설치가 완료된다.



RSS FEED