블로그 이미지
항상웃자 애바른2

카테고리

분류 전체보기 (99)
사진 (4)
비공개 (0)
업무 (1)
자동차 (6)
개발 (23)
가족 (33)
모바일 (13)
Total
Today
Yesterday

달력

« » 2025.12
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

공지사항

최근에 올라온 글


1. /usr/ports/mail/qmail 설치
2. /usr/ports/sysutils/daemontools 설치 (setuidgid,multilog 사용하기위함)
3. /usr/ports/sysutils/ucspi-tcp 설치 (svc 사용하기 위함인데, 난 적용안했음-_-)
4. /usr/ports/mail/queue-fix 설치 (queue폴더 변경을위해 설치했음,기본폴더 쓸꺼면 설치안해도됨)

그룹및,계정생성 (-n옵션을 붙이던가? 안붙이던가?..)
# pw groupadd -n qmail
# pw useradd -n qmail

#
Posted by 애바른2
, |

MRTG를 사용하여 qmail 통계 그래프 생성하기

Table of Contents
1. 필요한 준비물
2. 먼저 설치되어야 할 소프트웨어
3. 로그 디렉토리의 생성
4. 설정화일 변경

1. 필요한 준비물

1.1. 필요한 프로그램들

아래의 프로그램들이 먼저 설치되어 있어야 합니다.

  • qmail-1.03 (포트에서 설치하세요: /usr/ports/mail/qmail)

  • mrtg-2.9.11 (포트에서 설치하세요: /usr/ports/net/mrtg)

본 문서에스는 qmail의 설치 방법은 다루지 않습니다. qmail의 설치에 대해서는 Installing qmail under FreeBSD를 참고하세요.


2. 먼저 설치되어야 할 소프트웨어

2.1. daemontools-0.70

패키지(qmailmrtg)에서 setuidgidmultilog 유틸리티가 사용되기 때문에, 해당 유틸리티가 설치되어 있어야 합니다. 다음과 같이 설치하십시요.

# cd /usr/ports/sysutils/daemontools
# make install

2.2. qmailmrtg7-3.1

Inter7에서 구할 수 있습니다.

# cd tmp
# fetch http://inter7.com/qmailmrtg7/qmailmrtg7-3.1.tar.gz
# gunzip qmailmrtg7-3.1.tar.gz
# tar -xvf qmailmrtg7-3.1.tar
# cd qmailmrtg7-3.1
# make all
# make install
# rm /etc/qmail.mrtg.cfg

위의 설치 과정을 보면 마지막에 /etc/qmail.mrtg.cfg 파일을 삭제하는 것을 알 수 있습니다. qmailmrtg7는 설치 과정에서 설정 파일을 /etc 디렉토리에 복사하는데, 설정 파일은 /usr/local/etc/mrtg 디렉토리에 위치하거나, 기본 MRTG 설정 파일 /usr/local/etc/mrtg/mrtg.cfg에 통합되는 것이 이상적이기 때문에 삭제합니다. 다음 섹션에서 보다 자세히 다룹니다.


3. 로그 디렉토리의 생성

/var/log에 다음과 같이 데몬들을 위한 디렉토리를 만듭니다.

# cd /var/log
# mkdir qmail
# mkdir pop3
# mkdir smtp

보안적인 면을 고려한다면 이 디렉토리들의 퍼미션을 적절하게 수정 하십시요. (역주: 예 chmod 500)


4. 설정화일 변경

4.1. /etc/rc.conf

qmail이 Installing qmail under FreeBSD에 따라 정확히 설치 되었다면 /etc/rc.conf의 값들이 변경되어 있을것입니다. 만약 그렇지 않다면 /etc/rc.conf에 다음 항목을 추가하십시요.

# qmail options
qmail_smtp_enable="YES"
qmail_pop_enable="YES"
qmail_enable="YES"

4.2. /var/qmail/rc

