티스토리 툴바


  1. NIC 설치 및 IP 설정

       1) ok 프롬프트에서 boor -r

       2) dev에서 장치확인 or cat /etc/path_to_inst

  1.        Caution! This file contains critical kernel state
    #
    "/iscsi" 0 "iscsi"
    "/pseudo" 0 "pseudo"
    "/scsi_vhci" 0 "scsi_vhci"
    "/options" 0 "options"
    "/ramdisk-root" 0 "ramdisk"
    "/pci@1f,4000" 0 "pcipsy"
    "/pci@1f,4000/ebus@1" 0 "ebus"
    "/pci@1f,4000/ebus@1/SUNW,envctrltwo@14,600000" 0 "envctrltwo"
    "/pci@1f,4000/ebus@1/su@14,3083f8" 0 "su"
    "/pci@1f,4000/ebus@1/su@14,3062f8" 1 "su"
    "/pci@1f,4000/ebus@1/power@14,724000" 0 "power"
    "/pci@1f,4000/ebus@1/se@14,400000" 0 "se"
    "/pci@1f,4000/ebus@1/se@14,200000" 1 "se"
    "/pci@1f,4000/ebus@1/ecpp@14,3043bc" 0 "ecpp"
    "/pci@1f,4000/TSI,gfxp@4" 0 "gfxp"
    "/pci@1f,4000/network@1,1" 0 "hme"

     "/pci@1f,4000/scsi@3" 0 "glm"
    "/pci@1f,4000/scsi@3/sd@6,0" 6 "sd"
    "/pci@1f,4000/scsi@3/sd@8,0" 7 "sd"
    "/pci@1f,4000/scsi@3/st@0,0" 2 "st"
    "/pci@1f,4000/scsi@3,1" 1 "glm"
    "/pci@1f,2000" 1 "pcipsy"
    "/pci@1f,2000/pci@1" 0 "pci_pci"
    "/pci@1f,2000/pci@1/SUNW,qfe@0,1" 0 "qfe"
    "
    /pci@1f,2000/pci@1/SUNW,qfe@1,1" 1 "qfe"
    "
    /pci@1f,2000/pci@1/SUNW,qfe@2,1" 2 "qfe"
    "/pci@1f,2000/pci@1/SUNW,qfe@3,1" 3 "qfe"

       3) ifconfig qfe0 plumb 192.168.10.1 netmask 255.255.255.0 broadcast + up //4port nic의 첫번째 포트를 사설 네트워크의 GW(192.168.10.1)로 설정

       4) /etc/hosts 편집

#
# Internet host table
#
127.0.0.1       localhost       loghost
192.168.0.139   boo     boo.3stek.com   loghost
192.168.10.1    boo1ipfilter.xmlipfilter.xml

        5) cat /etc/hostname.hme0 // 이미 존재 없다면 생성

boo

        6)  cat /etc/hostname.qfe0 생성

boo1

        7)  cat /etc/netmasks 편집 // 사설망 netmask 추가

#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
#       network-number  netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
#               128.32.0.0 255.255.255.0
#
192.168.0.0 255.255.255.0 # 외부망 마스크 
192.168.10.0 255.255.255.0 #사설망 마스크

       8)  cat /etc/resolv.conf // 보너스

nameserver 168.126.63.1

2. IP forwarding 설정

    routeadm

              Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   disabled             disabled
               IPv6 routing   disabled             disabled
            IPv4 forwarding   disabled              disabled            IPv6 forwarding   disabled             disabled

           Routing services   "route:default ripng:default"

