Search Results for 'solaris9'

2 POSTS

  1. 2008.12.23 Solaris9 Proftp 설치(패키지)
  2. 2008.11.13 Solaris9 SCSI HDD 추가하기

Solaris9 Proftp 설치(패키지)

Posted 2008. 12. 23. 18:42


현재 제가 설치하는 것을 토대로 해서 적겠습니다. (2009.01.23)

환경 : Solaris9 SPARC


일단 http://sunfreeware.com 에 가셔서 Solaris9 SPARC  -> 밑의 파일들을 다운 받으세요~!

proftpd-1.3.1-sol9-sparc-local.gz
ncurses-5.6-sol9-sparc-local.gz

다운 받은 파일들을 Server로 옮기는건 각자 알아서.... ^^;

이제 설치를 하도록 하겠습니다.

일단 압축을 풀도록 하겠습니다.  해당 파일이 있는 디렉토리에 가셔서 밑의 명령어를 쓱쓱~

# gunzip -d  proftpd-1.3.1-sol9-sparc-local.gz
# gunzip -d  ncurses-5.6-sol9-sparc-local.gz


압축을 풀었으니 패키지 설치를..

# pkgadd -d ncurses-5.6-sol9-sparc-local

다음과 같은 패키지를 사용할 수 있습니다.
  1  SMCncurs     ncurses
                  (sparc) 5.6

처리할 패키지(들)를 선택하십시오.(또는 모든 패키지를
처리하려면'all'을 입력하십시오.) (default: all) [?,??,q]: all


# pkgadd -d proftpd-1.3.1-sol9-sparc-local

다음과 같은 패키지를 사용할 수 있습니다.
  1  SMCpftpd     proftpd
                  (sparc) 1.3.1

처리할 패키지(들)를 선택하십시오.(또는 모든 패키지를
처리하려면'all'을 입력하십시오.) (default: all) [?,??,q]: all


일단 설치 도중에 에러가 발생한다면 다른 필요한 라이브러리가 설치가 되지않아 생긴 문제이니 이건 어쩔수 없이 각자 알아서.. 설치를....

다 설치되었다는 가정하에

# vi /usr/local/etc/profptd.conf

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName                      "ProFTPD Default Installation"
#ServerType                     inetd
ServerType                     standalone
DefaultServer                   on

# Port 21 is the standard FTP port.
Port                            21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                           022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances                    30

# Set the user and group under which the server will run.
User                            nobody
Group                          nobody

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

inetd로 등록을 할려고 하였으나  Error가 발생하여 다시 standalone으로 바꾸었습니다.
만약 상위 디렉토리로 이동이 되지 않도록 할려면 #DefaultrRoot ~ 가 주석처리 되어있는걸 해제해 주세요~!

이제 inetd.conf 파일에 등록을 할 차례입니다.
이 파일은 보안문제로 읽기 전용파일(444)로 되어있으니 실행 권한을 수정(755)하셔야 합니다.

# chmod 755 /etc/inet/inetd.conf

이렇게 한다음

# vi /etc/inet/inetd.conf

# FTPD - FTP server daemon
#ftp    stream  tcp6    nowait  root    /usr/sbin/in.ftpd       in.ftpd -a
ftp     stream  tcp6    nowait  root    /usr/local/sbin/in.proftpd      in.proftpd

전 FTP 부분을 찾아 원래 사용하던 ftp 를 주석처리하고 Proftpd 부분을 추가하여 사용하도록 하였습니다.

이제 inetd 를 재시작 하겠습니다.

#ps -ef | grep inetd

    root 14383     1  0 09:55:09 ?        0:00 /usr/sbin/inetd -s

꼭~ PID를 확인

#kill -HUP 14383

이제  /etc/inet/inetd.conf  파일 권한을 755 에서 원래대로인 444로 바꾸겠습니다.

# chmod 444 /etc/inet/inetd.conf

이제 ProFTP를 실행할 차례입니다.