/var/qmail/rc에서 구동되는 각각의 데몬 구동용 명령어들이 multilog의 장점을 취하기 위해서는 아래의 스크립트에서 HOST.DOMAIN을 메일서버의 FQDN(Fully Qualified Domain Name, 역주: 인터넷 도메인 주소라고 보시면 됩니다)으로 수정하여야 합니다.

#!/bin/sh

#
# This script starts and stops the qmail mail functions.
#

# Suck in the configuration variables.
if [ -r /etc/defaults/rc.conf ]; then
        . /etc/defaults/rc.conf
        source_rc_confs
elif [ -r /etc/rc.conf ]; then
        . /etc/rc.conf
fi


case "$1" in
start)
        case ${qmail_smtp_enable} in
        [Yy][Ee][Ss])
                # Start the qmail smtp daemon
                env - PATH="/var/qmail/bin:/usr/local/bin" \
                tcpserver -v -H -R  -x /etc/tcp.smtp.cdb \
                -c200 -u82 -g81 0 25 fixcrio /var/qmail/bin/qmail-smtpd \
                2>&1 | /usr/local/bin/setuidgid qmaill \
                /usr/local/bin/multilog t n100 s1000000 /var/log/smtp &

                echo -n " qmail-smtp"
                ;;
        esac

        case ${qmail_pop_enable} in
        [Yy][Ee][Ss])
                # Start the qmail pop daemon
                env - PATH="/var/qmail/bin:/usr/local/bin" \
                tcpserver -v -H -R -c200 0 110 \
                /var/qmail/bin/qmail-popup HOST.DOMAIN \
                /usr/local/bin/checkpassword /var/qmail/bin/qmail-pop3d \
                Maildir 2>&1 | /usr/local/bin/setuidgid qmaill \
                /usr/local/bin/multilog t n100 s1000000 /var/log/pop3 &

                echo -n " qmail-pop"
                ;;
        esac

        case ${qmail_enable} in
        [Yy][Ee][Ss])
                # Start qmail
                exec env - PATH="/var/qmail/bin:$PATH" \
                qmail-start ./Maildir | /usr/local/bin/setuidgid qmaill \
                /usr/local/bin/multilog t n100 s1000000 /var/log/qmail &

                echo -n " qmail"
                ;;
        esac
        ;;
stop)
        # Stop the smtp daemon
        smtppid=`ps -axw | grep tcpserver | grep smtp | grep -v grep | awk '{ print $1 }'`
        if [ "$smtppid" != "" ]; then
                kill $smtppid
                echo -n " qmail-smtp"
        fi

        # Stop the pop daemon
        poppid=`ps -axw | grep tcpserver | grep popup | grep -v grep | awk '{ print $1 }'`
        if [ "$poppid" != "" ]; then
                kill $poppid
                echo -n " qmail-pop"
        fi

        # Stop qmail
        qmailpid=`ps -axw | grep qmail-send | grep -v grep | awk '{ print $1 }'`
        if [ "$qmailpid" != "" ]; then
                kill $qmailpid
                echo -n " qmail"
        fi
        ;;
*)
        echo "Usage: `basename $0` {start|stop}" >&2
        ;;
esac

exit 0

\ 문자로 종결되는 행은 원래 다음 행과의 하나의 긴 라인 입니다만, 여기에서는 \ 문자를 사용해 두개의 행으로 나누어 표현하고 있습니다.


4.3. /usr/local/etc/mrtg/mrtg.cfg

mrtg.cfg의 설정은 시스템에 어떻게 MRTG를 설정하는가에 매우 의존적입니다. 먼저 다음과 같이 qmail.mrtg.cfg 예제 설정 파일을 mrtg.cfg에 추가하여 기본 설정으로 구동해 본 후에 시스템에 맞추어 수정을 가하십시요. :

# cd /usr/local/etc/mrtg
# mv mrtg.cfg mrtg.cfg.bak
# cat mrtg.cfg.bak /tmp/qmailmrtg7-3.1/qmail.mrtg.cfg > mrtg.cfg

위의 과정 후 생성된 파일 mrtg.cfg 에 문제가 없는지 꼭 점검 하십시요. 그리고, 사이트의 MRTG 인덱스 페이지에서 새롭게 생성된 HTML페이지들을 가리키는 링크를 추가하여야 합니다.