Routing daemons:

                      STATE   FMRI
                   disabled   svc:/network/routing/legacy-routing:ipv4
                   disabled   svc:/network/routing/legacy-routing:ipv6
                   disabled   svc:/network/routing/ndp:default
                   disabled   svc:/network/routing/rdisc:default
                   disabled   svc:/network/routing/ripng:default
                   disabled   svc:/network/routing/ripng:quagga
                   disabled   svc:/network/routing/route:default
                   disabled   svc:/network/routing/zebra:quagga
                   disabled   svc:/network/routing/rip:quagga
                   disabled   svc:/network/routing/ospf:quagga
                   disabled   svc:/network/routing/ospf6:quagga
                   disabled   svc:/network/routing/bgp:quagga

    routeadm -u -e ipv4-forwarding // -u : 부팅 시 적용하라는 옵션, -e : enable 옵션(↔ -d : disable 옵션)

    routeadm

              Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   disabled             disabled
               IPv6 routing   disabled             disabled
            IPv4 forwarding   enabled              enabled            IPv6 forwarding   disabled             disabled

           Routing services   "route:default ripng:default"

Routing daemons:

                      STATE   FMRI
                   disabled   svc:/network/routing/legacy-routing:ipv4
                   disabled   svc:/network/routing/legacy-routing:ipv6
                   disabled   svc:/network/routing/ndp:default
                   disabled   svc:/network/routing/rdisc:default
                   disabled   svc:/network/routing/ripng:default
                   disabled   svc:/network/routing/ripng:quagga
                   disabled   svc:/network/routing/route:default
                   disabled   svc:/network/routing/zebra:quagga
                   disabled   svc:/network/routing/rip:quagga
                   disabled   svc:/network/routing/ospf:quagga
                   disabled   svc:/network/routing/ospf6:quagga
                   disabled   svc:/network/routing/bgp:quagga

     ※ Solaris 9  이하에서는 ndd -set /dev/ip ip_forwarding 1 이라고 해준다.(Solaris 10에서도 먹히나 부팅 시 적용이 안되며, 부팅시 적용되는 스크립트에 넣어줘야 함)

3.  IP Filter 설치 및 설정

    1) pkginfo | grep Filter // Solaris 10의 경우 기본적으로 설치되어 있음.

system      SUNWffiltersr                    foomatic-filters - Foomatic Print Filters (root)
system      SUNWffiltersu                    foomatic-filters - Foomatic Print Filters (user)
system      SUNWipfh                         IP Filter header files
system      SUNWipfr                         IP Filter utilities, (Root)
system      SUNWipfu                         IP Filter utilities, (Usr)

 system      SUNWmp                           MP Print Filter

   2) 만약 설치되어 있지 않다면, http://coombs.anu.edu.au/~avalon/ 에서 Download.

       (wget http://coombs.anu.edu.au/~avalon/ip_fil4.1.33.tar.gz 해도된다.)

   3)  /etc/ipf/ipnat.conf 생성

map hme0 192.168.10.0/24 -> 0.0.0.0/32 portmap tcp/udp auto
map hme0 192.168.10.0/24 -> 0.0.0.0/32

   4) svcadm enable ipfilter

       ※ 소스를 다운로드해서 설치 시 smf manifest(ipfilter.xml) 및 메소드(ipfilter)가 같이 설치되지 않을수도 있기에 첨부해둔다. 설치방법은 Readme 파일 참고.

4.  NAT 서버에 호스트 컴퓨터 연결 및 실행 확인

   gateway 192.168.10.1

   netmask 255.255.255.0

   broadcast 192.168.10.255

   IP는 192.168.10.1 ~ 254까지 사용가능

   그리고  TEST 잘 들어가면 NAT 설치 성공!

 

이 글은 스프링노트에서 작성되었습니다.

Posted by 카메즈
Solaris 10 Essential2009/09/15 15:05
  1. http://www.sunfreeware.com 에서 패키지 다운로드

    ftp ftp.sunfreeware.com
    ID : anonymous

    cd pub/freeware/sparc/10

    get XXX-X.X.XX-sol10-sparc-local.gz

    quit

    gunzip XXX-X.X.XX-sol10-sparc-local.gz

    pkgadd -d XXX-X.X.XX-sol10-sparc-local.gz

    아니면 웹브라우저로 http://www.sunfreeware.com에 접속해서 다운로드하고 압축을 풀어도 된다

 

설치 패키지 목록

apache-2.2.12-sol10-sparc-local