# /usr/local/sbin/prftpd  or
# /usr/local/sbin/in.proftpd  를 실행하시고 테스트를 해보세요~!

처음 환영글이 ProFTP로 뜨게 되면 설치가 완료.


혹시 실행은 되는데 FTP 접속이 되지 않는다면 /etc/inet/inetd.conf 여기에 추가한

ftp     stream  tcp6    nowait  root    /usr/local/sbin/in.proftpd      in.proftpd
이 라인은 주석 처리하거나 삭제해 주세요.

그다음 아시죠? inet 재시작..

#ps -ef | grep inetd

    root 14383     1  0 09:55:09 ?        0:00 /usr/sbin/inetd -s

꼭~ PID를 확인

#kill -HUP 14383


그리고 직접 올릴수 있도록 파일을 만드는 작업을 해야합니다.

# vi /etc/init.d/proftpd

case "$1" in

'start')
     # Start the ProFTP daemon
     if [ -f /usr/local/sbin/proftpd ]; then
          echo "starting ProFTP daemon"
          /usr/local/sbin/proftpd &
     fi
     ;;

'stop')
     # Stop the ProFTP deamon
     PID=`/usr/bin/ps -e -u 0 | /usr/bin/fgrep proftpd | /usr/bin/awk '{print $1}'`
     if [ ! -z "$PID" ] ; then
          /usr/bin/kill ${PID} >/dev/null 2>&1
   echo "stoping ProFTP daemon"
     fi
     ;;

*)
     echo "usage: /etc/init.d/proftpd {start|stop}"
     ;;

esac
exit 0

이 내용이 적힌 파일을 첨부파일로 올리겠습니다.



# chown root:sys /etc/init.d/proftpd
profptd 파일의 소유자 및 그룹을  root:sys 로 변경

# chmod 755 /etc/init.d/proftpd
proftpd 파일의 권한을 755 (r-xr-xr-x)

# ln -s /etc/init.d/proftpd /etc/rc2.d/S99proftpd
/etc/init.d/proftpd 파일을 /etc/rc2.d/S99proftpd 파일을 만들면서 링크
그리고 /etc/rc2.d/S99proftpd 링크를 걸게 되면 Server Reboot 데몬이 자동 실행되어 가동이 됩니다.


아직 미숙한게 많아 아직도 테스트중입니다.  틀린점이 있더라도 너그럽게 용서를... ^^;

Solaris9 SCSI HDD 추가하기

Posted 2008. 11. 13. 11:12



Solaris9  SCSI HDD 추가하기


현재 용량이 제일 큰 3번 디스크에 Solaris9 설치되어있으며 0,1,2번 디스크를 새로 붙여 인식시키는 방법을 알려드리겠습니다.


bash-2.05# format


AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUN4.2G cyl 3880 alt 2 hd 16 sec 135>
          /pci@1f,4000/scsi@3/sd@0,0
       1. c0t1d0 <SUN4.2G cyl 3880 alt 2 hd 16 sec 135>
          /pci@1f,4000/scsi@3/sd@1,0
       2. c0t2d0 <SUN4.2G cyl 3880 alt 2 hd 16 sec 135>
          /pci@1f,4000/scsi@3/sd@2,0
       3. c0t3d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /pci@1f,4000/scsi@3/sd@3,0
Specify disk (enter its number): 0


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
        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> p


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> p

Current partition table (original):
Total disk cylinders available: 3880 + 2 (reserved cylinders)


Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)          0
  1       swap    wu       0 -  485      512.58MB    (486/0/0)  1049760
  2     backup    wm       0 - 3879        4.00GB    (3880/0/0) 8380800
  3 unassigned    wm       0               0         (0/0/0)          0
  4 unassigned    wm       0               0         (0/0/0)          0
  5 unassigned    wm       0               0         (0/0/0)          0
  6 unassigned    wm       0               0         (0/0/0)          0
  7 unassigned    wm       0               0         (0/0/0)          0