Posted by 애바른2
, |
š š š š
Š Š Š Š
Ÿ Ÿ Ÿ Ÿ
œ œ œ œ
Œ Œ Œ Œ
™ ™
€ €
‚ ‚
‘ ‘
’ ’
„ „
“ “
” ”
‹ ‹
› ›
ˆ ˆ ˆ ˆ
˜ ˜ ˜ ˜
… …
– –
— —
† †
‡ ‡
• •
‰ ‰
ƒ ƒ ƒ ƒ
′ ´ ´
″ “
∼ ~ ~
− –
‾ ¯ ¯
⁄ / /
‌ | |


Posted by 애바른2
, |

*게임팩 총정리*
http://cafe.naver.com/pdacafe/7050   eSoft.Arcade.Challenge.v1.00  [아케이드모음]
http://cafe.naver.com/pdacafe/7085   PDAmill GameBox Classics v2.0 [아케이드모음]
http://cafe.naver.com/pdacafe/7573   PDAmill GameBox Gems v1.3 [보석퍼즐모음]
http://cafe.naver.com/pdacafe/9185   Gamazura Super Reax 1.0 [퍼즐모음]
http://cafe.naver.com/pdacafe/5048   Astraware Game House Pack 1 v1.02 [퍼즐모음]
http://cafe.naver.com/pdacafe/5781   Handmark Tetris Classic Game Pack v1.0 [퍼즐모음]
http://cafe.naver.com/pdacafe/10019   8가지게임 
http://cafe.naver.com/pdacafe/10020   8가지게임+
http://cafe.naver.com/pdacafe/19777   Resco GameBox v1.12
http://cafe.naver.com/pdacafe/20635   BallShooter Brain Gym 2 v2.02f [퍼즐모음]
http://cafe.naver.com/pdacafe/21377   Zio Interactive Games Collection
http://cafe.naver.com/pdacafe/21636   4 classic games for Pocket pc
http://cafe.naver.com/pdacafe/22475   8가지게임;;
http://cafe.naver.com/pdacafe/23126   SPB Airlslands v1.0 + 번들게임
http://cafe.naver.com/pdacafe/23405   아스트라웨어 게임 모음 ;; 1/5
http://cafe.naver.com/pdacafe/23405   2/5
http://cafe.naver.com/pdacafe/23406   3/5
http://cafe.naver.com/pdacafe/23407   4/6
http://cafe.naver.com/pdacafe/23408   5/5
http://cafe.naver.com/pdacafe/30179   유니크게임 남코 게임컬렉션
http://cafe.naver.com/pdacafe/34605   Capcom Old Games
http://cafe.naver.com/pdacafe/38143   Absolutist Bubble Golden Pack v1.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

_M#]


 

Posted by 애바른2
, |

최적화 기술

이제 병목 구간의 원인에 따라 어떠한 방법으로 스크립트의 실행 시간을 최적화할 수 있는지 알아보자.

  • 코드 최적화 : 이 방법은 잘못된 for() 또는 while() 루프와 같이 많은 연산이 이루어지는 부분을 최적화하는 것이다.
  • 출력 버퍼링 및 압축 : 만일 브라우저로 출력해야 하는 내용이 많아서 속도 저하가 생긴다면 이 방법을 사용한다.
  • 데이터베이스 최적화 : 속도 저하의 원인이 데이터베이스 쿼리 또는 테이터베이스 연결 및 함수 사용에 있다면 이 방법을 사용한다.
  • 캐싱 : 이 방법은 문제의 원인이 페이지를 생성하는 시간에 있으며 데이터베이스 쿼리를 최적화할 수 없을 때 사용된다. 캐시를 사용하는 또 다른 이유는 정적인 데이터의 빈번한 요청 때문이다.

Posted by 애바른2
, |

시스템 관리자를 위한 50가지 비법