mysql-5.0.67-sol10-sparc-local

curl-7.19.6-sol10-sparc-local

freetds-0.82-sol10-sparc-local

gd-2.0.35-sol10-sparc-local

libiconv-1.11-sol10-sparc-local

libidn-1.14-sol10-sparc-local

libintl-3.4.0-sol10-sparc-local

libssh2-1.2-sol10-sparc-local

openldap-2.4.16-sol10-sparc-local

sasl-2.1.21-sol10-sparc-local

php-5.29-sol10-sparc-local

 

2. Apache 설정

  1. vi /usr/local/apache2/conf/httpd.conf
  2. User nobody
  3. group nobody

/usr/local/apache2/bin/apachectl configtest

설정테스트, sytax  OK 가 나오면 정상적으로 설정된 것이다

/usr/local/apache2/bin/apachectl start // 아파치 실행

 

3. mysql 설정

groupadd mysql
useradd -g mysql mysql
cd /usr/local
cd mysql
bin/mysql_install_db
chown -R root .
cd /usr/local
chown -R mysql mysql
chgrp -R mysql mysql
mysql/bin/mysqld_safe --user=mysql &

 

계정 사용을 막기위한 설정

  1. vi /etc/passwd
    mysql:x:102:100::/home/mysql:/bin/sh
    mysql:x:102:100:::/bin/false

 

4. php 설정

  1.  vi /usr/local/apache2/conf/httpd.conf
  2.  LoadModule php5_module modules/libphp5.so
    AddType application/x-httpd-php .php .php5 .php4 .php3 .html .htm .phtml .ph
    AddType application/x-httpd-php-source .phps

 

ETC

  1. find / -name XXX* // 이 명령어를 잘 사용해서, 헤더파일이 어느 폴더에 있는지, 해당 헤더파일이 필요하다면 파일이 있는 폴더를 LD_LIBRARY_PATH에 추가시켜주자. LD_LIBRARY_PATH은 bashrc에 있음(bash 쉘의 경우)
  2. ldd libphp5.so // libphp5.so가 참조하는 라이브러리를 제대로 찾고있는지 알수 있다.

  3. libxml2.so.2의 경우, /usr/lib와 /usr/local/lib에 둘다 존재하는데, 해당 폴더가 전부 라이브러리 패스에 잡혀있어서 아파치가 실행되지 않는 경우도 있다. 이럴 때는 /usr/lib에 있는 해당 파일의 이름을 바꿔주면 된다.

해당 파일의 이름을 바꾸면 fmd(fault management) 서비스가 제대로 실행되지 않는다. 따라서 해당 파일의 이름을 바꾸고 /usr/local/lib/libxml2.so.2로 가는 소프트 링크를 만들어준다.

  1. cd /usr/lib

  2. move libxml2.so.2 libxml2.so.2.bak

  3. ln -s /usr/local/lib/libxml2.so.2 libxml2.so.2

이 글은 스프링노트에서 작성되었습니다.

Posted by 카메즈
Solaris 10 Essential2009/09/07 09:01
uname

uname -a

시스템의 운영체제 종류, 릴리즈, 호스트 이름, 머신, 프로세스 종류를 알려준다.

 

 uname -s

시스템 운영체제 종류 나타낸다. [uname -a] 명령어의 일부를 나타냄. (그냥 -a 옵션을 쓰는게 나아 보임;;)

 

uname -r

Solaris 버전 나타냄;;

 

uname -n

시스템(호스트) 이름 나타냄

 

uname -i

머신 종류 나타냄(예, i686pc, SUN4U 등)

 

uname -p

CPU 종류만 나타냄(예, i386, sparc 등)

 

uname -X

시스템의 uname -a 정보를 포함해서, 커널 ID, BusType, Serial, Users, OEM#, Origin#, CPU 갯수를 나타내나,

BusType, Serial, Users, OEM#, Origin# <<< 멀 뜻하는 거야..;;

 capture_6.png

 

 

이 글은 스프링노트에서 작성되었습니다.

Posted by 카메즈