위에 보시면 1번 슬라이드에 swap이 있는데 이부분을 없애 버리도록 하겠습니다.


partition> 1
Part      Tag    Flag     Cylinders        Size            Blocks
  1       swap    wu       0 -  485      512.58MB    (486/0/0)  1049760


Enter partition id tag[swap]: unassigned
Enter partition permission flags[wu]: wm
Enter new starting cyl[0]: 0
Enter partition size[1049760b, 486c, 485e, 512.58mb, 0.50gb]: 0
partition> p
Current partition table (unnamed):
Total disk cylinders available: 3880 + 2 (reserved cylinders)


Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)          0
  1 unassigned    wm       0               0         (0/0/0)          0
  2     backup    wm       0 - 3879        4.00GB    (3880/0/0) 8380800
  3 unassigned    wm       0               0         (0/0/0)          0
  4 unassigned    wm       0               0         (0/0/0)          0
  5 unassigned    wm       0               0         (0/0/0)          0
  6 unassigned    wm       0               0         (0/0/0)          0
  7 unassigned    wm       0               0         (0/0/0)          0


partition> label
Ready to label disk, continue? yes


이렇게 하면 저장이 됩니다.


partition>quit


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
        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> label
Ready to label disk, continue? yes


또 다시 한번 저장


format>quit

 


이젠 각각 인식 시킬 디스크들을 solaris에서 사용할 수 있도록 format을 하겠습니다.
여기서 newfs 는 윈도우에서 format과 같은 명령어입니다.