리눅스 시스템 관리자가 되기 위해서는 많은 것을 알아두어야 한다. 시스템 관리자의 관리 여하에 따라 많은 사람들의 시스템 장애를 초래할 수 있기 때문이다. 물론 시스템 관리자가 모든 것을 미리 예방할 수는 없다. 하지만 불가피한 상황을 제외하고는 시스템이 정상적으로 작동되도록 해야한다.
이번 호에서는 시스템, 네트워크, APM, 메일, 보안, 장애 발생시 복구 등에서 일어날 수 있는 시스템 관리자의 행동요령에 대해 알아볼 것이다. 시스템 관리자는 항상 모니터와 키보드와 함께 한다는 사실을 기억해야 한다.


 

Posted by 애바른2
, |

Step-by-step installation illustration

Here is a 15 minute procedure to setup an SSL-aware Apache test-only webserver under /usr/local/apache/ (for the complete detailed installation step-by-step list please read the INSTALL file):
  1. Fetch and extract the distributions of Apache, mod_ssl and OpenSSL

    $ lynx http://httpd.apache.org/dist/httpd/apache_1.3.37.tar.gz
    $ lynx ftp://ftp.modssl.org/source/mod_ssl-2.8.28-1.3.37.tar.gz
    $ lynx ftp://ftp.openssl.org/source/openssl-0.9.8b.tar.gz
    $ gzip -d -c apache_1.3.37.tar.gz | tar xvf -
    $ gzip -d -c mod_ssl-2.8.28-1.3.37.tar.gz | tar xvf -
    $ gzip -d -c openssl-0.9.8b.tar.gz | tar xvf -
  2. Build OpenSSL

    $ cd openssl-0.9.8b
    $ ./config
    $ make
    $ cd ..
    
  3. Build and install the SSL-aware Apache

    $ cd mod_ssl-2.8.28-1.3.37
    $ ./configure \
        --with-apache=../apache_1.3.37 \
        --with-ssl=../openssl-0.9.8b \
        --prefix=/usr/local/apache
    $ cd ..
    $ cd apache_1.3.37
    $ make 
    $ make certificate
    $ make install
  4. Cleanup after work

    $ rm -rf apache_1.3.37
    $ rm -rf mod_ssl-2.8.28-1.3.37
    $ rm -rf openssl-0.9.8b
  5. Fire up your SSL-aware Apache and try it out
    (please replace "local-host-name" with the fully qualified domain name (FQDN) of your website which you entered at the "make certificate" step above)

    $ /usr/local/apache/bin/httpd -DSSL
    $ netscape https://local-host-name/
    

http://www.modssl.org/example/

Posted by 애바른2
, |

Vim 설정 파일 (.vimrc)

개발 / 2007. 10. 24. 10:58
1  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
2  " 인클루드의 Vim 설정 파일
3  " 마지막 수정: 2004-12-01 16:34:14
4  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
5
6  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
7  " 프로그램 기본 설정
8  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
9
10  " 메뉴를 사용하지 않는다. 대부분의 명령보다 선행되어야 한다.
11  let did_install_default_menus = 1
12  let did_install_syntax_menu = 1
13  let skip_syntax_sel_menu = 1
14
15  " 오리지널 Vi 와의 호환성을 없애고, Vim 만의 기능들을 쓸 수 있게 함.
16  set nocp
17
Posted by 애바른2
, |

컨텐트매치(Content Match™)



 
Posted by 애바른2
, |

Explorer에서 F5를 누르면 새로고침이라는 사실은 대부분 알고 있다.
하지만...

CTRL + F5

를 누르면 Cache를 지우고 모든 파일을 새로고친다는 사실..
헉.. 웹개발에 관련되신 분들이라면 왜 이기능이 편한지 아실 것으로 사료된다.
어제까지만 해도 작업중인 내용을 검수할때 '자동으로'를 꺼놓고
'페이지열때마다'로 설정해서 시스템에 엄청난 리소스 압박이었는데.
헉.. 이렇게 간단하게 해결하다니.. 으으..


출처)http://blog.paran.com/kthsysop/18542007

Posted by 애바른2
, |