bash-2.05# newfs /dev/dsk/c0t0d0s2
newfs: /dev/rdsk/c0t0d0s2 last mounted as /a
newfs: construct a new file system /dev/rdsk/c0t0d0s2: (y/n)? y
/dev/rdsk/c0t0d0s2:     8380800 sectors in 3880 cylinders of 16 tracks, 135 sectors
        4092.2MB in 85 cyl groups (46 c/g, 48.52MB/g, 6080 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 99536, 199040, 298544, 398048, 497552, 597056, 696560, 796064, 895568,
 7453616, 7553120, 7652624, 7752128, 7851632, 7948832, 8048336, 8147840,
 8247344, 8346848,

bash-2.05# newfs /dev/dsk/c0t1d0s2
newfs: /dev/rdsk/c0t1d0s2 last mounted as /oracle
newfs: construct a new file system /dev/rdsk/c0t1d0s2: (y/n)? y
/dev/rdsk/c0t1d0s2:     8380800 sectors in 3880 cylinders of 16 tracks, 135 sectors
        4092.2MB in 85 cyl groups (46 c/g, 48.52MB/g, 6080 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 99536, 199040, 298544, 398048, 497552, 597056, 696560, 796064, 895568,
 7453616, 7553120, 7652624, 7752128, 7851632, 7948832, 8048336, 8147840,
 8247344, 8346848,

bash-2.05# newfs /dev/dsk/c0t2d0s2
newfs: /dev/rdsk/c0t2d0s2 last mounted as /user4
newfs: construct a new file system /dev/rdsk/c0t2d0s2: (y/n)? y
/dev/rdsk/c0t2d0s2:     8380800 sectors in 3880 cylinders of 16 tracks, 135 sectors
        4092.2MB in 85 cyl groups (46 c/g, 48.52MB/g, 6080 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 99536, 199040, 298544, 398048, 497552, 597056, 696560, 796064, 895568,
 7453616, 7553120, 7652624, 7752128, 7851632, 7948832, 8048336, 8147840,
 8247344, 8346848,
bash-2.05#



이젠 mount 시킬 디렉토리를  / 에 만들겠습니다.


bash-2.05# mkdir new1
bash-2.05# mkdir new2
bash-2.05# mkdir new3
bash-2.05# ls
TT_DB       etc         lost+found  new3        sbin        xfn
bin         export      mnt         nsmail      tmp
cdrom       home        net         opt         usr
dev         kernel      new1        platform    var
devices     lib         new2        proc        vol



그리고 mount를 하도록 하겠습니다.


bash-2.05# mount /dev/dsk/c0t0d0s2 /new1
bash-2.05# mount /dev/dsk/c0t1d0s2 /new2
bash-2.05# mount /dev/dsk/c0t2d0s2 /new3



mount 확인 방법은 df -h 혹은 -k 명령어 입니다.

bash-2.05# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0t3d0s0      3.7G   2.0G   1.7G    54%    /
/proc                    0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
fd                       0K     0K     0K     0%    /dev/fd
swap                   1.3G    96K   1.3G     1%    /var/run
swap                   1.3G   320K   1.3G     1%    /tmp
/dev/dsk/c0t3d0s7       12G   364M    11G     4%    /export/home
/dev/dsk/c0t0d0s2      3.9G     9K   3.9G     1%    /new1
/dev/dsk/c0t1d0s2      3.9G     9K   3.9G     1%    /new2
/dev/dsk/c0t2d0s2      3.9G     9K   3.9G     1%    /new3
bash-2.05#


정상적으로 마운트 되어 있는걸 확인 할 수 있습니다.

 



마지막으로 Server가 재부팅이 되더라도 계속  mount가 되도록 설정을 하겠습니다.


bash-2.05# vi /etc/vfstab
"/etc/vfstab" 9 lines, 319 characters
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0t3d0s1       -       -       swap    -       no      -
/dev/dsk/c0t3d0s0       /dev/rdsk/c0t3d0s0      /       ufs     1       no -
/dev/dsk/c0t3d0s7       /dev/rdsk/c0t3d0s7      /export/home    ufs     2 yes     -
swap    -       /tmp    tmpfs   -       yes     -


이렇게 되어있는걸 밑의 내용 처럼 추가 수정하시면 됩니다.



#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0t3d0s1       -       -       swap    -       no      -
/dev/dsk/c0t3d0s0       /dev/rdsk/c0t3d0s0      /       ufs     1       no      -
/dev/dsk/c0t3d0s7       /dev/rdsk/c0t3d0s7      /export/home    ufs     2       yes -
/dev/dsk/c0t1d0s2       /dev/rdsk/c0t1d0s2      /new1   ufs     3       yes     -
/dev/dsk/c0t2d0s2       /dev/rdsk/c0t2d0s2      /new2   ufs     4       yes     -
/dev/dsk/c0t3d0s2       /dev/rdsk/c0t3d0s2      /new3   ufs     5       yes     -
swap    -       /tmp    tmpfs   -       yes     -



그리고 마지막으로 mount 명령어를 한번 입력하세요.


bash-2.05# mount
/ on /dev/dsk/c0t3d0s0 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=800018 on Wed Nov 12 18:33:58 2008
/proc on /proc read/write/setuid/dev=3bc0000 on Wed Nov 12 18:33:57 2008
/etc/mnttab on mnttab read/write/setuid/dev=3c80000 on Wed Nov 12 18:33:57 2008
/dev/fd on fd read/write/setuid/dev=3cc0000 on Wed Nov 12 18:33:59 2008
/var/run on swap read/write/setuid/xattr/dev=1 on Wed Nov 12 18:34:01 2008
/tmp on swap read/write/setuid/xattr/dev=2 on Wed Nov 12 18:34:04 2008
/export/home on /dev/dsk/c0t3d0s7 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=80001f on Wed Nov 12 18:34:04 2008
/new1 on /dev/dsk/c0t0d0s2 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=800002 on Thu Nov 13 10:57:17 2008
/new2 on /dev/dsk/c0t1d0s2 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=80000a on Thu Nov 13 10:57:58 2008
/new3 on /dev/dsk/c0t2d0s2 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=800012 on Thu Nov 13 10:58:04 2008
bash-2.05#



이제 끝이 났습니다. 의문점은 댓글을 적어주시면 됩니다.