달력

42024  이전 다음

  • 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

윈도우 탐색기 폴더 트리에서 압축파일 디렉토리 처럼 인식하지 않게 하기


XP의 탐색기에서 파일과 폴더를 검색할 때,
Win98이나 Win2000에서 처럼 빨리 검색이 안 되기 때문에 저는 주로
File Finder 라는 실행파일 하나를 사용합니다.

XP는 Zip 파일을 폴더처럼 사용하기 때문에 검색할 때도
zip 파일까지 검색하므로 이 기능을 제거하면 조금 더 빨라 지는데,
제거하는 방법은 시작 -> 실행에서 아래와 같이 하면 되네요.

zip 기능 제거 : regsvr32 /u %windir%\system32\zipfldr.dll
zip 기능 복원 : regsvr32 /s %windir%\system32\zipfldr.dll

zip 기능을 제거한 뒤에 Zip 파일에 오른쪽 마우스를 클릭하여
연결프로그램에서 Winrar 나 알집과 같은 프로그램으로 연결해주면
다시 복원이 되는 것을 방지할 수 있네요.

XP에서 Zip기능을 제거하기 전과 후의 검색시간을 비교해보니까,
Zip 기능 제거 전에는 2분 20초가 걸렸고, Zip 기능 해제 후에는 55초가 소요되었습니다.
제가 주고 사용하고 있는 File Finder는 20초 걸렸습니다.


File Finder의 사용법은,
1. File Finder의 실행파일인 pdfind.exe (184KB)를 Windows 폴더나 system32 폴더에 넣어 둡니다.

2. 아래의 내용을 메모장에서 편집하여 reg 파일로 변경한 다음,
더블클릭하여 레지스트리에 등록합니다.

============
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\pdfind]
@="검색(pdfind)"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\pdfind\command]
@="pdfind.exe"
============

3. 폴더나 작업표시줄 왼쪽의 "시작"에 오른쪽 마우스를 클릭하여 “검색(pdfind)"을
선택한 후 검색하면 탐색기에서 검색하는 것보다 훨씬 편한 것 같네요.
6개보다 많은 파일을 한꺼번에 검색할 때는 탐색기에서 검색을 하세요.

4. 위와같이 레지스트리에 등록 안 하고, 바로가기 아이콘을 만들어서 사용해도 됩니다만...


출처 : http://manian.dreamwiz.com/board/view.asp?bid=A020104&no=3393


Posted by tornado
|

linux.ro Forum Index ? ? Configurare linux ? ? Pb qmail
Autor Pb qmail
georgem1971


Inregistrat: Sep 13, 2003
Postari: 18
Sistem de operare: Red Hat

Postat: 2004-05-16 13:40   
Uh-oh:_.qmail_has_prog_delivery_but_has_x_bit_set._(#4.7.0)/ = asta e eroarea din /var/log/qmail/qmail-send.Mailurile ajung de la user@domeniu la orice alta adresa numai la cea locala nu.(de la user@domeniu catre orice@domeniu nu vine nimich)
Multumesc!!!


Vezi profilul lui georgem1971   Email georgem1971       Editeaza/Sterge This Post   Reply with quote
horchi


Inregistrat: Mar 07, 2003
Postari: 119
Sistem de operare: Free BSD &


De la: Bucuresti
Postat: 2004-05-17 08:35   
Salut!
Din cate cred ai instalat qmai+vpopmail. Daca e asa chmod -x /home/vpopmail/domain/domenui.ro/.qmail-default. De asemenea trebuie sa stii ca orice fisier .qmail- nu trebuie sa aiba setat +x (risc de securitate). In concluzie e bine sa faci un chmod -x la toate fisierele .qmail- (inclusiv acelea din /var/qmail/alias/)
Bafta!
_________________
Actually, unix is a very user-friendly system. It’s just that it is particular about which users it chooses to be friendly with.


Vezi profilul lui horchi   Email horchi     Editeaza/Sterge This Post   Reply with quote

http://www.linux.ro/forum/viewtopic.php?topic=10831&forum=6&1

'OS > LINUX' 카테고리의 다른 글

[qmail]queue-fix  (0) 2006.05.30
[qmHandle 1.2] 큐메일 제어 스크립트  (0) 2006.05.29
qmail+vpopmail 설치  (0) 2006.02.24
Apache James Setting  (0) 2006.02.23
sendmail 설정후 외부메일 안들어올때 -0-  (0) 2006.02.21
Posted by tornado
|

qmail+vpopmail 설치

OS/LINUX 2006. 2. 24. 12:54
qmail + vpopmail 설치편


qmail을 설치해봅시다. 여기서는 qmail+vpopmail+mysql+courier-imap 기반으로 설치를 합니다.

설치할 소스
apache_1.3.31 (http://httpd.apache.org/download.cgi)
php_4.3.7 (http://www.php.net/downloads.php)
mysql_4.0.20 (http://dev.mysql.com/downloads/)
gd_2.0.26 (http://www.boutell.com/gd/http/)
freetype_2.1.9 (http://prdownloads.sourceforge.net/freetype)
ZendOptimizer_2.5.2 (http://zend.com/store/products/zend-optimizer.php)
imap_4.7c2 (ftp://ftp.cac.washington.edu/imap/)
courier-imap_3.0.7 (http://prdownloads.sourceforge.net/courier/)
libiconv_1.9.1 (http://ftp.gnu.org/pub/gnu/libiconv/)
qmail_1.03 (http://qmail.org)
vpopmail_5.4.5 (http://www.inter7.com/vpopmail.html)
daemontools_0.76 (http://qmail.org/moni.csi.hu/pub/qmail/qmail-run/)
ucspi-tcp_0.88 (http://qmail.org/moni.csi.hu/pub/qmail/qmail-run/)
autorespond_2.0.2 (http://www.inter7.com/devel/)
ezmlm_0.53 (http://gd.tuwien.ac.at/infosys/mail/qmail/ezmlm-patches/)
qmailadmin_1.2.1 (http://www.inter7.com/qmailadmin/)
maildrop_1.5.2 (http://prdownloads.sourceforge.net/courier/)
ntop_3.0 (http://sourceforge.net/projects/ntop)
libpcab (ftp://ftp.ee.lbl.gov)

패치파일
gd 패치 : patch_gd2.0.26_gif_040622 (http://downloads.rhyme.com.au/gd/)
daemontools 패치 : daemontools-0.76.errno.patch (http://qmail.org/moni.csi.hu/pub/glibc-2.3.1/)
qmail 패치 : cocktail.patch (http://people.kldp.org/~eunjea/qmail/patch/)
ucspi-tcp 패치 : ucspi-tcp-0.88.errno.patch, ucspi-tcp-0.88.a_record.patch, ucspi-tcp-0.88.nobase.patch(http://qmail.org/moni.csi.hu/pub/glibc-2.3.1/)
ezmlm 패치 : idx.patch (http://qmail.org/moni.csi.hu/pub/glibc-2.3.1/)


▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧▧

1. 설치준비

먼저 설치할 소스를 다운받아 특정폴더에 넣어놓자

여기서는 /usr/local/source 디렉토리를 만들어서 여기에 모두 카피하였다.


2. RPM으로 설치된 패키지 제거

리눅스 설치를 everything으로 하였다면 rpm으로 APM이 설치되어있을 것이다.

해당 패키지들은 모두 제거해줘야한다.


먼저 관련 프로세스가 떠있는지 확인하고 떠있다면 죽여주자


apache 데몬이 있는지 확인

[root@localhost root]# ps -ef | grep httpd

root      4458  3462  0 20:02 pts/0    00:00:00 grep httpd

위와 같이 나오면 데몬이 없는 것이다.

실행중인 데몬이 있으면 데몬을 종료 (killall httpd)


mysql 데몬이 있는지 확인

[root@localhost root]# ps -ef | grep mysqld

이것 역시 떠있는 데몬이 있으면 종료해준다.


RPM 패키지 확인


설치된 apache 패키지 검색

[root@localhost root]# rpm -qa | grep httpd

httpd-manual-2.0.40-21

redhat-config-httpd-1.0.1-18

httpd-devel-2.0.40-21

httpd-2.0.40-21


apache 제거

[root@localhost root]# rpm -e --nodeps httpd-2.0.40-21

위와같은 방법으로 검색된 패키지들은 모두 삭제하자. --nodeps 옵션을 붙혀준 것은 의존성 때문이다.

이 옵션을 붙히지 않으면 다른 패키지가 이 패키지를 dependant 하고 있으므로 삭제할 수 없다는 메시지가 나온다.


설치된 mysql 패키지 검색

[root@localhost root]# rpm -qa | grep mysql

mysql-devel-3.23.54a-11

php-mysql-4.2.2-17

libdbi-dbd-mysql-0.6.5-5

mysql-server-3.23.54a-11

mysql-3.23.54a-11

mod_auth_mysql-1.11-12


mysql 제거

[root@localhost root]# rpm -e --nodeps mysql-3.23.54a-11

검색된 다른 패키지들도 동일한 방법으로 지워줌


설치된 php 패키지 검색

[root@localhost root]# rpm -qa | grep php

php-ldap-4.2.2-17

php-4.2.2-17

asp2php-gtk-0.76.2-5

php-manual-4.2.2-17

asp2php-0.76.2-5

php-devel-4.2.2-17

php-pgsql-4.2.2-17

php-odbc-4.2.2-17

php-snmp-4.2.2-17

php-imap-4.2.2-17


php 제거

[root@localhost root]# rpm -e --nodeps php-4.2.2-17

검색된 다른 패키지들도 동일한 방법으로 지워줌


gd 제거

[root@localhost root]# rpm -e --nodeps gd


freetype 제거

[root@localhost root]# rpm -e --nodeps freetype

3. libiconv 설치
웹메일에서 사용하게 될 iconv를 설치하자

[root@localhost root]# cd /usr/local/source/
[root@localhost source]# tar xvfz ./libiconv-1.9.1.tar.gz
[root@localhost source]# cd libiconv*
[root@localhost libiconv-1.9.1]# ./configure --prefix=/usr/local
[root@localhost libiconv-1.9.1]# make
[root@localhost libiconv-1.9.1]# make install


4. mysql 설치

mysql 그룹과 유저가 등록이 되어있는지 확인한다. 리눅스를 everything 으로 설치했다면 당연히 존재할것이다.

/etc/passwd 파일과 /etc/group 파일을 열면 존재여부를 확인할수 있다.


# vi /etc/passwd

:

mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash

:

# vi /etc/group

:

mysql:x:27:

:


보는바와 같이 이미 mysql 그룹과 유저가 생성되어 있다는 것을 알수 있다. Rpm으로 설치된 mysql때문이다.

만약 만약 생성되어있지 않다면 다음과같이 그룹과 유저를 추가시켜준다.


# groupadd mysql

# useradd -g mysql mysql


등록이 끝났으면 mysql을 다운받은 소스 디렉토리로 이동하여 설치할 준비를 하자

# cd /usr/local/source

[root@localhost source]# tar xvfz mysql*

[root@localhost source]# cd mysql*

[root@localhost mysql-4.0.20]# ./configure \

--prefix=/usr/local/mysql \

--with-charset=euc_kr \

--localstatedir=/usr/local/mysql/data


[root@localhost mysql-4.0.20]# make

[root@localhost mysql-4.0.20]# make install


인스톨까지 끝났다면 mysql에 사용될 기초적인 DB를 생성해준다.

[root@localhost mysql-4.0.20]# scripts/mysql_install_db


DB 생성후엔 데이터가 저장되는 폴더안의 내용물들의 소유권을 mysql 유저에게 주어야 한다.

[root@localhost mysql-4.0.20]# chown -R mysql.mysql /usr/local/mysql/data


환경설정 파일을/etc/my.cnf 에 복사한다.

[root@localhost mysql-4.0.20]# cp support-files/my-medium.cnf /etc/my.cnf


mysql 데몬스크립트 mysql.server 파일에 mysql_safe가 실행되는 라인에 language 옵션을 추가한다.

현재 설치하고 있는 mysql 버전은 4.0.20 임을 잊지말자.

[root@localhost mysql-4.0.20]# vi /usr/local/mysql/share/mysql/mysql.server

mysql.server 내용

$bindir/mysqld_safe --datadir=$datadir --language=korean --pid-file=$pid_file >/dev/null 2>&1 &


mysql 경로 설정

[root@dentistrytest mysql-4.0.20]# vi /root/.bash_profile

/usr/local/mysql/bin 추가

.bash_profile 내용

PATH=$PATH:$HOME/bin:/usr/local/mysql/bin


부팅시 자동실행될 수 있도록 링크를 걸고 데몬을 띄워보자

[여기서 잠깐!]

mysql rpm 패키지를 제거할 때 관련패키지를 제거하지 않았다면 기존의 mysql이 부팅시 자동실행되도록 등록되어있을것이다. 여기서는 위와같이 링크를 걸어줬으므로 이 링크파일은 제거해줘야한다. 아까전에 생성한 링크원본 파일이 리눅스 배포판의 mysql데몬 이름과 같다면 새롭게 링크를 걸 필요가 없지만 지우고 새로이 만드는게 좋다.


root@localhost mysql-4.0.20]# cd /etc/rc.d/init.d/rc3.d

root@localhost rc3.d]# ls al *mysql*

lrwxrwxrwx    1 root     root           16 Oct 11 15:21 K20mysqld -> ../init.d/mysqld


위와같이 mysql 관련 링크가 있으면 삭제해주자

root@localhost rc3.d]# rm rf K20mysqld


rc5.d 디렉토리 내용도 똑같이 삭제해준다.

root@localhost mysql-4.0.20]# cd /etc/rc.d/init.d/rc5.d

root@localhost rc5.d]# ls al *mysql*

lrwxrwxrwx    1 root     root           16 Oct 11 15:21 K20mysqld -> ../init.d/mysqld

root@localhost rc5.d]# rm rf K20mysqld


이제 링크를 걸어주면 되겠다.

root@localhost mysql-4.0.20]# cp -p /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld

이 과정에서 혹 같은 이름의 파일이 존재한다는 경고창이 나오면 y를 누르고 그냥 무시하자

root@localhost mysql-4.0.20]#ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc3.d/S90mysqld

root@localhost mysql-4.0.20]#ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc5.d/S90mysqld

root@localhost mysql-4.0.20]# /etc/rc.d/init.d/mysqld start


위와같이 링크를 걸지 않고 편하게 하고 싶다면 /etc/rc.d/rc.local 파일을 vi 에디터로 열어서 제일 마지막 라인에

데몬파일의 경로를 써주면 되겠다.


mysql 데몬 확인

# ps -ef | grep mysql

mysql     3537  3501  0 15:02 ?        00:00:00 [mysqld]

500       4055  3421  0 15:04 pts/0    00:00:00 grep mysqld


이제 다 끝났으면 mysql에 접속을 해보자

[root@localhost mysql-4.0.20]# /usr/local/mysql/bin/mysql mysql

mysql>


위와같이 프롬프트가 떴다면 정상적으로 설치된것이다.

기타 mysql 계정 추가하는 법은 여기서 설명하지 않겠다. DB 계정추가 및 자세한 사항은 MYSQL TIP 메뉴를 이용 바란다.


5. Freetype 설치

# cd /usr/local/source

[root@localhost source]# tar xvfz freetype-2.1.9*

[root@localhost source]# cd freetype-2.1.9

[root@dentistrytest freetype-2.1.9]# ./configure

[root@dentistrytest freetype-2.1.9]# make

[root@dentistrytest freetype-2.1.9]# make install



6. GD 설치

# cd /usr/local/source

[root@localhost source]# tar xvfz gd*

[root@localhost source]# cd gd*


gif 지원을 위해 패치를 해준다. 현재 GD버전은 gd-2.0.26이다.

본인의 경우는 패치파일들은 모두 /usr/local/source/patches에 모아놨다. 패치파일이 다른 디렉토리에 있다면 경로를 적절하게 써주면 되겠다.

[root@localhost gd-2.0.26]# patch -l < ../patches/patch_gd2.0.26_gif_040622

[root@localhost gd-2.0.26]# ./configure --prefix=/usr/local/gd --with-freetype=/usr/local/include/freetype2

[root@localhost gd-2.0.26]# make

[root@localhost gd-2.0.26]# make install



7. Apache 설치(1)

php 컴파일을 위해 apache 를 설정해준다.

# cd ..

[root@localhost source]# tar xvfz apache*

[root@localhost source]# cd apache*

[root@localhost apache_1.3.31]# ./configure -prefix=/usr/local/apache


8. IMAP 설치 (웹메일도 설치할 경우만)

이쯤에서 php 컴팔할때 사용할 IMAP을 설치해주자 IMAP2001 시리즈나 2002시리즈는 비추한다. IMAP4.7C2 강추!

최신 버전의 레드햇 계열에서 그냥 컴파일을 한다면 우리는 time.h 오류를 접할수 있을것이다.
IMAP configure 소스파일의 경로가 /usr/include/sys/time.h 로 되어있는데 한스텝 올려줘야 에러가 안난다.
현재 설치버전을 반드시 기억하기 바란다. 곧 이러한 삽질을 줄여줄수 있는 버전이 나올것이다.

# mv /usr/include/sys/time.h /usr/include/sys/time.h.ori
# ln -s /usr/include/time.h /usr/include/sys/time.h

설정이 끝났으면 IMAP을 설치하자

# cd /usr/local/source/
[root@localhost source]# tar xvfz imap*
[root@localhost source]# cp ?R imap* /usr/local/
[root@localhost source]# mv /usr/local/imap* /usr/local/imap
[root@localhost source]# cd /usr/local/imap
[root@localhost imap]# make slx
[root@localhost imap]# ln -s c-client include
[root@localhost imap]# ln -s c-client lib
[root@localhost imap]# cd c-client
[root@localhost c-client]# ln -s c-client.a libc-client.a
[root@localhost c-client]# cd ..
[root@localhost imap]# cp imapd/imapd /usr/sbin/in.imapd

xinetd.d/imap 파일을 vi 에디터로 열어서 아래와같이 수정한다. 만약 존재하지 않는다면 만들어준다.
[root@localhost imap]# vi /etc/xinetd.d/imap
service imap
{
        disable = no
        flags = REUSE
        socket_type = stream
        protocol = tcp
        wait = no
        user = root
        server = /usr/sbin/in.imapd
        log_on_failure += USERID
}


xinetd 데몬을 다시 띄우고 time.h를 원상복구 시켜준다.

[root@localhost imap]# /etc/init.d/xinetd restart
[root@localhost imap]# rm /usr/include/sys/time.h
[root@localhost imap]# mv /usr/include/sys/time.h.ori /usr/include/sys/time.h


9. php 설치

이제 php 설치를 한다. 여기서 좀 특별한 것은 는 imap function과 iconv function을 사용하기 위해 옵션을 추가한점이다.

# cd /usr/local/source

[root@localhost source]# tar xvfz php*

[root@localhost source]# cd php*


[root@localhost php-4.3.7]# ./configure --with-config-file-path=/etc \
 --with-exec-prefix=/usr/bin \
 --with-mysql=/usr/local/mysql \
 --with-apache=../apache_1.3.31 \
 --with-imap=/usr/local/source/imap-4.7c \
 --with-gd=/usr/local/gd \
 --with-freetype-dir=/usr/local/include/freetype2 \
 --with-jpeg-dir=/usr/lib/ \
 --with-png-dir=/usr/lib/ \
 --with-zlib-dir=/usr/lib/ \
 --with-language=korean \
 --with-charset=euc-kr \
 --disable-debug \
 --enable-track-vars \
 --enable-safe-mode \
 --enable-gd-native-ttf \
--with-kerberos \
 --enable-mbstring \
 --with-mime-magic \
 --with-iconv=/usr/local/lib/


[root@localhost php-4.3.7]# make

[root@localhost php-4.3.7]# make install


php 환경설정 파일 복사

[root@localhost php-4.3.7]# cp ./php.ini-dist /etc/php.ini


10. apache 설치(2)

[root@localhost php-4.3.7]# cd ../apache*

[root@localhost apache_1.3.31]# ./configure --prefix=/usr/local/apache \

--activate-module=src/modules/php4/libphp4.a \

--enable-module=so \

--enable-shared=max \

--sysconfdir=/usr/local/apache/conf \

--htdocsdir=/usr/local/apache/htdocs \

--logfiledir=/var/log/httpd


[root@localhost apache_1.3.31]# make

[root@localhost apache_1.3.31]# make install


인스톨이 끝났으면 httpd.conf 파일을 수정해줘야한다.

[root@localhost apache_1.3.31]# vi /usr/local/apache/conf/httpd.conf


- ServerName 부분을 주석 해제하고 본인의 아이피나 도메인으로 설정한다.

ServerName 127.0.0.1


- 아래 부분에 index.php 추가

<IfModule mod_dir.c>

    DirectoryIndex index.html index.php

</IfModule>


- AddType 추가

AddType application/x-httpd-php .php .php3 .inc .ph .htm .html

AddType application/x-httpd-php-source .phps


디렉토리 보안을위해 Options 부분 Indexes 를 삭제해준다.

Options Indexes FollowSymLinks MultiViews


시스템 부팅시에 자동 실행되도록 링크를 걸어준다.

[root@localhost apache_1.3.31]# cp -p /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd

[root@localhost apache_1.3.31]# ln s /etc/rc.d/init.d/httpd /etc/rc.d/rc3.d/S99httpd

[root@localhost apache_1.3.31]# ln s /etc/rc.d/init.d/httpd /etc/rc.d/rc5.d/S99httpd

[root@localhost apache_1.3.31]# /etc/rc.d/init.d/httpd start


<P style="FONT-SIZE: 12px; MARGIN: 0px
Posted by tornado
|

Apache James Setting

OS/LINUX 2006. 2. 23. 15:31

Apache James 2.1 Setting

mail server로 대다수 서버는 sendmail이라는 데몬을 사용하죠. 물론 qmail이나 다른 데몬들도 많이 나오고 있습니다. 그런데 굳이 java로 된 메일 서버를 쓸 이유까지 있을까도 생각할 수 있지만 이런 질문에 대한 답은 각자 찾아보도록 하기로 하고 james의 사용에 대해서 알아보자.

아쉬운 점은 현재까지 릴리즈된 James 2.1은 IMAP을 지원하지 않기 때문에 이를 이용한 기능은 구현이 어렵다. 하지만 3.0버젼에서는 IMAP을 지원한다고 하니 기대해볼만 하다.


 

James Download & Install

우선 James의 기반이 되는 Avalon과 James를 다음 사이트에서 다운로드 받아서 설치하는 과정이 필요하다.

Avalon :
http://avalon.apache.org/
James : http://james.apache.org/

※ Java 2 Platform, Standard Edition(J2SE)는 기본적으로 필요하다.

Console # gzip -d james-2.1.3.tar.gzConsole # tar xvf james-2.1.3.tarConsole # unzip Avalon-4.1.4-bin.zipConsole # mv james-2.1.3 /usr/local/ ← 원하는 위치로 옮긴다Console # mv Avalon-4.1.4 /usr/local/Console # ln -s /usr/local/james-2.1.3 jamesConsole # ln -s /usr/local/Avalon-4.1.4 avalon


 

Shell Configuration

Console # suConsole # vi /etc/profile ← bash가 아니면 그에 해당하는 설정 파일# /etc/profile…##### HOME SET ###############################################################export JAVA_HOME=/usr/local/java ← j2se의 위치 지정export AVALON_HOME=/usr/local/avalon ← avalon의 위치 지정export JAMES_HOME=/usr/local/james ← james의 위치 지정…#### CLASSPATH SET ###########################################################export CLASSPATH=./:$JAVA_HOME/lib/tools.jarexport CLASSPATH=$CLASSPATH:$AVALON_HOME/avalon-framework-4.1.4.jar…#### PATH SET ################################################################export PATH=$PATH:$JAVA_HOME/binexport PATH=$PATH:$JAMES_HOME/bin:wq

기본적인 세팅이 끝났으므로 제대로 동작하는지 테스트 해보자.

Console # cd $JAMES_HOME/bin/Console # chmod +x *.sh ← 만약 *.sh의 모드가 readonly일 경우에..Console # ./run.shUsing PHOENIX_HOME: /tmp/james-2.1.3Using PHOENIX_TMPDIR: /tmp/james-2.1.3/tempUsing JAVA_HOME: /usr/local/javaRunning Phoenix: Phoenix 4.0.1James 2.1.3Remote Manager Service started plain:4555POP3 Service started plain:110SMTP Service started plain:25NNTP Service started plain:119Fetch POP Disabled ← 이 결과와 같다면 정상적으로 동작하는 것이다.JVM exiting abnormally. Shutting down Phoenix. ← CTRL+C를 누르면...


 

Repository Setting

사용자 로긴과 패스워드를 담고 있는 User Repository와 MailBox/Spool에 대한 정보와 메일 메시지를 담고 있든 Mail/Spool Repository는 기본적으로 파일 시스템으로 운영되지만 설정하기에 따라 JDBC를 지원하는 RDBMS(mysql, oracle, etc)에 저장할 수 있다. 이하 부분에서는 RDBMS로 ORACLE을 사용하는 설정에 대해 알아보자. 이를 위해서 Oracle 9i JDBC Driver를 받아야 한다.

Console # mv classes12.jar $JAMES_HOME/lib/ Console # mv nls_charset12.jar $JAMES_HOME/lib/

그외에 필요한 package의 경우도 이와 마찬가지로 $JAMES_HOME/lib/ 폴더에 넣으면 된다.

Console # cd $JAMES_HOME/apps/james/SAR-INF/vi config.xml

config.xml을 다음과 같이 수정하면 된다.

# $JAMES_HOME/apps/james/SAR-INF/config.xml<?xml version="1.0"?><!-- Configuration file for the Apache Jakarta James server --><!-- This file contains important settings that control the behaviour --><!-- of all of the services and repositories. --><!-- README! --><!-- This configuration file is designed to run without alteration for simple tests. --><!-- It assumes you have a DNS server on localhost and assigns a root password of root. --><!-- In case the defaults do not suit you, the items you are most likely to need to change --><!-- are preceded by a CHECKME! or CONFIRM? comment in the left margin. --><!-- For production use you will probably need to make more extensive changes, see --><!-- http://james.apache.org/documentation_2_1.html --><!-- $Revision: 1.40.2.5 $ Committed on $Date: 2003/05/12 21:10:24 $ by: $Author: noel $ --><config> <James><!-- CHECKME! --> <!-- This is the postmaster email address for this mail server. --> <!-- Set this to the appropriate email address for error reports --> <!-- If this is set to a non-local email address, the mail server --> <!-- will still function, but will generate a warning on startup. --> <postmaster>Postmaster@localhost</postmaster> <!-- servernames identifies the DNS namespace served by this instance of James. --> <!-- These servernames are used for both matcher/mailet processing and SMTP auth --> <!-- to determine when a mail is intended for local delivery. --> <!-- --> <!-- If autodetect is TRUE, James wil attempt to discover its own host name AND --> <!-- use any explicitly specified servernames. --> <!-- If autodetect is FALSE, James will use only the specified servernames. --> <!-- --> <!-- If autodetectIP is not FALSE, James will also allow add the IP address for each servername. --> <!-- The automatic IP detection is to support RFC 2821, Sec 4.1.3, address literals. --> <!-- --> <!-- To override autodetected server names simply add explicit servername elements. --> <!-- In most cases this will be necessary. --> <!-- By default, the servername 'localhost' is specified. This can be removed, if required. --> <!-- --> <!-- Warning: If you are using fetchpop it is important to include the --> <!-- fetched domains in the server name list to prevent looping. --> <servernames autodetect="true" autodetectIP="true"><!-- CONFIRM? --> <servername>localhost</servername> <servername>apple</servername> </servernames> <!-- Set whether user names are case sensitive or case insensitive --> <!-- Set whether to enable local aliases --> <!-- Set whether to enable forwarding --> <usernames ignoreCase="true" enableAliases="true" enableForwarding="true"/> <!-- The inbox repository is the location for users inboxes --> <!-- Default setting: file based repository - enter path ( use "file:///" for absolute) --><!-- <inboxRepository> <repository destinationURL="file://var/mail/inboxes/" type="MAIL"/> </inboxRepository>--> <!-- Alternative inbox repository definition for DB use. --> <!-- The format for the destinationURL is "db://<data-source>/<table>" --> <!-- <data-source> is the datasource name set up in the database-connections block, below --> <!-- <table> is the name of the table to store user inboxes in --> <!-- The user name is used as <repositoryName> for this repository config. --> <inboxRepository> <repository destinationURL="db://maildb/inbox/" type="MAIL"/> </inboxRepository> <!-- Alternative inbox repository definition for DB use. --> <!-- Stores message body in file system, rest in database --> <!-- <inboxRepository> <repository destinationURL="dbfile://maildb/inbox/" type="MAIL"/> </inboxRepository> --> </James> <!-- Fetch pop block, fetches mail from POP3 servers and inserts it into the incoming spool --> <!-- Warning: It is important to prevent mail from looping by setting the --> <!-- fetched domains in the <servernames> section of the <James> block --> <!-- above. This block is disabled by default. --> <fetchpop enabled="false"> <!-- You can have as many fetch tasks as you want, but each must have a --> <!-- unique name by which it identified --> <fetch name="mydomain.com"> <!-- Host name or IP address --> <host>mail.mydomain.com</host> <!-- Account login username --> <user>username</user> <!-- Account login password --> <password>pass</password> <!-- How frequently this account is checked - in milliseconds. 600000 is every ten minutes --> <interval>600000</interval> </fetch> </fetchpop> <!-- The James Spool Manager block --> <!-- --> <!-- This block is responsible for processing messages on the spool. --> <spoolmanager> <!-- Number of spool threads --> <threads> 10 </threads> <!-- Set the Java packages from which to load mailets and matchers --> <mailetpackages> <mailetpackage>org.apache.james.transport.mailets</mailetpackage> </mailetpackages> <matcherpackages> <matcherpackage>org.apache.james.transport.matchers</matcherpackage> </matcherpackages> <!-- The root processor is a required processor - James routes all mail on the spool --> <!-- through this processor first. --> <!-- --> <!-- This configuration is a sample configuration for the root processor. --> <processor name="root"> <!-- Checks that the email Sender is associated with a valid domain. --> <!-- Useful for detecting and eliminating spam. --> <!-- For this block to function, the spam processor must be configured. --> <!-- <mailet match="SenderInFakeDomain" class="ToProcessor"> <processor> spam </processor> </mailet> --> <!-- Important check to avoid looping --> <mailet match="RelayLimit=30" class="Null"/> <!-- White List: If you use block lists, you will probably want to check for known permitted senders. This is particularly true if you use more aggressive block lists, such as SPEWS, that are prone to block entire subnets without regard for non-spamming senders. --> <!-- specific known senders --> <!-- <mailet match="SenderIs=goodboy@goodhost" class="ToProcessor"> <processor> transport </processor> </mailet> --> <!-- People on this list agree to pay a penalty if they send spam --> <mailet match="InSpammerBlacklist=query.bondedsender.org" class="ToProcessor"> <processor> transport </processor> </mailet> <!-- E-mail legally required not to be spam (see: http://www.habeas.com) --> <!-- <mailet match="HasHabeasWarrantMark" class="ToProcessor"> <processor> transport </processor> </mailet> --> <!-- End of White List --> <!-- Check for delivery from a known spam server --> <!-- This set of matchers/mailets redirect all emails from known --> <!-- black holes, open relays, and spam servers to the spam processor --> <!-- For this set to function properly, the spam processor must be configured. --> <mailet match="InSpammerBlacklist=dnsbl.njabl.org" class="ToProcessor"> <processor> spam </processor> <notice>550 Requested action not taken: rejected - see http://njabl.org/ </notice> </mailet> <mailet match="InSpammerBlacklist=relays.ordb.org" class="ToProcessor"> <processor> spam </processor> <notice>550 Requested action not taken: rejected - see http://www.ordb.org/ </notice> </mailet> <!-- Sample matching to kill a message (send to Null) --> <!-- <mailet match="RecipientIs=badboy@badhost" class="Null"/> --> <!-- Send remaining mails to the transport processor for either local or remote delivery --> <mailet match="All" class="ToProcessor"> <processor> transport </processor> </mailet> </processor> <!-- The error processor is required. James may internally set emails to the --> <!-- error state. The error processor is generally invoked when there is an --> <!-- unexpected error either in the mailet chain or internal to James. --> <!-- --> <!-- By default configuration all email that generates an error in placed in --> <!-- an error repository. --> <processor name="error"> <!-- Logs any messages to the repository specified --> <mailet match="All" class="ToRepository"><!-- <repositoryPath> file://var/mail/error/</repositoryPath>--> <!-- An alternative database repository example follows. --> <repositoryPath> db://maildb/deadletter/error </repositoryPath> <passThrough> true </passThrough> </mailet> <!-- If you want to notify the sender their message generated an error, uncomment this --> <!-- <mailet match="All" class="NotifySender"/> --> <!-- If you want to notify the postmaster that a message generated an error, uncomment this --> <!-- <mailet match="All" class="NotifyPostmaster"/> --> </processor> <!-- Processor CONFIGURATION SAMPLE: transport is a sample custom processor for local or --> <!-- remote delivery --> <processor name="transport"> <!-- Is the recipient is for a local account, deliver it locally --> <mailet match="RecipientIsLocal" class="LocalDelivery"/> <!-- If the host is handled by this server and it did not get --> <!-- locally delivered, this is an invalid recipient --> <mailet match="HostIsLocal" class="ToProcessor"> <processor>error</processor> </mailet><!-- CHECKME! --> <!-- This is an anti-relay matcher/mailet combination --> <!-- --> <!-- Emails sent from servers not in the network list are --> <!-- rejected as spam. This is one method of preventing your --> <!-- server from being used as an open relay. Make sure you understand --> <!-- how to prevent your server from becoming an open relay before --> <!-- changing this configuration. --> <!-- --> <!-- This matcher/mailet combination must come after local delivery has --> <!-- been performed. Otherwise local users will not be able to receive --> <!-- email from senders not in this remote address list. --> <!-- --> <!-- If you are using this matcher/mailet you will probably want to --> <!-- update the configuration to include your own network/addresses. The --> <!-- matcher can be configured with a comma separated list of IP addresses --> <!-- wildcarded IP subnets, and wildcarded hostname subnets. --> <!-- e.g. "RemoteAddrNotInNetwork=127.0.0.1, abc.de.*, 192.168.0.*" --> <!-- --> <!-- If you are using SMTP authentication then you can (and generally --> <!-- should) disable this matcher/mailet pair. --> <mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor"> <processor> spam </processor> </mailet> <!-- Attempt remote delivery using the specified repository for the spool, --> <!-- using delay time to retry delivery and the maximum number of retries --> <mailet match="All" class="RemoteDelivery"><!-- <outgoing> file://var/mail/outgoing/ </outgoing>--> <!-- alternative database repository example below --> <outgoing> db://maildb/spool/outgoing </outgoing> <!-- Number of milliseconds between delivery attempts --> <delayTime> 21600000 </delayTime> <!-- Number of failed attempts before returning to the sender --> <maxRetries> 5 </maxRetries> <!-- The number of threads that should be trying to deliver outgoing messages --> <deliveryThreads> 1 </deliveryThreads> <!-- A single mail server to deliver all outgoing messages. --> <!-- This is useful if this server is a backup or failover machine, --> <!-- or if you want all messages to be routed through a particular mail server, --> <!-- regardless of the email addresses specified in the message --> <!-- --> <!-- The gateway element specifies the gateway SMTP server name. --> <!-- If your gateway mail server is listening on a port other than 25, --> <!-- you can set James to connect to it on that port using the gatewayPort --> <!-- element. --> <!-- <gateway> otherserver.mydomain.com </gateway> <gatewayPort>25</gatewayPort> --> </mailet> </processor> <!-- Processor CONFIGURATION SAMPLE: spam is a sample custom processor for handling --> <!-- spam. --> <!-- You can either log these, bounce these, or just ignore them. --> <processor name="spam"> <!-- To destroy all messages, uncomment this matcher/mailet configuration --> <!-- <mailet match="All" class="Null"/> --> <!-- To notify the sender their message was marked as spam, uncomment this matcher/mailet configuration --> <!-- <mailet match="All" class="NotifySender"/> --> <!-- To notify the postmaster that a message was marked as spam, uncomment this matcher/mailet configuration --> <!-- <mailet match="All" class="NotifyPostmaster"/> --> <!-- To log the message to a repository, this matcher/mailet configuration should be uncommented. --> <!-- This is the default configuration. --> <mailet match="All" class="ToRepository"><!-- <repositoryPath>file://var/mail/spam/</repositoryPath>--> <!-- Changing the repositoryPath, as in this commented out example, will --> <!-- cause the mails to be stored in a database repository. --> <!-- Please note that only one repositoryPath element can be present for the mailet --> <!-- configuration. --> <repositoryPath> db://maildb/deadletter/spam </repositoryPath> </mailet> </processor> </spoolmanager> <!-- DNS Server Block --> <!-- --> <!-- Specifies DNS Server information for use by various components inside --> <!-- James. --> <!-- --> <!-- Information includes a list of DNS Servers to be used by James. These are --> <!-- specified by the server elements, each of which is a child element of the --> <!-- servers element. Each server element is the IP address of a single DNS server. --> <!-- The servers element can have multiple server children. --> <dnsserver> <servers><!-- CONFIRM? --> <!--Enter ip address of your DNS server, one IP address per server --> <!-- element. The default configuration assumes a DNS server on the localhost. --> <server>127.0.0.1</server> <server>211.175.55.95</server> ← your dns </servers> <authoritative>false</authoritative> </dnsserver> <remotemanager> <port>4555</port> <!-- Uncomment this if you want to bind to a specific inetaddress --> <!-- <bind> </bind> --> <!-- Uncomment this if you want to use TLS (SSL) on this port --> <!-- <useTLS>true</useTLS> --> <handler> <!-- This is the name used by the server to identify itself in the RemoteManager --> <!-- protocol. If autodetect is TRUE, the server will discover its --> <!-- own host name and use that in the protocol. If discovery fails, --> <!-- the value of 'localhost' is used. If autodetect is FALSE, James --> <!-- will use the specified value. --> <helloName autodetect="true">myMailServer</helloName> <administrator_accounts><!-- CHECKME! --> <!-- Change the default login/password. --> <account login="root" password="root"/> </administrator_accounts> <connectiontimeout> 60000 </connectiontimeout> </handler> </remotemanager> <!-- The POP3 server is enabled by default --> <!-- Disabling blocks will stop them from listening, --> <!-- but does not free as many resources as removing them would --> <pop3server enabled="true"> <!-- port 995 is the well-known/IANA registered port for POP3S ie over SSL/TLS --> <!-- port 110 is the well-known/IANA registered port for Standard POP3 --> <port>110</port> <!-- Uncomment this if you want to bind to a specific inetaddress --> <!-- <bind> </bind> --> <!-- Uncomment this if you want to use TLS (SSL) on this port --> <!-- <useTLS>true</useTLS> --> <handler> <!-- This is the name used by the server to identify itself in the POP3 --> <!-- protocol. If autodetect is TRUE, the server will discover its --> <!-- own host name and use that in the protocol. If discovery fails, --> <!-- the value of 'localhost' is used. If autodetect is FALSE, James --> <!-- will use the specified value. --> <helloName autodetect="true">myMailServer</helloName> <connectiontimeout>120000</connectiontimeout> </handler> </pop3server> <!-- The SMTP server is enabled by default --> <!-- Disabling blocks will stop them from listening, --> <!-- but does not free as many resources as removing them would --> <smtpserver enabled="true"> <!-- port 25 is the well-known/IANA registered port for SMTP --> <port>25</port> <!-- Uncomment this if you want to bind to a specific inetaddress --> <!-- <bind> </bind> --> <!-- Uncomment this if you want to use TLS (SSL) on this port --> <!-- <useTLS>true</useTLS> --> <handler> <!-- This is the name used by the server to identify itself in the SMTP --> <!-- protocol. If autodetect is TRUE, the server will discover its --> <!-- own host name and use that in the protocol. If discovery fails, --> <!-- the value of 'localhost' is used. If autodetect is FALSE, James --> <!-- will use the specified value. --> <helloName autodetect="true">myMailServer</helloName> <connectiontimeout>360000</connectiontimeout> <!-- Uncomment this if you want to require SMTP authentication. --> <!-- <authRequired>true</authRequired> --> <!-- Uncomment this if you want to verify sender addresses, ensuring that --> <!-- the sender address matches the user who has authenticated. --> <!-- This prevents a user of your mail server from acting as someone else --> <!-- <verifyIdentity>true</verifyIdentity> --> <!-- This sets the maximum allowed message size (in kilobytes) for this --> <!-- SMTP service. If unspecified, the value defaults to 0, which means no limit. --> <maxmessagesize>0</maxmessagesize> </handler> </smtpserver> <!-- The NNTP server is enabled by default --> <!-- Disabling blocks will stop them from listening, --> <!-- but does not free as many resources as removing them would --> <!-- NNTP-specific: if you disable the NNTP Server, you should also set the nntp-repository's threadCount to 0, otherwise there will be threads active and polling --> <nntpserver enabled="true"> <!-- THE NNTP PROTOCOL IS EXPERIMENTAL AND NOT AS WELL TESTED AS SMTP AND POP3 IN THIS RELEASE. The James project recommends that you check the James web site for updates to the NNTP service. --> <!-- port 563 is the well-known/IANA registered port for NNTP over SSL/TLS --> <!-- port 119 is the well-known/IANA registered port for Standard NNTP --> <port>119</port> <!-- Uncomment this if you want to bind to a specific inetaddress --> <!-- <bind> </bind> --> <!-- Uncomment this if you want to use TLS (SSL) on this port --> <!-- <useTLS>true</useTLS> --> <handler> <!-- This is the name used by the server to identify itself in the NNTP --> <!-- protocol. If autodetect is TRUE, the server will discover its --> <!-- own host name and use that in the protocol. If discovery fails, --> <!-- the value of 'localhost' is used. If autodetect is FALSE, James --> <!-- will use the specified value. --> <helloName autodetect="true">myMailServer</helloName> <connectiontimeout>120000</connectiontimeout> <!-- Set the authRequired value to true to enable authenticated NNTP --> <authRequired>false</authRequired> </handler> </nntpserver> <nntp-repository> <!-- If this is set to true, posting will be disallowed. --> <readOnly>false</readOnly> <rootPath>file://var/nntp/groups</rootPath> <tempPath>file://var/nntp/temp</tempPath> <articleIDPath>file://var/nntp/articleid</articleIDPath> <articleIDDomainSuffix>news.james.apache.org</articleIDDomainSuffix> <!-- The news groups hosted in this NNTP repository. --> <newsgroups> <newsgroup>org.apache.james.dev</newsgroup> <newsgroup>org.apache.james.user</newsgroup> <newsgroup>org.apache.avalon.dev</newsgroup> <newsgroup>org.apache.avalon.user</newsgroup> </newsgroups> <spool> <configuration> <spoolPath>file://var/nntp/spool</spoolPath> <!-- The number of threads that process spooler related tasks. --> <threadCount>1</threadCount> <!-- The spool thread(s) should idle for some time, if it has nothing to do --> <threadIdleTime>60000</threadIdleTime> </configuration> </spool> </nntp-repository> <!-- The Mailstore block --> <mailstore> <repositories> <!-- File based repositories. These repositories store all message data --> <!-- in the file system. --> <repository class="org.apache.james.mailrepository.AvalonMailRepository"> <protocols> <protocol>file</protocol> </protocols> <types> <type>MAIL</type> </types> </repository> <repository class="org.apache.james.mailrepository.AvalonSpoolRepository"> <protocols> <protocol>file</protocol> </protocols> <types> <type>SPOOL</type> </types> </repository> <!-- JDBC based repositories. These repositories store all message data --> <!-- in the database. --> <repository class="org.apache.james.mailrepository.JDBCMailRepository"> <protocols> <protocol>db</protocol> </protocols> <types> <type>MAIL</type> </types> <config> <sqlFile>file://conf/sqlResources.xml</sqlFile> </config> </repository> <repository class="org.apache.james.mailrepository.JDBCSpoolRepository"> <protocols> <protocol>db</protocol> </protocols> <types> <type>SPOOL</type> </types> <config> <sqlFile>file://conf/sqlResources.xml</sqlFile> </config> </repository> <!-- These repositories store message delivery and headers in the DB, and the body to the filesystem --> <repository class="org.apache.james.mailrepository.JDBCMailRepository"> <protocols> <protocol>dbfile</protocol> </protocols> <types> <type>MAIL</type> </types> <config> <sqlFile>file://conf/sqlResources.xml</sqlFile> <filestore>file://var/dbmail</filestore> </config> </repository> <repository class="org.apache.james.mailrepository.JDBCSpoolRepository"> <protocols> <protocol>dbfile</protocol> </protocols> <types> <type>SPOOL</type> </types> <config> <sqlFile>file://conf/sqlResources.xml</sqlFile> <filestore>file://var/dbmail</filestore> </config> </repository> </repositories> <!-- Spool repository configuration --> <!-- The spool repository is the location where incoming mails are temporarily stored --> <!-- before being processed. --><!-- <spoolRepository> <repository destinationURL="file://var/mail/spool/" type="SPOOL"/> </spoolRepository>--> <!-- Alternative spool repository definition for JDBC use --> <spoolRepository> <repository destinationURL="db://maildb/spool/spool" type="SPOOL"/> </spoolRepository> <!-- Alternative spool repository definition for JDBC use --> <!-- Stores message body in file system, rest in database --> <!-- <spoolRepository> <repository destinationURL="dbfile://maildb/spool/spool" type="SPOOL"/> </spoolRepository> --> </mailstore> <!-- The User Storage block --> <users-store> <!-- Configure User Repositories here. --> <!-- --> <!-- User repositories are required for the following purposes: --> <!-- - storing James user information, including forwards, aliases, --> <!-- and authentication data. --> <!-- - holding lists of users for the listserv mailet --> <!-- Currently, two different storage options are available: --> <!-- - file-based storage using Java serialization --> <!-- - database-backed storage --> <!-- (Use of database or file-system is defined on a "per-repository" basis) --> <!-- --> <!-- Note: One user repository is required for James: --> <!-- LocalUsers - the users for whom you are providing POP3, NNTP, or SMTP service --> <!-- --> <!-- Other repositories may be used by matchers or mailets. --> <!-- Default: File-based user repositories Use these configurations to store user info in the filesystem --> <!-- The LocalUsers repository, for storing James' User info. --><!-- <repository name="LocalUsers" class="org.apache.james.userrepository.UsersFileRepository"> <destination URL="file://var/users/"/> </repository>--> <!-- Database backed user repositories --> <!-- --> <!-- Use these configurations to store user info in a database. --> <!-- Note: The <data-source> element must refer to a connection configured --> <!-- in the <database-connections> configuration section. --> <!-- The LocalUsers repository, for storing James' User info. --> <repository name="LocalUsers" class="org.apache.james.userrepository.JamesUsersJdbcRepository" destinationURL="db://maildb/users"> <sqlFile>file://conf/sqlResources.xml</sqlFile> </repository> </users-store> <!-- The database-connections block --> <database-connections> <!-- These connections are referred to by name elsewhere in the config file --><!-- CHECKME! --> <!-- To allow James to use a database you must configure the database connection here. --> <!-- If you are not using a database, you can leave this section unchanged. --> <!-- These connections are referred to by name in URLs elsewhere in the config file. --> <data-sources> <!-- James is distributed with a built in relevant copy of the mm.mysql JDBC --> <!-- driver. No additional driver is needed for mysql. Read the mm.mysql LGPL --> <!-- license at apps\james\SAR-INF\lib\mm.mysql.LICENCE --> <!-- JDBC driver .jar libraries for other RDBMS can be placed in ~james/lib/ --> <!-- Example, connecting to a MySQL database called "mail" on localhost--> <!-- --> <!-- The max value is the maximum number of concurrent connections James will --> <!-- open to this database--> <!-- If you see "SQLException: Giving up... no connections available." in your --> <!-- log files or bounced mail you should increase this value --> <!-- <data-source name="maildb" class="org.apache.james.util.mordred.JdbcDataSource"> <driver>org.gjt.mm.mysql.Driver</driver> <dburl>jdbc:mysql://127.0.0.1/mail?autoReconnect=true</dburl> <user>username</user> <password>password</password> <max>20</max> </data-source> --> <data-source name="maildb" class="org.apache.james.util.mordred.JdbcDataSource"> <driver>oracle.jdbc.driver.OracleDriver</driver> <dburl>jdbc:oracle:thin:@127.0.0.1:1521:mail</dburl> ← @ Oracle Server Address : port number : SID <user>mail</user> ← user login <password>mail</password> ← user passwd <max>20</max> </data-source> <!-- Example, connecting to a Microsoft MSSQL database called "mail" on localhost--> <!-- --> <!-- The max value is the maximum number of concurrent connections James will --> <!-- open to this database--> <!-- If you see "SQLException: Giving up... no connections available." in your --> <!-- log files or bounced mail you should increase this value --> <!-- <data-source name="maildb" class="org.apache.james.util.mordred.JdbcDataSource"> <driver>com.inet.tds.TdsDriver</driver> <dburl>jdbc:inetdae7:127.0.0.1?database=James</dburl> <user>sa_james</user> <password>blahblah</password> <max>20</max> </data-source> --> </data-sources> </database-connections> <!-- Configuration for Cornerstone Services --> <!-- --> <!-- For a simple configuration, nothing beneath this line should require --> <!-- alteration. --> <!-- --> <!-- You will need to adjust the Socket Manager service configuration if you want --> <!-- to enable secure sockets (TLS) for any James service. --> <!-- --> <!-- Complex or high volume configurations may require changes to the parameters --> <!-- in this section. Please read the James and Avalon documentation before --> <!-- attempting to adjust this section. --> <!-- --> <!-- The Object Storage block --> <!-- --> <!-- Defines file storage details that are used for file-based repositories. --> <objectstorage> <repositories> <repository class="org.apache.james.mailrepository.filepair.File_Persistent_Object_Repository"> <protocols> <protocol>file</protocol> </protocols> <types> <type>OBJECT</type> </types> <models> <model>SYNCHRONOUS</model> <model>ASYNCHRONOUS</model> <model>CACHE</model> </models> </repository> <repository class="org.apache.james.mailrepository.filepair.File_Persistent_Stream_Repository"> <protocols> <protocol>file</protocol> </protocols> <types> <type>STREAM</type> </types> <models> <model>SYNCHRONOUS</model> <model>ASYNCHRONOUS</model> <model>CACHE</model> </models> </repository> </repositories> </objectstorage> <!-- The Connection Manager block --> <!-- --> <!-- The idle-timeout is the number of milliseconds that it will take for idle --> <!-- client connections managed by this connection manager to be marked at timed out. --> <!-- If no value is specified, the value defaults to 5 minutes, 300000 milliseconds --> <!-- A value of 0 means that client sockets will not timeout. --> <!-- --> <!-- The max-connections parameter specifies the default maximum number of client --> <!-- connections that this connection manager will allow per managed server socket. --> <!-- This value can be overridden by each individual service. --> <!-- If no value is specified, the value defaults to 30. --> <!-- A value of 0 means that there is no limit imposed by the connection manager, although --> <!-- resource limitations imposed by other components (i.e. max # of threads) may --> <!-- serve to limit the number of open connections. --> <!-- --> <connections> <idle-timeout>300000</idle-timeout> <max-connections>30</max-connections> </connections> <!-- The Socket Manager block --> <!-- --> <!-- The server-sockets element has a number of factory sub-elements. --> <!-- Each of the factory elements has a name and class attribute --> <!-- The name attribute for each factory element must be unique. --> <!-- The class attribute is the name of a class that implements the --> <!-- interface org.apache.avalon.cornerstone.services.ServerSocketFactory --> <!-- Specific factory elements may require some sub-elements. This is --> <!-- factory class dependent. --> <!-- --> <!-- The client-sockets element has a number of factory sub-elements. --> <!-- Each of the factory elements has a name and class attribute --> <!-- The name attribute for each factory element must be unique. --> <!-- The class attribute is the name of a class that implements the --> <!-- interface org.apache.avalon.cornerstone.services.SocketFactory --> <!-- Specific factory elements may require some sub-elements. This is --> <!-- factory class dependent. --> <!-- --> <sockets> <server-sockets> <factory name="plain" class="org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory"/> <!-- <factory name="ssl" class="org.apache.avalon.cornerstone.blocks.sockets.TLSServerSocketFactory"> <keystore> <file>conf/keystore</file> <password>secret</password> <type>JKS</type> <protocol>TLS</protocol> <algorithm>SunX509</algorithm> <authenticate-client>false</authenticate-client> </keystore> </factory> --> </server-sockets> <client-sockets> <factory name="plain" class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory"/> </client-sockets> </sockets> <!-- The Thread Manager block --> <!-- --> <!-- The thread manager provides thread pools for use throughout the server. --> <!-- --> <!-- A thread pool with the name "default" must be defined in this thread manager --> <!-- configuration. --> <!-- --> <!-- Each thread pool is defined with a "thread-group" element. --> <!-- Each of these elements has the following required sub-elements: --> <!-- name - the name of the thread pool, used by other components to --> <!-- lookup the thread pool --> <!-- priority - the thread priority for threads in the pool. This is --> <!-- a value between 0 and 10, with 5 being the normal --> <!-- priority and 10 being the maximum. --> <!-- is-daemon - whether the threads in the pool are daemon threads. --> <!-- max-threads - the maximum number of threads allowed in the pool. --> <!-- min-threads - the minimum number of threads allowed in the pool. (not implemented) --> <!-- min-spare-threads - (not implemented) --> <thread-manager> <thread-group> <name>default</name> <priority>5</priority> <is-daemon>false</is-daemon> <max-threads>100</max-threads> <min-threads>20</min-threads> <min-spare-threads>20</min-spare-threads> </thread-group> </thread-manager></config>


 

Daemon Script

시스템 부팅시 자동으로 실행하기 위한 boot script을 작성하면 Process의 관리가 수월하다.

Console # cd $JAMES_HOME/bin/Console # vi james_daemon.sh

james_daemon.sh의 내용은 다음과 같다..

# $JAMES_HOME/bin/james_daemon.sh#!/bin/sh## go.sh# Shell script to start and stop James# OS specific support. $var _must_ be set to either true or false.cygwin=falsecase "`uname`" inCYGWIN*) cygwin=true;;esac# Checking for JAVA_HOME is required on *nixif [ "$JAVA_HOME" = "" ] ; then export JAVA_HOME=/usr/java echo "ERROR: JAVA_HOME not found in your environment." echo echo "Please, set the JAVA_HOME variable in your environment to match the" echo "location of the Java Virtual Machine you want to use." echo "Trying to use /usr/java as default" exit 1fiJAVACMD=$JAVA_HOME/bin/java# resolve links - $0 may be a softlinkTHIS_PROG="$0"while [ -h "$THIS_PROG" ]; do ls=`ls -ld "$THIS_PROG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '.*/.*' > /dev/null; then THIS_PROG="$link" else THIS_PROG=`dirname "$THIS_PROG"`/"$link" fidone# Get standard environment variablesPRGDIR=`dirname "$THIS_PROG"`PHOENIX_HOME=`cd "$PRGDIR/.." ; pwd`unset THIS_PROG# For Cygwin, ensure paths are in UNIX format before anything is touchedif $cygwin; then [ -n "$PHOENIX_HOME" ] && PHOENIX_HOME=`cygpath --unix "$PHOENIX_HOME"`fiif [ -z "$PHOENIX_TMPDIR" ] ; then# Define the java.io.tmpdir to use for Phoenix PHOENIX_TMPDIR="$PHOENIX_HOME"/temp mkdir -p "$PHOENIX_TMPDIR"fi# For Cygwin, switch paths to Windows format before running javaif $cygwin; then PHOENIX_HOME=`cygpath --path --windows "$PHOENIX_HOME"`fi# ----- Execute The Requested Command -----------------------------------------echo "Using PHOENIX_HOME: $PHOENIX_HOME"echo "Using PHOENIX_TMPDIR: $PHOENIX_TMPDIR"echo "Using JAVA_HOME: $JAVA_HOME"## Command to override JVM ext dir## This is needed as some JVM vendors # like placing jaxp/jaas/xml-parser jars in ext dir# thus breaking Phoenix#JVM_OPTS="-Djava.ext.dirs=$PHOENIX_HOME/lib"if [ "$PHOENIX_SECURE" != "false" ] ; then# Make phoenix run with security manager enabled JVM_OPTS="$JVM_OPTS -Djava.security.manager"fiif [ "$1" = "start" ] ; then shift $JAVACMD $JVM_OPTS \ $JVM_OPTS \ -Djava.security.policy=jar:file:$PHOENIX_HOME/bin/phoenix-loader.jar!/META-INF/java.policy \ $PHOENIX_JVM_OPTS \ -Dphoenix.home="$PHOENIX_HOME" \ -Djava.io.tmpdir="$PHOENIX_TMPDIR" \ -jar "$PHOENIX_HOME/bin/phoenix-loader.jar" $* > /dev/null 2>&1 & echo $! > /var/run/james.pid elif [ "$1" = "stop" ] ; then shift kill -15 `cat /var/run/james.pid` rm -rf /var/run/james.pid elif [ "$1" = "run" ] ; then shift $JAVACMD $JVM_OPTS \ $JVM_OPTS \ -Djava.security.policy=jar:file:$PHOENIX_HOME/bin/phoenix-loader.jar!/META-INF/java.policy \ $PHOENIX_JVM_OPTS \ -Dphoenix.home="$PHOENIX_HOME" \ -Djava.io.tmpdir="$PHOENIX_TMPDIR" \ -jar "$PHOENIX_HOME/bin/phoenix-loader.jar" $* "$@" else echo "Usage:" echo "james (start|run|stop)" echo " start - start james in the background" echo " run - start james in the foreground" echo " stop - stop james" exit 0 fi

james_daemon.sh의 작성이 끝났으면 실행모드로 바꾼다.

Console # chmod +x james_daemon.sh

/etc/rc.d/init.d/에 추가될 script은 다음과 같이 작성한다.

Console # cd /etc/rc.d/init.d/Console # vi james

james의 내용은 다음과 같다.

# /etc/rc.d/init.d/james#!/bin/sh## Startup script for James, the Jakarta Mail Server# chkconfig: 2345 95 15# description: James is a Mail Server# processname: james# pidfile: /var/run/james.pid# config: /opt/james/apps/james/conf/config.xml# logfiles: /opt/james/apps/james/logs## version 1.0 -## Source function library.. /etc/rc.d/init.d/functions#SET THE FOLLOWING LINE TO YOUR JAVA_HOMEexport JAVA_HOME=/usr/local/java#SET THE FOLLOWING LINE TO YOUR CORRECT JBOSS_HOMEexport JAMES_HOME=/usr/local/jamesexport PATH=$PATH:$JAMES_HOME/bin:$JAVA_HOME/bin:$JAVA_HOME/jre/bin#IF YOU NEED SPECIAL CLASSES IN YOUR CLASSPATH#AT STARTUP, ADD THEM TO YOUR CLASSPATH HERE#export CLASSPATH=RETVAL=0# See how we were called.case "$1" in start) cd $JAMES_HOME/bin echo -n "Starting james daemon: " daemon $JAMES_HOME/bin/james_daemon.sh start RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/james ;; stop) echo -n "Stopping james daemon: " killproc james RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/james ;; restart) echo -n "Restarting james daemon: " $0 stop sleep 2 $0 start ;; esac

james의 작성이 끝났으면 실행모드로 바꾸고 /etc/rc.d/rc3.d/와 /etc/rc.d/rc5.d/에 alias를 만든다.

Console # chmod +x jamesConsole # cd /etc/rc.d/rc3.d/Console # ln -s /etc/rc.d/init.d/james S99jamesConsole # cd /etc/rc.d/rc5.d/Console # ln -s /etc/rc.d/init.d/james S99james


 

TEST

Console # ./run.sh Using PHOENIX_HOME: /usr/local/jamesUsing PHOENIX_TMPDIR: /usr/local/james/tempUsing JAVA_HOME: /usr/local/javaRunning Phoenix: Phoenix 4.0.1James 2.1.3Remote Manager Service started plain:4555POP3 Service started plain:110SMTP Service started plain:25NNTP Service started plain:119Fetch POP DisabledJVM exiting abnormally. Shutting down Phoenix. ← CTRL + CConsole # /etc/rc.d/init.d/james start ← daemon script test..Starting james daemon: [ 확인 ]

위와 같이 정상적인 실행이 되었다면, Oracle sqlplus나 JBuilder Database Pilot을 통해 Repository를 확인해보면 MailBox/Spool/User에 대한 정보를 다음과 같이 볼 수 있다.

Console # sqlplus mail/mail@mailSQL*Plus: Release 9.2.0.1.0 - Production on Wed Aug 13 10:28:59 2003Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to:Oracle9i Enterprise Edition Release 9.2.0.1.0 - ProductionWith the Partitioning, OLAP and Oracle Data Mining optionsJServer Release 9.2.0.1.0 - ProductionSQL> select * from tab;TNAME TABTYPE CLUSTERID------------------------------ ------- ----------DEADLETTER TABLEINBOX TABLESPOOL TABLEUSERS TABLESQL> desc inbox Name Null? Type ----------------------------------------- -------- ---------------------------- MESSAGE_NAME NOT NULL VARCHAR2(200) REPOSITORY_NAME NOT NULL VARCHAR2(255) MESSAGE_STATE NOT NULL VARCHAR2(30) ERROR_MESSAGE VARCHAR2(200) SENDER VARCHAR2(255) RECIPIENTS NOT NULL VARCHAR2(1000) REMOTE_HOST NOT NULL VARCHAR2(100) REMOTE_ADDR NOT NULL VARCHAR2(20) MESSAGE_BODY NOT NULL LONG RAW LAST_UPDATED NOT NULL DATE SQL> desc users; Name Null? Type ----------------------------------------- -------- ---------------------------- USERNAME NOT NULL VARCHAR2(64) PWDHASH VARCHAR2(50) PWDALGORITHM VARCHAR2(20) USEFORWARDING NUMBER(38) FORWARDDESTINATION VARCHAR2(255) USEALIAS NUMBER(38) ALIAS VARCHAR2(255) * 출처: 야옹이 백작 (http://macspace.cnu.ac.kr/%7Earmateras/v3/favorites/Computer/Unix/james.html)
Posted by tornado
|

sendmail.cf 설정 파일중에


O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA


이런 부분이 있는데.. 여기서 Addr 부분이 127.0.0.1 이라서 그런다.


걍 지워버렸음.


메일 잘 들어온다.

Posted by tornado
|

트랙백 주소 : http://www.sir.co.kr/bbs/tb.php/pl_linux/171

 

http://linux.duke.edu/projects/yum/download.ptml

http://linux.duke.edu/projects/yum/download/2.0/ 에서

http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.8-1.noarch.rpm

를 다운로드 하여

rpm -Uvh yum-2.0.8.1.noarch.rpm

설치한 후


/etc/yum.conf 를 다음과 같이 수정합니다.

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest

[base]
name=Red Hat Linux $releasever base
baseurl=http://mirror.hostway.co.kr/redhat/$releasever/os/$basearch/

[updates]
name=Red Hat Linux $releasever updates
baseurl=http://mirror.hostway.co.kr/redhat/$releasever/updates/$basearch/




그리고

yum update

하면 자동으로 업데이트 합니다.

Posted by tornado
|
Posted by tornado
|

출처 : http://dreamnow.co.kr/tech/Log4.asp



   

 로그파일형식- IIS(Internet Information Server)


MS IIS ( Microsoft Internet Information Server )는 Windows NT에서 가장 많이 사용되는 웹서버 S/W로서 자체적으로 분석도구를 제공하고 있습니다.
로그파일형식은 NCSA 계열의 로그파일과는 다르며, 파일의 기록기간을 단위별로(일별, 월별) 설정할 수 있고, 이는 IIS 관리자에서 실행할 수 있습니다.
다음은 IIS 로그파일의 예입니다.
192.168.123.100, -, 00-06-13, 10:48:41, W3SVC1, VULCAN49, 192.168.123.254, 320, 331, 847, 200, 0, GET, /Default.htm, -,
이는 다음과 같은 사실을 기록하고 있습니다 : 192.168.123.100의 IP주소를 가진 일반사용자가 2000년6월13일 오전 10시 48분 41초에 이름이 VULCAN49이며 IP가 192.168.123.254인 서버에게 웹서비스를 요청하였습니다.
서비스는 320msec(약 0.32초)동안 진행되었고, 331바이트의 명령어를 사용하였으며, 그 결과 847바이트의 데이터를 에러 없이(200과 0코드) 사용자에게 전송하였습니다. 여기에 사용된 HTTP 명령어는 GET이었으며, 요청한 파일의 이름은 Default.htm입니다.

이와 같은 필드는 각각 다음과 같은 의미를 갖습니다.

필드이름 설명
Host CLF에서의 Host와 동일합니다.
AuthUser CLF에서의 AuthUser와 동일합니다.
Time 접속일자와 시간을 기록한 것으로 형식은 yy-mm-dd, hh:mm:ss입니다.
여기에서 yy는 연도, mm은 월, dd는 일, (년월일이 한 자리수인 경우 앞에 0을 동반합니다.) hh는 시, mm은 분 ss는 초를 가리킵니다.
Service 서버의 제공서비스 이름입니다. 웹서버의 경우는 W3SVC, FTP서버는 MSFTPSVC, Gopher는 GopherSvc라고 기록됩니다.
ServerName 서버의 이름입니다.
ServerIP 서버의 IP 주소입니다.
DownLoadTime 서비스를 제공하는데, 즉 파일을 전송하는데 걸린 시간으로 단위는 msec, 1/1000초입니다.
Receipt 웹브라우저로부터 수신한 바이트의 수량으로, 그 내용은 서비스 요청입니다.
Volume CLF에서의 Volume과 동일합니다.
Status CLF에서의 Status와 동일합니다.
WindowsNTStatus Windows NT 고유의 접속상태와 데이터 이동상태의 현황을 나타내는 것으로, 보통 0을 기록합니다.
Request CLF에서의 Request와 동일합니다.
Filename 실제 명령대상의 파일이름입니다.
Protocol 현재 사용중인 프로토콜의 이름과 버전 및 기타 시스템 정보입니다.

Posted by tornado
|
ssh brute-force 공격에 대한 설명과 대응 방법
Posted by tornado
|
운영체제: WindowsXP
윈도XP에는 '대체구성' 이라는 기능이 있습니다.
가정에서 사용하는 대부분의 초고속 인터넷 서비스의 경우,
자동으로 IP를 할당받아 인터넷을 사용할 수 있도록하는 유동IP로
서비스되고 있고, 학교나 회사에서는 특정(고정) IP 주소로 네트워크 환경을
셋팅하여 인터넷을 이용하는 전용회선을 사용한다면, 노트북 사용자의 경우
장소를 옮겨서 인터넷을 사용할 때마다 해당 장소의 인터넷 환경에 맞추어서
네트워크 구성을 바꿔줘야하는 불편함이 있습니다.
이때, 노트북의 운영체제를 윈도XP로 사용할 경우에는 '대체구성'기능을 이용해
두 곳의 장소가 변경될 때마다 설정을 바꾸지 않고 두 곳에서 바로 네트워크에
접속할 수 있습니다.
대체구성 설정 방법은 아래와 같은 순서대로 설정해 주시면 됩니다.
1. 내 컴퓨터’의 ‘제어판’에서 ‘네트워크 연결’을 선택한다.
2.‘로컬 영역 연결’에 커서를 놓고 마우스 오른쪽을 클릭한 뒤,
팝업 메뉴가 나오면 ‘속성’을 선택한다.
3. 프로토콜 항목에서 ‘인터넷 프로토콜(TCP/IP)’을 선택한 뒤 ‘속성’
버튼을 누른다.
4. 여기에서 ‘인터넷 프로토콜(TCP/IP) 등록 정보’ 창에서는 집에서 사용하는
유동IP 인터넷 환경을 설정해야 하므로 ‘자동으로 IP 주소 받기’를 선택한다.
5. 선택을 했으면 다시 옆 창의 ‘대체 구성’ 탭을 누른다.
6. ‘대체 구성’에서는 ‘사용자 구성’을 선택한 뒤, 회사 또는 학교에서 사용하는
고정IP 주소및 네트워크 환경 설정을 입력한다.
7. 모든 설정이 끝났으면 ‘확인’ 버튼을 눌러 창을 닫는다.
Posted by tornado
|

1. 관리자용 비밀번호를 아는경우 -------------
     관리자 아이디로 윈도우 로그인후 제어판에서 사용자관련 항목에서 비밀번호 변경

 

2. 두번째 관리자 비밀번호를 모르는경우 ------
     윈도우 안전모드(프롬프트)로 로그인하여 도스명령창에서
     c:\net user 비밀번호분실아이디 *
     이렇게 하면 비밀번호 재설정이 뜹니다

 

-------------------------------------------------------------------------------

 

administrator 계정의 암호를 알면 안전모드로 부팅하여

사용자 계정을 따로 하나 만들고 그걸로 사용하시면 되는데..

administrator 암호도 모른다면..포맷하는 방법밖엔 없습니다.

보통 xp 설치할때 administrator 계정 암호를 설정안하면 엔터치고 들어갈 수 있거든요..

일단 안전모드로 들어가서

[부팅할때 키보드 F8 키 눌러 안전모드 선택한다음 엔터쳐서 안전모드로 부팅]

로그인 화면에서 administrator 클릭하고 들어가면

제어판- 사용자 계정에서 새로운 사용자 추가 하시고..사용하면 되구요..

Posted by tornado
|

먼저 쓰던 컴퓨터(AMD 2500 , Ram 1GB) 는 누나 줘버리고

놋북으로 바꿨다.

그리고 베리텍 레이저 프린터는 몇 달전에 OKJSP 에서 salt 님한테 공짜로 받은거다.

 

 

근데.. 놋북에 프린터 포트가 없당.. USB 만 세개 있음.

테크노마트가서 프린터 포트를 USB 로 변환하는 젠더 하나 사와서 프린터 하는데,

헐~  안된당...

 

왜 안되나... 고민하다가, 프린터 공유 부분을 체크하고 다시 해봤다..

 

크헉.... 된다...

 

USB 출력이라서 프린터 공유를 해줘야 하는건지.. 참 이상하네..

저번 7월달에 산 캐논 프린터는 USB 인데두 공유 안해도 잘 출력 되던데,

 

그것 참 희한하네~~~

 

 

 
      
 
NETmate USB1.1 to 페러럴 변환기
프린터단자가 없을시 USB를 이용하여 프린터 사용가능.
제조원 : 강원전자
모델명 : KW-1284
판매가 : 15,000 원
 

 

이거 샀는데, 테크노 마트는 18,000 원에 팔고있음.. 

Posted by tornado
|

NO.1 (Digital Camera Enhancer)

디카로 어두운 곳에서 사물이나 인물을 찍으면 이미지가 뚜렷하지 않게 나온다.
심하면 점이 박혀있는 것처럼 거칠다. 이것 을 '노이즈' 현상이라고 한다.
디카의 LCD로 보면 노이즈를 알아보기 어렵지만 모니터에서는 바로 나타난다.
디씨 인핸서(DC Enhancer)는 노이즈를 없애는 프로그램이다.
특히 어두운 실내에서 찍을 때 생기는 노이즈를 부드럽게 바꾼다.
노이즈뿐만 아니라 화이트밸런스, 색조절도 한다.
노이즈가 있는 사진을 불러온 다음 밑에 있는 대화상자 막대를 움직이면 왼쪽 사진이 오른쪽에 있는 사진으로 바뀐다.
미리보기가 되기 때문에 맘껏 조절해보고 좋은 사진을 골라 저장한다.


NO.2 (ColorCastFX)

디카의 단골 사진은 하늘이다. 시원한 하늘을 디카로 찍었다.
"어? 왜 이렇게 틀리지?" 하늘이 칙칙해 보인다. 어두운 부분은 더 그렇다.
디카로 하늘을 찍으면 이런 일이 자주 일어난다. 카메라 회사에 따라 차이가 심하다.
같은 회사의 제품은 그나마 비슷하 게 나온다.
이땐 컬러캐스트 에프엑스(ColorCast FX) 프로그램을 써서 자연스럽게 만들자.
왼쪽 밑에 있는 프리셋에서 내가 가 지고 있는 디카를 선택한다.
오른쪽 사진이 원래색으로 나올 때까지 ColorCast Fix 막대를 움직인다.


NO.3 (CleanSkinFX)

클린스킨은 거친 피부를 부드러운 피부로 바꾸는 프로그램이다.
클릭 한번으로 기미, 주근깨, 잡티가 없는 피부 미인으로 다시 태어난다.
디카로 인물을 찍으면 땀구멍까지 선명하게 나온다.
사진이 잘 나오는 것까지는 좋은데 너무 선명하면 화를 내는 사람 도 생긴다.
특히 피부를 생명처럼 여기는 여자친구는 더욱! 클린스킨은 이런 경우 쓰기 딱 좋다.
왼쪽이 원본이고 오른쪽은 효과 를 준 사진이다.
200만 화소의 이미지에서 효과가 나오는데 약 2분 정도 걸린다.
조금 느린 편이지만 결과는 확실하다.
프로그램 을 쓰기 전에 ColorCast FX를 쓰면 더 좋다.
대화상자에 있는 Enhance Pink에 체크하면 생기있는 피부색을 얻는다.


NO.4 (HotPixels Eliminator)
 
디카로 밤하늘을 찍으면 별은 아닌데 이상한 점이 나온다.
셔터속도를 길게해서 찍으면 점이 더 많다. 이게 바로 CCD 노이즈다.
CCD 노이즈는 빛을 받아들이는 CCD의 한계 때문에 나타나는데 요즘 나오는 디카는 'Low Noise' 기능과 CMYK 방식으로 빛을 읽어 (일반적으로 RGB 방식으로 읽는다)노이즈를 줄였다고 하지만 가끔씩 나타난다.
 이럴때 핫픽셀을 쓰면 걱정할 것 없다.
핫픽셀은 검은 하늘에서 보이는 하얀점을 눈깜짝할 사이에 없앤다.
밑에 있는 'Dark Night Shots' 체크창은 파란색 노이즈를 없애는데 좋다.


NO.5 (BlackFrame NR)

블랙프레임은 핫픽셀처럼 노이즈를 없애는 프로그램이지만 방식이 좀 다르다.
노이즈가 있는 사진에 까만색 종이를 한장 덧대 어 구멍난 것처럼 보이는 노이즈를 메꾸는 방식이다.
원본 사진을 찍는다. 그리고 카메라 뚜껑을 닫고 다시 찍는다.
원본 사진과 뚜껑을 닫고 찍은 사진을 프로그램에서 작업한다.
과정은 좀 복잡하지만 노이즈를 없애는 방식중에서 효과가 최고다. 


NO.6 (FilterSIM)

동틀 무렵 사진을 찍으면 사진이 파랗게 나온다.
반대로 해질녘에 사진이 노랗다.
우리 눈에는 아침, 낮, 해질 무렵의 빛이 모두 같아 보인다.
하지만 빛은 고유의 색온도가 있다. 색온도에 따라 사진이 다르게 나온다.
디카는 색온도를 화이트밸런스에서 맞출 수 있다.
형광등 아이콘, 텅스텐 아이콘, 태양 아이콘에 각각 맞춰 고르면 사진이 잘 나온다.
일일이 빛에 맞게 아이콘을 바꾸기 귀찮다면 오토 화이트밸런스에 맞추고 찍는다.
 필터 심(Filter SIM)은 필름 카메라에서 이용하는 필터에서 아이디어를 얻은 제품이다.
필름카메라에서 색온도를 맞추려면 렌즈 앞에 필터를 댄다.
필름 카메라에서 색온도를 정확히 맞추려면 몇십장의 필터도 모자란다.
값은 한 장에 2~3만원 정도로 만만치 않다.
하지만 필터 심 프로그램은 코닥에서 나오는 90여개의 필터가 들어 있는 공짜 프로그램이다.
 쉽게 여러 효과를 연출할 수 있다. 특히 사진 색깔을 바꿀 때 그만이다.
프로그램에 있는 필터 번호는 모두 시중에서 파는 코닥 필터의 번호와 같다.


NO.7 (B/Works)

컬러사진을 흑백으로 만드는 방법은 많다.
모니터의 RGB 단계를 그레이스케일로 바꾸면 된다.
웬만한 프로그램에는 다 있다. 비웍스(B/Works)는 사진을 단순히 흑백으로 바꾸는 프로그램이 아니다.
사진을 갈색으로 바꾸고 구름을 더욱 짙게 만든다.
하늘 이 마치 그을린 것 같은 효과를 낼 수 있다.
여러가지 효과를 주려면 대화상자를 열어 필터를 선택한다. 필터의 개수는 모두 16 개.
그 중에는 노이즈를 일부러 만드는 필터도 있다.  
밝고 어두운 차이가 많이 나는 사진을 골라 작업하는 게 좋다.
그래야 사진이 드라마틱하게 나온다.


NO.8 (RGB Lights)


광고 사진 작가의 작품을 보면 이걸 어떻게 찍었을까 궁금해진다.
무척 어려울 것 같다.
디카와 RGB 라이트 프로그램 하나로 분 위기 있는 사진에 도전해 보자.
전문 사진가도 부럽지 않은 나만의 사진이 나온다.
RGB 라이트를 쓰려면 똑같은 사진이 3장 필요하다.
3장의 사진을 찍을 땐 디카의 제품의 자리가 움직이지 않도록 한다.
조명은 집에 있는 스탠드 하나면 된다.
조명 위치만 바뀌 사진을 찍고 RGB 라이트를 열어 처음에 찍은 사진을 불러온다.
그림자의 위치를 보고 2번과 3번 순서를 정한 다.
3장의 사진은 붉은색, 녹색, 파란색으로 바뀐다.
색과 그림자의 위치가 마음에 들지 않으면 아래에 있는 Swap 버튼을 눌러 바꾼다.
오른쪽 밑에 있는 Make 버튼을 누르면 끝.


NO.9 (Oscar's JPEG Thumb-Maker)

JPEG 섬 메이커(JPEG Thumb-Maker)는 '발품' 팔아 찍은 사진을 리사이즈하려고
다시 고생하는 디카족에게 딱 좋은 프로그 램이다.
폴더 안에 있는 사진을 한꺼번에 리사이즈하는 프로그램이다.
사진 크기를 정해주면 프로그램이 알아서 다 바꿔준다.
단 순히 크기만 바꾸지 않는다.
옵션 상자를 체크하면 JPEG 압축률, 이미지를 선명하게 하는 샤픈(Sharpen), 자동 밝기 조절도 한 꺼번에 한다.
사진을 한꺼번에 바꾸는 기능은 최고다. 비슷비슷한 사진을 바꿀 때 쓰면 좋다.


NO.10 (Oscar's File Renamer)

100장이나 되는 사진의 이름을 바꾸려면 시간이 얼마나 걸릴까?
보통 오른쪽 마우스 버튼 → 이름바꾸기 → 키보드로 이름을 적는다.
잘하는 사람은 파일을 선택하고 F2키를 눌러 이름을 바꾼다.
한꺼번에 바꿀 수 없을까?
파일 리네이머는 텍스트 에디터처 럼 사진 파일 이름을 순식간에 바꾼다.
먼저 파일 이름을 바꿀 폴더를 선택한다.
리네이머 왼쪽창은 원래 파일 이름이고 오른쪽 창 파일 이름은 바뀔 파일 이름이다.
제조사마다 디카로 찍은 사진에는 고유의 파일이름이 있다.
예를 들면 후지는 DSCF XXXX. 산요는 Sany XXXX 라고 표시된다.
이처럼 파일 이름이 반복되기 때문에 편하게 관리하려면 각각 다른 이름으로 바꾸는 것이 좋다.
리네이머에서 제일 눈에 띄 는 것은 매크로 기능이다.
이것은 사용자가 파일명을 바꾸는 과정을 저장한다.
저장한 매크로는 필요할 때 불러와서 다시 쓸 수 있다. 

Posted by tornado
|

http://spamassassin.apache.org/

 

오케... 윈도그 2003 서버에 깔아서 테스트 해봐야겠다..

 

Posted by tornado
|
질문: 차량용 VCD굽는법좀 알켜주세요...4985068 / 2004-06-28 02:02
차에서 영화를 보려구 하는데...잘안되네요^^
자세하게 VCD굽는법좀 알켜주세요...
답변: re: 차량용 VCD굽는법좀 알켜주세요...attack0 / 2004-06-16 21:53
   네로버닝롬6 - 비디오 CD 만들기   안녕하세요 이번 강좌에서는 네로버닝롬6을 이용한 동영상 파일을 비디오CD로 만들기에 대해 알아보도록 하겠습니다. 가정집에 보면 보통 오디오(전축?)...


 

 네로버닝롬6 - 비디오 CD 만들기

 

안녕하세요 이번 강좌에서는 네로버닝롬6을 이용한 동영상 파일을 비디오CD로 만들기에 대해 알아보도록 하겠습니다. 가정집에 보면 보통 오디오(전축?)의 기능중에 비디오시디 플레이가 가능한 기기들이 대부분일 것입니다. 네로를 이용하여 동영상을 비디오 시디로 만들어 놓으면 사용하기 편리하겠죠.

자 그럼 시작해 볼까요.

 

   

네로 스타트 스마트에 사진과 비디오에 보시면 비디오 CD만들기라는 ?이 보일 것입니다. 클릭하여 주세요.

   

클릭 하시면 내 비디오CD라는 창이 뜹니다. 그럼 추가 버튼으로 비디오 시디에 들어갈 동영상 파일을 추가 하셔야 합니다.

   

자 필자는 DTS_TESTMOVIE.AVI 파일을 추가하려 합니다. 추가 버튼을 눌러 주시면 됩니다.

   

그럼 파일 분석중이라는 창이 뜰 것입니다. 이부분도 동영상 파일 용량에 따라 분석 되는 시간이 달라집니다. 그럼 다음으로 넘어 갑니다.

    레이아웃 설정 부분입니다. 배치 부분인데 머리/바닥의 줄을 삭제 하느냐 마느냐 하는 부분인데 신경쓸 부분 아닙니다.

    디폴트 값은 지금 체크되어 있는 값입니다. 이것도 디폴트로 나두시면 됩니다.

    배경을 설정하는 옵션입니다. 배경화면을 넣을 수도 있고 배경의 색을 바꾸어 줄 수도 있습니다. 배경모드도 맞춰줄 수 있구요.

   문자를 설정하는 ?.

   

이제 다 설정을 하였다면 다음 버튼을 눌러 주세요.

   

그럼 레코더기를 선택하시고 디스크명을 써 주신다음 굽기 버튼을 눌러 주시면 됩니다. 그럼 인코딩 작업에 들어갑니다.

   

인코딩 작업입니다. 흐.... 이작업은 동영상 파일의 크기와 시스템의 사양에 따라 무쟈게 시간이 걸립니다. 그러므로 딴짓으로 시간을 때우시길....... 이 작업이 끝나면 곧바로 레코딩 작업으로 넘어 갑니다.

   

레코딩 작업중. 레코딩 작업이 끝나면 작업 OVER.

   

자 레코딩 작업이 끝났습니다. 다음 버튼을 눌러주세요.

   

그럼 RW의 트레이가 열리면서 끝내기 버튼을 눌러 주시면 됩니다. 자 그럼 재대로 구워졌는지 탐색기로 확인을 할까요.

   

잘 구워졌습니다. 마지막으로 동영상으로 마무리를 지을까 합니다.. 수고하셨습

니다.
내용출처 : 피디박스..홍성철 (misokuk@hotmail.com)님이 작성해주신 글펌입니다.
Posted by tornado
|

Nero Burning ROM v6.0.0.23(오버버닝 레코딩 하기)

 

데이터 백업을 자주 하다보면 약간의 용량 초과로 인해 한 장의 시디에 데이터를 모두 넣을

수 없는 경우가 생긴다.  예를 들어 700메가나 650메가 CD에  용량을 초과하는 데이터를 

레코딩 해야 하는 경우, 혹은 800메가 CD에 700메가 이상의 데이터를 레코딩 해야할 때도

오버버닝(Over Burning)을 해야 한다. 물론 네로 버닝롬을 사용하면 700메가를 약간 초과하는

경우에는 별도의 설정조정 없이도 오버 버닝(Over Burning)이 가능하다. 하지만 용량이 10메가 이상 초과되어 오버버닝을 자동으로 처리하지 못할 경우에는 옵션 설정을 변경해 주어야 한다.  


그러나 항상 염두해야 할 점이 있다. 오버버닝은 아주 유용하게 사용되는 기능이지만, 역시 한계점과 단점은 존재한다는 점이다. 시디 공간 활용적인 장점도 있지만,  인식에 문제가 생기거나

에러가 발생할 확률이 높다.

 

여기서는 윈도우XP 운영체제 상에서의 Nero Burning Rom v6.0.0.23을 예로 설명하지만

다른 조건이라 하더라도 그 방식은 대동소이 하므로 참고 하기를 바란다.





간혹  CD-RW가 오버버닝을 지원하지 않는 경우가 있으므로 먼저 자신의 레코더가 오버버닝을

지원하는지 알아봐야 한다.

메뉴에서 레코더 | 레코더 선택통해서 간단하게 확인이 가능하다.




레코더 메뉴를 선택하면 빨간네모부분이 오버버닝의 지원 여부를 알려준다.
여기서 지원이 안된다고 나오면 오버버닝은 불가능하다.
참고로 부가적인 정보도 알려준다. (펌웨어 버전, CD Text 지원여부 등)




우선 네로버닝롬을 실행 시킨후에 파일 | 기본 설정 을 선택한다.
고급 기능선택한 후
디스크 기록 단위 오버버닝 레코딩을 활성화(아래 사항을 읽으십시오)
체크하고 밑에 있는 CD 최대 길이에 시간을 입력한다.
이는 입력시간까지 오버버닝을 허용하겠다는 의미다.
870메가 이상의 시디를 구울 때를 대비해서 99분 정도로 입력한다.




위의 설정은 한번만 해주면 계속 유지된다.
(버젼 업데이트 시 경우에 따라 재설정 필요함)

이제 700메가 이상의 시디를 구워보자.




레코딩 편집 창의 멀티세션 탭에서
멀티세션이 아님을 선택한다.




이번에는 굽기 탭에서 레코딩 방법
디스크 단위 기록 으로 해야만 한다.




그리고 굽기 버튼을 누르면 오버버닝 경고 메시지가 나온다.
과감하게 오버버닝 CD 쓰기 를 누르자.




다음에 오버버닝을 할때에는 멀티세션이 아님
디스크 단위 기록만 선택해주면 된다.

굽기 성공 후에 꼭 시디롬에 넣어서 이상이 없는지 확인하기 바란다.
왜냐하면 오버버닝을 하면 시디의 인식문제가 발생할 수 있기 때문이다..

역시 800메가 이상의 시디도 무조건 이와 같은 오버버닝으로 구워야 한다.
참고로 왠만한 시디레코더는 오버버닝이 지원되며
왠만한 공시디는10~20메가 정도는 오버버닝이 가능하다.
어떤 시디는 30메가 이상 오버버닝되는 경우도 있다.


안정적인 레코딩을 위해서는 저배속으로 구워야 한다.

Posted by tornado
|

피싱 사이트 -.-

OS/LINUX 2005. 9. 22. 16:31

회사 네임서버가 레드햇 리눅스 9 이다.

네임서버에는 hosts.allow, hosts.deny 가 걸려 있고,

iptables 에서 몇몇 포트(53번, 22번 등)을 뺀 나머지는 다 걸러내구 있다.


흠.. 그런데.. 22번 포트가 문제였다.

이 구멍을 통해 우리 네임서버가 fising site 가 되 버렸다 ㅡㅡ;


/usr/include 디렉토리에 보니 못보던 파일들이 있다.

log.h 라는게 뭐지? 열어봤더니,

ssh 를 통해 들어온 계정들의 패스워드가 죄다 적혀있다.

허걱...


허미.. 잽싸게 다른 서버에 Linux 설치하고, 원래 서버 복구에 들어갔다.

그리고 새로 설치한 리눅스 서버에 iptables 로 C 클래스 중 울 회사 IP 대역만 열어놓구

시스템을 켰다..


음.. 다시 외부에서 들어온 흔적이 보인다..

/dev 디렉토리에 작업하네 ㅡㅡ;

범인은 회사내의 Informix 서버였다. MS-SQL 쓰니까.. 내버려 두고 있었더니, 이곳이 활동무대가 된듯 하다..

그래서 그 서버죽이고, ssh 도 죽이고 서버 다시 시작하니 잘 된다.


좀 써보다가 또 뚫으려고 하는 시도가 보이거나, 뚫렸을 때는 할수 없이

방화벽을 앞단에 세우고, 브릿지로 연결해서 쓰던지 해야겄다...


정말 골때리는거는... 아파치가 설치되어있으니까, 거기에 PHP 깔고... 서비스를 하더라는것이다.

대단한 넘들.....

Posted by tornado
|

***********************
아파치 가상호스트 설정하기
작성자 : 유희성
***********************


가상호스트란 하나의 IP 상에 여러개의 가짜 도메인을 구성하는 것이다.
이것은 아파치의 VirtualHost 라는 기능을 이용하는것인데 상당히 유용하다
도메인을 신청하면 www.yadong.com 이라는 형식으로 나오게 되는데
우리가 임의대로 2차도메인을 지정하고 그 이름이 들어왔을때 네임서버에서 일단
1차 도메인 쪽으로 연결을 시켜줍니다. 그리고 이것을 다시 아파치에서 받아들입니다.
이때 아파치에 설정되어있는 VirtualHost 부분에 설정되어있는 곳의 public_html
디렉토리를 연결시켜 주게 됩니다. 이런 방식으로 동작을 하기 때문에 각각의 사용자마다
2차 도메인을 가질수 있게 됩니다.

먼저 가상호스트를 만들기 위해 준비를 합니다.
네임서버가 잘 작동을 하는지 먼저 테스트 합니다.

nslookup 자기호스트.com 이라고 쳐서 잘 나오는지 확인합니다

잘 나왔다면 이제 네임서버 설정을 아주 약간만 고쳐줍니다. 먼저 /var/named/*.zone 파일을 고쳐줍니다.

vi /var/named/*.zone <--- 여러분은 yadong.com 이니까 yadong 을 써주면 되겠군요.

그럼 제일 아랫줄에 다음 라인을 추가 합니다.

first IN CNAME 211.108.242.host

위의 라인은 first.yadong.com 이라는 주소를 치고 들어왔을때 CNAME 클래스(CANONICAL NAME)를 이용하여
연결된 2차 도메인을 1차 도메인쪽으로 연결시켜 주는 부분입니다.
물론 A 클래스로 이용하여도 동작은 잘 됩니다.

이제 네임서버데몬 스크립트를 다시 restart 시킵니다.

/etc/rc.d/init.d/named restart

nslookup first.yadong.com 이라고 쳐서 cname 어짜고 저짜고 떴으면 된것입니다.
만약 안뜬다면 1차 네임서버 설정에 문제가 있을수도 있겠군요.

여기까지 잘 되었다면 이제 아파치를 설정합니다.

cd /usr/local/apache/conf
vi httpd.conf

이렇게 아파치 설정파일을 열고 줄 번호를 넣고 봅니다. set nu 하시면 됩니다.

#NameVirtualHost * <=== 약 970번 줄 근처에 있습니다.

이 부분의 주석을 풀어주고 뒤의 별표(*) 부분을 삭제한 후 자신의 아이피를 넣어줍니다.

그리고 아랫쪽에 보시면 VirtualHost 의 사용법에 대한 sample 이 있을것입니다.
이부분을 고치시는게 아니고 이걸 보고 아랫쪽에 새로 입력하여 작성합니다.

#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

위와 같은 형식의 문장이 있습니다.
<VirtualHost *> <=== 가상호스트의 시작을 알리는 태그.
뒤의 별표는 삭제하고 자신의 호스트 주소를 적어줍니다.
211.108.242.host
ServerAdmin <=== 가상호스트 운영자의 메일주소가 들어갑니다.
DocumentRoot <=== HTML 문서나 PHP 문서가 위치하게될 디렉토리를 지정합니다.
ServerName <=== 자신의 가상호스트 이름을 적어줍니다.
ErrorLog <=== 호스트를 운영하게 되면 각종 Log 파일들이 쌓이게 되는데
가상 호스트 마다 log 를 지정해 주지 않으면 apache 기본 log 파일에
쌓이게 됩니다. 그럼 나중에 log 분석하기도 힘들게 될뿐더러 관리도
힘들어 지게 됩니다. 이곳에 Log 파일의 경로와 사용할 log 파일의
이름을 적어줍니다.
여기는 error log 에 관련된 거겠지요?? 거기에 걸맞는 이름을 적어줍시다.
CustomLog <=== 이곳은 위와 동일합니다. 성공적으로 아파치에 접속이 되었을 경우에
나타나는 로그들이 이곳에 저장됩니다. 경로와 파일을 적어줍시다.
</VirtualHost> <=== 가상호스트의 종료부분 태그.

위의 문장대로 제일 아랫줄에 가상 호스트 부분을 추가해 줍니다.

<VirtualHost 211.108.242.30>
ServerName www.kcr.pe.kr
</VirtualHost>
<VirtualHost 211.108.242.30>
ServerAdmin tornado@kcr.pe.kr
ServerName tornado.kcr.pe.kr
DocumentRoot /home/tornado/public_tornado/
UserDir /home/tornado/public_tornado/
CustomLog logs/apache.tornado.com-access_log common
ErrorLog logs/apache.tornado.com_error_log
</VirtualHost>

위 예제는 학원의 30번 PC 에서 현재 잘 가동이 되고 있는 서버의 상태입니다.
처음 가상호스트 부분을 보시면 위쪽에 설명 되어있는 부분과 상이한 부분이 있습니다.
이곳은 root 사용자의 홈페이지를 가상호스트로 정해준 부분입니다.
그러니까 www.kcr.com 이라고 치고 들어왔을때 보여주는 경로인 셈입니다.
로그 파일은 기본 로그파일을 사용하기 때문에 별도의 로그파일은 지정해 주지 않았습니다.

가상 호스트 부분에서는 public_html 이라는 디렉토리를 사용하지 않습니다.
public_2차도메인이름 이라는 형식을 사용합니다.
왜냐하면 각각의 디렉토리마다 public_html 을 사용하게 되면 이름도 헷갈릴뿐더러
작동하는데 문제가 생길수 있습니다.
aaa.yadong.com 을 치고 들어갔는데
bbb.yadong.com 의 public_html 디렉토리의 문서를 보여줄 상황도 발생 할 수 있기 때문입니다.


<VirtualHost 211.108.242.30>
ServerAdmin tornado@kcr.pe.kr
ServerName tornado.kcr.pe.kr
DocumentRoot /home/tornado/public_tornado/
UserDir /home/tornado/public_tornado/
CustomLog logs/apache.tornado.com-access_log common
ErrorLog logs/apache.tornado.com_error_log
</VirtualHost>

위의 부분이 정말 가상호스트 부분입니다.

ServerName 부분을 보시면 tornado.kcr.pe.kr 이라고 되어있습니다.
여기서 tornado 라는 2차 도메인은 네임서버의 *.zone 파일에 CNAME 클래스로 지정되어있습니다.

여러분이 웹브라우져에서 tornado.kcr.pe.kr 이라고 치고 들어오셨을때 네임서버에서
일단 CNAME 으로 걸러줍니다. 그리고 다시 아파치의 가상 호스트 부분으로 들어가게 됩니다.
이때 VirtualHost 부분에 해당 호스트의 설정이 작성되어있다면 작성된 설정의
DocumentRoot 부분의 디렉토리로 이동하여 해당 문서(index.html 등등)를 보여주게 됩니다.

여기까지 하셨다면 apache데몬을 다시 시작합니다.

/usr/local/apache/bin/apachectl stop
/usr/local/apache/bin/apachectl start

이때 에러가 없어야 합니다.
이제 각 디렉토리들을 작성해 주셔야 합니다.
user를 등록합니다.


useradd tornado
passwd tornado
적당한 패스워드 입력

이제 home 디렉토리로 이동합니다.

cd /home
cd tornado
mkdir public_tornado
cd public_tornado

vi index.html
여기는 tornado 의 메인 페이지 입니다.

저장하고 종료

chmod 755 -r ~tornado

위와 동일한 방법으로 각각의 가상호스트 마다 설정을 하여 줍니다.

웹브라우져를 실행한 후에 지정한 2차 도메인으로 접속하여 봅니다.
문서가 제대로 보인다면 제대로 성공하신 것입니다.


*******************************
아파치 가상호스트 2
작성자 : 유희성
*******************************

우리는 지난 시간에 2차 도메인을 이용한 가상 호스트 설정을 하였습니다.
이번에 할 것은 같은 아이피에 1차 도메인을 두개 이상 연결시켜서 가상 호스트를 잡아주는 방법입니다.

작동 방식은 먼저 시간에 설명드린 것과 거의 비슷합니다.
그러나 네임서버 설정이 약간 다릅니다.
먼저 시간에 했던 방식은 aaa.yadong.com 으로 들어왔을때 yadong.com 으로 연결시켜주고
아파치 가상 호스트부분에서 치고 들어온 도메인으로 연결시켜주는 방법이였습니다.

이번에 설정은 named.conf 에 새로운 zone 영역을 등록시키고 /var/named 디렉토리에
새로운 zone 영역 파일을 만들어주는 방식입니다.
이때 reverse 영역은 새로 작성하지 않습니다. 어차피 한 IP를 가지고 사용하는 것이기 때문에
새로 작성한다는 것은 의미가 없습니다.

지금 하는것과 같이 같은 아이피에 등록시켜줘도 전혀 문제는 없습니다.
만약 한대의 피시에 여러개의 랜카드가 꼽혀 있고 각각의 아이피가 부여되어있는 상태라면
각각의 아이피 마다 도메인을 부여하여 아파치 설정을 통해 가상호스트 운영을 할수 있습니다.
또 하나의 랜카드에 가상 IP 를 부여하여(Aliase) 가짜 호스트를 마치 진짜 처럼 운영할수도 있습니다.

그럼 설정파일부터 보겠습니다.

vi /etc/named.conf 파일을 열어서
zone 영역을 하나 더 만들어줍니다.

zone "aaa.com" IN {
type master;
file "aaa.zone";
};

위와 같이 추가하시고 저장후 빠져나옵니다.

위의 설정에서 파일을 지정했기 때문에 /var/named 디렉토리에 해당 파일을 만들어 주어야 합니다.
파일은 기존의 설정을 복사하여 사용합니다.

cd /var/named
cp yadong.zone aaa.zone
vi aaa.zone

$TTL 86400
@ IN SOA ns.aaa.com. root.aaa.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns.aaa.com.
IN MX 10 mail.aaa.com.
IN A 211.108.242.30
ns IN A 211.108.242.30
www IN A 211.108.242.30


위와 같은 설정이 되겠군요. 저장하고 빠져나옵니다.

네임서버를 다시 가동합니다.
/etc/rc.d/init.d/named restart

nslookup aaa.com 이라고 치셔서 응답이 제대로 나와야 합니다.
안나온다면 다시 설정을 천천히 살펴봅니다.

위와 같이 설정한 후에 아파치 virtualHost 부분은 기존 VirtualHost 설정 부분처럼 합니다.
다 하셨으면 apache데몬을 다시 시작하시고 브라우져에서 각각의 주소를 쳐봅니다.
그래서 각각의 호스트 디렉토리에 있는 파일내용이 보이면 성공입니다.


------------------------

예전에 학원에서 배운 내용인데.. 이제야 자료를 찾았습니다 ^^;

근데 예로 든 주소가 다 왜 이 모양인지 ;;

Posted by tornado
|

*********************
네임서버
작성자 : 유희성
*********************


Domain 이란 숫자화된 인터넷 주소인 IP주소를 대신하는 문자화된 별칭이다.
우리는 사이트에 접속을 할 때 http://www.yahoo.co.kr 이라고 입력하고 접속을 하게 된다.
여기서 www.yahoo.co.kr 을 도메인이라고 부르며 이것이 IP주소를 대신하는 인터넷주소이다.
위와 같이 도메인을 입력하게 되면 컴퓨터는 알아듣지 못하게 된다. 이렇게 입력된 도메인을
컴퓨터가 알아들을 수 있는 숫자형태로 바꾸어줘야 하는데 이 작업을 해주는 것이 DNS Server 이다.

도메인 이름 규격은 각 나라마다 약간씩 설정이 틀리지만
(음.. 한글도메인은 어케 되는지 저도 멀라영... 좀 알려줘여ㅡ,.ㅡ)
대부분 영문자와 숫자, 그리고 하이픈(-) 의 조합으로 사용되고 대소문자는 구별되지 않는다.
이름의 길이는 2글자에서 최대 63자까지 허용된다.
도메인 이름에는 콤마(,)나 언더바(_)등 기호를 사용하지 못한다.
그리고 도메인 이름은 전 세계에서 유일하여야 한다.

도메인 이름체계

이름체계는 Tree 구조로 이루어져있다.
제일 위에는 루트(ROOT) 도메인을 기준으로 3단계의 기본적인 단계로 구성된다.
루트 도메인이란 쩜! (.) 을 이야기 한다.
http://www.yahoo.co.kr. <== 요기처럼 kr 다음에 쩜(.) 이 하나 붙는데 이것을 루트 도메인이라고
한다. 이 루트 도메인 다음에 온 kr 이나 net, com, org 등등.. 이 1차 도메인이다.
이것은 우리가 임의로 정하는 것이 아니고 이것을 관리하는 INTERNIC 에 등록이 되어있는 것을 우리는
가져다가 쓰게 되는 것이다.

여기서 1차 도메인도 최상위 도메인과 국가도메인으로 나뉘어 지게 된다.
최상위 도메인이란 org, net, com, edu, gov, 등등이 되고, kr, jp. fr 등등 각 나라의
국가 도메인이 된다.
위의 www.yahoo.co.kr. 을 보면 처음 루트도메인 다음에 1차도메인 KR 이 오게 되었다.
그 다음에 존재하는 co 라는 부분이 2차 도메인에 해당된다.

2차 도메인은 사용자가 원하는 이름을 신청해서 사용할 수 있다. 하지만 kr이나 jp 등등의 국가도메인이
1차 도메인이 오면 국가에서 기관을 분류시키기 위해 미리 정의된 이름을 사용하기 때문에 이럴 경우에는
사용자가 직접 2차 도메인 이름을 지정하여 사용할 수 없다.
Oracle.com 같은 사이트는 최상위 도메인으로 이미 정해져 있는 것을 사용하였기 때문에 2차 도메인으로
oracle 이라는 이름을 지정하여 사용하였다… 유가릿??

3단계 도메인은 하위 도메인이라고 하며 우리가 만들고자 하는 yadong.pe.kr 같은 사이트에서
yadong 같은 녀석이 3차 도메인이 되게 된다. 왜 3차 인지 이해가 안되면 벽보고 반성한다.

자… 이렇게 도메인이 이루어졌다는 것을 알았다. 그럼 네임서버는 어떤 역할을 해주는 것일까…
네임서버는 위에서 말한 도메인 이름을 ip 주소로 바꾸어 주는 기능을 해준다.
반대로 ip 주소를 도메인 이름으로 바꿔주는 역할도 한다.

그럼 어떻게 작동 할까… (칠판에 그림참조)

일단 내가 브라우져에서 www.yahoo.com 이라고 입력을 한다.
그러면 이것은 네임서버로 질의를 보내게 된다. 만약 ADSL 이라면 인터넷공급회사에서 자동으로 네임서버가
지정이 되어있을 것이다.

일단 네임서버로 질의를 하게 되는데… 여기에는 당근 yahoo.com 의 정보가 없다.
그럼 로컬네임서버는 루트네임서버(.) 로 질의를 요청하게 된다.
그런데…. 루트 네임서버에서도 com 이라는 1차 도메인을 모르겠다고 하고… 질의를 com 네임서버를 참조하라고 한다.
그럼 다시 질의는 com 네임서버로 가게 된다… 여기서 열라 뒤진다. 이때 yahoo.com 이 정확하게 인터닉에 등록이
되어있는 도메인이라면 여기서 yahoo.com 의 아이피 주소를 우리가 맨 처음 질의한 로컬 네임서버에 알려주게 된다.
이렇게 알게된 IP 주소를 최종적으로 우리에게 알려주게 된다.
그런데 여기서… 맨 처음 질의를 할 때 ROOT 도메인부터 찾는다고 하였는데, 이때 제일 처음부터 찾으려면 서버는
쌩 노가다를 하게 된다. 그래서 CACHE 파일을 제공하여 주는데 /var/named/named.ca 라는 파일이다.
버전마다 약간 이름이 틀리다.

이 파일은 우리가 작성하는 것이 아니라 인터닉에서 제공을 하여 준다.
이 파일이 없다면 다른 PC 에서 복사를 하던지 인터닉에 접속해서 다운을 받던지 한다. 절대 수정금지..


/////////////////////
설 정 하 기
/////////////////////

네임서버를 구동하기 위해서는 bind 라는 패키지가 필요하다. 이 패키지는 웬만한 배포판에는 기본으로 들어있다.
현재 사용되는 버전은 bind8 과 bind9 이다.그럼 깔려있는지 살펴보자..

rpm -qa | grep bind <=== 라고 입력을 해서 뭐가 있으면 깔려있는 것이다.

거의 대부분 전체설치를 하기 때문에 자동으로 깔린다… 만약 없다면 linux cd 넣고 다시 깐다.
위치는 RedHat/RPMS 에 존재한다… source 로 깔고 싶다면 www.isc.org 에서 받던지 국내 Linux site 를 뒤져본다…


*********************
Bind 소스로 설치하기.
*********************

일단 RPM 패키지로 설치되어있는 bind 를 제거하여야 한다.
rpm -qa | grep bind 라고 쳐서 뭐가 나오면 지운다.

rpm -e 나온 패키지이름 <== 지운다.

이렇게 지운다음에 다운로드 받은 소스파일을 압축을 푼다.
/tmp/tar xvzf bind-9.2.0.tar.gz 라고 쳐서 압축을 푼다.
그리고 압축 풀린 디렉토리로 들어간다.

./configure -with-opens니
make; make install;
이렇게 설치가 되면 /usr/local/bind 디렉토리에 라이브러리 파일이 생성되고 바이너리 파일은
/usr/sbin 디렉토리에 생성된다.
설치 끝.

네임서버의 유형은 크게 세가지로 나뉘어진다.

1. primary name server : 1차 네임서버
2. secondary name server : 2차 네임서버
3. caching only server : 캐시 서버.

1차 네임서버는 당근 필수적이다. 2차 네임서버는 1차 네임서버에 주기적으로 접속하여 백업본을 유지한다.
일반적으로 2차 도메인은 1차 도메인이 다운되었거나 기타 다른 문제가 발생되었을 경우를 대비하여 같은
네트워크에 두지 않는다. 만일 같은 네트웍에 존재한다면 1차 네트웍이 죽으면 2차 네임서버도 작동을 안하게
될것이다. 그럼 뭐하러 2차를 만들어…

캐쉬 서버는 local DNS 에 접속하기 곤란한 상태에 있을 때 효과적으로 운영된다.
원거리에 위치한 같은 도메인을 사용하는 네트워크에 대해서 LOCAL DNS 를 시용하면 약간의 NETWORK DELAY가
발생하게 되므로 좋지 않은 상황이 된다.
이때 캐시 서버를 이용한다. Cache 서버는 이름을 IP 로 변환하는 작업만을 수행한다.


네임서버 설정 파일은 아래와 같다.

/etc/resolv.conf <== 기본 네임서버 지정. 여기에 기본 네임서버 설정이 없으면
네임서버 질의를 하지 못한다.
/etc/named.conf <== 이 파일은 /etc/hosts와 DNS 에 질의할 순서를 정한다.
/var/named/named.ca <== 루트 네임서버에 대한 정보가있는 데이터베이스파일
/var/named/named.local <== 루프백인 localhost 에 대한 설정파일
/var/named/파일이름.zone <== Public domain 에 대한 forward zone 파일
/var/named/파일이름.rev <== Inverse domain 에 대한 reverse zone 파일…


위의 파일중에 *.zone , *.rev 파일은 named.local 파일을 복사하여 사용한다.

먼저 named.conf 파일을 vi로 열어서 보자..

vi /etc/named.conf

options {
directory "/var/named";
};
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};


제일 위에 보면 option 부분이 존재하고 그 안에는 directory "/var/named"; 라고 되어있다.
끝에는 항상 세미콜론이 붙는다. 이 부분은 여기에서 설정한 네임서버의 파일이 존재할 디렉토리를 말한다.
그러니까 여기서 기본 네임서버 설정을 하고 거기에 따른 부수적인 파일들은 /var/named 디렉토리에
위치하여야 한다는 이야기이다.

Zone 이라고 시작되는 부분은 zone 설정영역이라고 하며 이 부분에 캐쉬전용서버, 1차 , 2차 네임서버등에
관련된 설정을 해준다. 설정방법은 다음과 같다.

zone "데이터베이스" {
type (hint|master|slave);
file "존 파일명";
};

여기서 데이터베이스라고 되어있는 부분은 이 값에 따라 두개의 zone 으로 나누어지게 된다.
Option 부분 아래의 zone 부분을 보면 zone "." 이라고 되어있는데 쩜 (.) 이라고 되어있는
데이터베이스는 캐시서버를 의미한다.
윗부분의 zone "데이터베이스" 부분의 데이터베이스는 우리가 실제 설정을 할 진짜 도메인 이름을 넣어준다.
Yadong.com 좋다~~ (^O^)
이렇게 우리가 사용할 도메인 이름을 입력하면 이부분의 zone 영역은 Forward zone 데이터베이스가 된다.

그런데 앞의 설명에서 이름을 IP 주소로, IP주소를 이름으로 바꿔주는게 네임서버 역할이라고 하였다.
우리는 지금 이름을 IP 주소로 바꾸어주는 부분을 설정하였다. 그럼 반대의 경우도 설정을 해주면 된다.
방법은 아래와 같다.

zone "32.249.211.in-addr.arpa" { <== 이렇게 지정하면 reverse zone 이 된다.

};

이때 마지막의 호스트 부분은 적지 않는다. 왜? Network class 부분을 잘 생각해보자..
그렇다면 위의 두 가지 부분을 named.conf 파일에 추가하자..

zone "만들 도메인이름" {}
zone "아이피꺼꾸로.in-addr.arpa" {}

이렇게 설정이 되었다면 {} 안에 들어갈 부분을 작성해야 한다. 위쪽에 보니까 type 부분과 file 부분이 있다.
Type 부분은 hint, master, slave 중에 하나를 써주면 된다.
Hint 는 좌측 페이지의 첫번째 zone 영역을 보면 된다. 그러니까 cache 서버 라는 것을 알 수 있다.
master 부분은 1차 네임서버, slave 부분은 2차 네임서버이다. 2차 네임서버를 지정하여 줄때는
masters { 1차 네임서버 아이피 주소; }; 부분을 반드시 명시해 주어야 한다.

file "존 파일명"; 부분에는 directory 부분에 적혀있는 /var/named 디렉토리에 작성하게 될 zone 영역
파일들을 적어주면 된다.

file "만들도메인.zone"; <== 포워드 존 파일
file "만들도메인.rev"; <== 리버스 존 파일

거의 대부분 이런 형태로 zone 파일을 작성한다.

자 … 이렇게 작성이 되었다면 이제 /var/named 디렉토리로 이동하여 포워드존 , 리버스존 파일을 만들어 주자.
각 영역파일들은 named.local 파일을 복사하여 사용한다.

cp named.local 만들도메인.zone
cp named.local 만들도메인.rev

이렇게 복사를 하였으면 포워드 존 파일부터 수정한다.

vi /var/named/만들도메인.zone

$TTL 86400
@ IN SOA ns.211.249.32.119. root.ns.211.249.32.119. (
20020402 ; serial
10800 ; Refresh
3600 ; Retry
604800 ; Expire
86400 ) ; Mininum(TTL)

IN NS ns.211.249.32.119.

1 IN PTR localhost.


이런 형태의 파일이 보일것이다.
이제 차례대로 알아보자.
위쪽에 보면 @ 부분이 있는데 여기서 자주 헷갈리게 된다. 네임서버 설정에서의 @는 이메일을 보낼 때의
그 골뱅이가 아니고, 자기자신의 호스트를 가르키는 녀석이다.
골뱅이를 써도 되고 진짜 호스트 이름을 적어줘도 된다. 편의상 @로 사용한다.

@ IN SOA localhost.localdomain. root.localhost.

위의 부분은 책에 보니까 SOA 레코드는 해당 도메인에 대해 네임서버가 모든 리소스 레코드 권리를
가지고 있음을 알려주는 레코드. 라고 되어있다.
위에 골뱅이는 설명을 해 놨고 IN 은 네트워킹 어드레스 클래스를 의미하는 것으로 항상 리소스를
지정할 때 사용된다.
SOA 다음에는 1차 네임서버 주소와 관라자의 Email 주소가 있다. 이때 주의하여야 할 것은 여기서
적어주는 도메인은 완전한 도메인 이기 때문에 뒤에 반드시 쩜(.)을 찍어줘야 한다는 것이다.
쩜 빼고 울지말도록..
root.localhost 부분은 이 서버의 관리자 이메일 주소를 적어주는 부분이다.
이때 @를 사용하지 않는다. 이유는 위를 본다.

SOA <== Start of Authority
NS <== 네임서버 리소스
A <== 도메인에 IP 주소를 부여해 주는 레코드
MX <== 메일 익스체인저
CNAME <== 하나의 아이피에 여러 개의 별칭을 가질 수 있게 해주는 레코드

그리고 그 다음에 괄호 부분에는 각 설정 부분이 오게 된다.

20020402 ; serial
10800 ; Refresh
3600 ; Retry
604800 ; Expire
86400 ) ; Mininum(TTL)

여기서 세미콜론은 주석이다.

Serial 부분은 네임서버의 데이터 버전을 나타내는 부분이다. 보통 날짜를 년월일로 적어주지만 맘대로 적어도 된다.
이 부분은 2차 네임서버나 다른 네임서버에서 로컬 네임서버의 데이터를 불러올 때 자신이 가지고 있는 시리얼 넘버와
비교하여 자신의 것보다 높으면 업데이트 된 정보를 가져온다.

Refresh 부분은 2차 네임서버가 1차 네임서버에게 새롭게 업데이트된 정보가 있는지 요청 할 때까지의 시간을 지정한다.
단위는 초단위다. 60초 * 60분 * 3 = 10800 즉 세시간마다 요청을 보낼것이다.

Retry 부분은 2차에서 1차로 연결이 되지 않을 경우 재 연결할 때까지의 대기 시간이다.

Expire 부분은 2차 네임서버가 일정시간 동안 1차 네임서버에 접속하지 못했을 때 이전의 정보는 무의미하다는 것으로
간주하여 이를 파기할 시간을 정하는 부분이다.

Minimum(TTL) 이 부분은 각 zone 파일의 윗부분에 정의된 TTL 변수를 사용하고, 다른 변수에서 자신의 정보를
가져갔을 때 그쪽 서버의 캐시에 그 정보가 얼마나 오랫동안 머물것인지 정한다. 86400 초 후에 삭제된다.


NS 레코드는 해당 도메인에 대한 네임서버를 지정하는 레코드이다.

IN NS ns1.만들도메인.com. <==점 빼먹지 말자. 1차 네임서버

위처럼 지정해 주면 된다. 그리고, 우리는 위에서 적어준 도메인으로 메일도 받아야 한다.
앞 장에 보면 MX 라는 부분이 있다. 이 레코드를 사용하면 된다. 사용법은 아래와 같다.

IN MX 10 만들도메인.com.

MX 다음에 10 이라고 되어있는 부분은 1차 메일서버를 지정하게 된다. 2차 메일서버가 있다면
MX 20 2차도메인.com. <== 이렇게 추가한다.
이때 MX 레코드는 절대 IP 주소로 지정하지 않는다. 왜??? 안되니까… ㅡ,.ㅡ

우리는 지금 Forward zone 을 설정하는 부분이다. 이름을 치고 들어왔다면 그것을 IP로 바꾸어 주어야 하는데
지금은 1차 네임서버 이름만 지정을 하였다. 각 부분은 탭으로 띠어준다. 스페이스바는 사용하지 않는다.

먼저 /etc/named.conf 파일에 zone 영역에 yadong.com 이라고 적어줬다면 이것이 도메인이름이 될 것이다.
그럼 @ 를 써도 되겠지??

@ IN A 211.249.32.119 <==이 부분은 자기의 호스트
즉 /etc/named.conf 에서 yadong.com 이라고 적었다면
그 이름을 치고 들어왔을 때 바꾸어줄 아이피 주소를 적어준 것이다.

//////////////////////////////////////////
www.yadong.com 이라고 치고 들어왔을때는 ???
//////////////////////////////////////////

www IN A 211.249.32.119 <==이렇게 해주면 되겠지??
ns IN A 211.249.32.119 <==ns.yadong.com 이라고 치고 들어왔으면 이렇게 추가해주면 된다.


그럼 완성된 파일을 보자..

$TTL 86400
@ IN SOA ns. yadong.com. root. yadong.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.yadong.com.
IN MX 10 yadong.com.
@ IN A 211.249.32.119
ns IN A 211.249.32.119
www IN A 211.249.32.119

위와 같은 형식이 될 것이다. 자~ 여기서 우리는 Forward zone 영역 파일의 설정을 끝냈다.
이제 Reverse Zone 영역을 작성해 보자.

$TTL 86400
@ IN SOA ns.yadong.com. root.yadong.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.yadong.com.
119 IN PTR yadong.com.
119 IN PTR www.yadong.com.
119 IN PTR ns.yadong.com.

이렇게 작성하면 된다.
/etc/named.conf 에서 우리는 Reverse Zone 데이터베이스를 설정할 때
zone "0.0.127.in-addr.arpa" 이렇게 적어주었다.
자기 자신의 루프백 주소는 127.0.0.1 이다
이 부분을 잘 보면 마지막의 호스트부분인 1 을 생략하고 나머지 번호를 거꾸로 적었다는 것을 알 수 있다.
내가 사용하고 있는 IP 주소가 만약 211.249.32.119 이라면 뒷부분의 119 부분을 뺀 나머지 부분 211.249.32 를
거꾸로 써주면 되는 것이다. 그러니까 119를 뺀 나머지부분은 이미 설정이 되어있는 부분이기 때문에 IP 주소를
다 써 줄 필요가 없다는 말이다. 그냥 119 라고 적어주고 그 IP 가 들어왔을 때 변환시켜줄 도메인이름을 적어주면 된다.
그리고 PTR 레코드는 IP주소를 도메인 이름으로 변환해 주는 역할을 한다.

이렇게 해서 Reverse Zone 영역의 설정도 끝났다.
이제 막바지 작업이다.
/etc/hosts 에 자신의 도메인정보를 입력한다.
/etc/resolv.conf 에 자신의 도메인 정보를 입력한다.

/etc/rc.d/init.d/network restart 해주고
/etc/rc.d/init.d/named restart 라고 해준다. 에러가 없다면 네임서버 질의를 한다.

nslookup 자기도메인.com <== 이렇게 해서 호스트 이름과 아이피 주소가 나와야 한다.
물론 반대로 IP 주소를 쳐도 이상없이 나와야 한다.

Posted by tornado
|

****************
 proftp 설치하기
 작성자 : 유희성
****************


http://www.proftpd.org 에서 최신 버젼을 다운로드 받는다(좌측 상단에 tar.gz형식)
기존의 wu-ftp나 proftp 중에 rpm으로 설치된것은 삭제한다.

rpm -qa | grep proftp  라고 해서 뭐가 나오면 지운다. (이거 그냥 써도 된다)
rpm -qa | grep wu-ftp  라고 해서 뭐가 나오면 지운다.

rpm -e --nodeps 나온패키지     <=== 삭제

항상 최신 버젼을 유지합시다.

다운받은 소스를 압축을 풉니다.

tar xvzf proftpd-xxx.tar.gz   
cd proftpd-xxx
./configure --prefix=/usr/local/proftp --enable-auto-shadow

여기서 prefix 부분은 설치될 경로이고 --enable-auto-shadow 는 리눅스에서 지원하는
쉐도우 패스워드를 자동으로 인식하게끔 해주는것이다. 보안상 반드시 넣어준다.
에러가 없다면
make; make install     해준다.

cd /usr/local/proftp  로 들어간다.
ls -R 이라고 친다. 그럼 각 디렉토리 별로 잘 보일꺼다.

bin 이라는 디렉토리는  ftpwho 라는 넘과 ftpcount 가 있다.
ftpwho 는 어느넘이 현재 접속해서 사용하는지 그 정보를 보여주고
ftpcount 는 몇놈이 접속되어있는지 카운트를 세어준다.

./ftpwho 라고 쳐본다.. 맨첨에는 암것도 없다.

sbin 이라는 곳에는 proftp 의 실행파일이 들어있다.
etc 에는 ftp 설정파일이 들어있다.
man 디렉토리는 아무래도 manual page 가 있는거 같다.. 이거 사용해도 되지만
그냥 man proftpd 라고 하면 매뉴얼 페이지가 뜰것이다... 와우리눅스는 proftp 기본탑재...

var 디렉토리에는 Log file 이 쌓이게 된다.... 몇번 사용해보고 이곳에 들어가면 로그파일이 자동 생성되어진걸 볼수있다.

이제 proftp의 설정파일을 고쳐주자...

cd /usr/local/proftp/etc 로 들어가서 vi proftpd.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   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 that the server normally runs at.
User    nobody
Group    nobody

# Normally, we want files to be overwriteable.
<Directory /*>
  AllowOverwrite  on
</Directory>

# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
  User    ftp
  Group    ftp
  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias   anonymous ftp

  # Limit the maximum number of anonymous logins
  MaxClients   10

  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin   welcome.msg
  DisplayFirstChdir  .message


  # Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>
    DenyAll
  </Limit>

</Anonymous>


약간 틀리겠지만 위 형식대로 입력이 되어있을것이다.

ServerName  "어쩌구... "   <=== 호스트 이름을 지정해준다. 바꾸고 싶으면 바꾼다.
ServerType  standalone    <=== 슈퍼데몬 환경에서 돌아갈지... 아니면 단독데몬으로 돌아갈지 결정한다.
        우리는 그냥 단독데몬으로 돌린다.
        xinetd 환경에서 돌리면 접속시 약간의 딜레이가 생길수도 있다.
        왜? 사용자가 요청을 하면 xinetd 를 통과해서 다시 proftp 로
        접속을 해주니까...
DefaultServer  on  <=== 이 부분은 걍 내둔다..
Port   21  <=== ftp 포트를 지정한다. 디폴트 값을 사용한다. 이부분을 바꿔주고 싶으면
     /etc/services 파일도 수정해 줘야 한다. 이 파일을 한번 열어본다.
     각 포트번호와 서비스들이 보일것이다.
Umast   022  <=== 기본 퍼미션을 지정한다. 777 에서 적혀 있는 값을 빼준것이 기본 퍼미션이다.
      755-022=755   기본 퍼미션이 755라는얘기다...
MaxInstance  30   <=== DoS(Deny of Service) 의 공격에 보호하기 위해서 proftp가
      Standalone 모드로 동작할때 생성되는 최대 자식 프로세스의 수를 지정.
      기본값으로 둔다.(보안상...)
User   nobody
Group   nobody  <=== 요기 두 부분은 ftp 에 접속한상태에서의 소유권을 지정해 준다.
          root 권한으로 proftpd 데몬을 띠우고 여기에 지정된 사용자, 그룹으로
          권한을 넘긴다.
          nogroup 로 되어있으면 nobody 로 고친다.
<Directory /*>
  AllowOverwrite  on <=== 이 부분은 새로 생성될 파일로 덮어씌우기를 결정해준다.
</Directory>     on 이면 덮어쓰기, off 이면 안되지..

<Anonymous ~ftp>

좌르르르륵
</Anonymous>   <=== 요기는 계정이 없는 사용자. 즉 익명사용자를 위한 공간을 할당해 주는 부분이다.

요기까지 고쳤으면 설정 끝이다.

그럼 proftpd 데몬을 띠운다.
아까 proftp 실행파일은 sbin 안에 있다고 하였다.
그럼 sbin 으로 이동한다.
cd /usr/local/proftpd/sbin  
./proftpd start   라고 했을 때 아무런 메세지가 없어야 한다.
에러 발생했으면 메세지 잘 보고 고친다.. 안되면 손가락 짤러..

ftp에 접속이 되는지 접속을 해보자.

ftp localhost  라고 한다.    ftp 211.108.242.host 라고 해줘도 똑같다.
그럼 유져와 패스워드를 입력하라고 한다.. 입력한다.. root 사용자는 보안상 못들어 가니까 접속하기 전에 계정을 하나 만들어주자.

login faild 만 안뜨면 된다.
이때 접속되는 디렉토리는 /home/ 디렉토리에 있는 각자의 계정에 접속이 되게 된다.


*************
  ftp 사용법
*************

사용법 : ftp <hostname | ip address>
ex >  ftp 211.108.242.69
 name : 자기 아이디 (계정이 없으면 anonymous) 
 password : 자기 패스워드(없으면 e-mail 주소 또는 @ )
      ftp>    <=== 일케 뜨면 된거다.

      help 또는 ? 를 입력한다.(도움말 출력)
     
      dir
      ls        디렉토리 리스트를 보여준다.
      size 파일의 크기를 출력
      mkdir (dir) 새로운 디렉토리 만들기
      rmdir 디렉토리 삭제
      delete <file> 파일삭제
      mdelete file1 file2....... 여러파일 삭제
      pwd 현재 경로 출력
      status 현재 상태 출력
      exit
      quit 종료
      get (file) ftp의 파일을 자신의 디렉토리로 가져온다.
      put (file) 자신의 파일을 원격 ftp로 전송
      mget (file1, file2, ........)  여러 파일 동시에 가져오기
      mpug (file1, file2, ........)  여러 파일 동시에 받기
      cd (dir) 디렉토리 이동
      nlist (dir) 원격  ftp의 dir 서브디렉토리 리스트 출력
      rename <name1  name2> ftp 상의 파일이름 바꾸기
      chmod 퍼미션 조정
      open 원격 ftp host 로 접속하기

      기타등등....... man으로 알아보세요..


이제 명령어도 보았으니 한번 테스트 해보자. 파일을 한개 올린다.

put 파일네임   <=== 이라고 치면 전송 상태가 text로 출력된다. 다 올라갔으면 ls 나 dir 로 업로드가 잘 되었는지 살펴보자.

그럼 자신의 directory 에 있는 파일(업로드한 파일)을 삭제하고 ftp에서 전송하자.
get 파일네임   <=== 파일이 잘 전송이 되었나??? 자신의 디렉토리에서 확인해 본다.

여기서 잠깐!!!!

지금 현재 상태에서 cd .. 을 계속 쳐본다.... 아마 자신이 접속한 곳 보다 상위 디렉토리로 이동을 하게 되는것을 봤을것이다.
이렇게 되면 당근 안된다. 모르는 사람이 내 디렉토리를 보게 되는것은 좀 기분이 나쁘다.
이런 현상을 막으려면 proftpd.conf 파일에 다음을 입력해준다.
DefaultRoot ~  라고 입력해 준다.  ~ 는 자신의 홈디렉토리가 된다.

이렇게 했는데도 같은 현상이면 DefaultRoot 부분을 <Global> 태그로 감싸준다.
<Global>
  DefaultRoot  ~
</Global>
이렇게 적어준다. Global 태그는 ftp 전체에 영향을 주는 전역을 선언하는 태그라고 되어있당.

DefaultRoot ~ aaa 라고 해주면 aaa 사용자 빼고 다른 넘들은 상위 디렉토리로 이동가능
DefaultRoot ~ !aaa 라고 해주면  aaa 사용자 빼고 다른사람들은 상위디렉토리로 이동 불가능.

이렇게 해서 계정 사용자들은 ftp를 이용하게 설정이 다 되었다. 하지만 계정이 없는 사용자.
익명사용자에 대해서도 ftp 를 사용할수 있게 해주어야 한다.
<Anonymous 경로>    <=== 이 부분이 익명사용자 설정이라고 위에 적어놨다.

이곳에 설정을 해 주면 된다.
일단 익명 사용자들은 거의 대부분 다운로드만 받게 설정을 해주어야 한다. 물론 읽기전용으로 해야쥐..

그럼 설정을 하자.
<Anonymous /home/ftp> 라고 경로를 고쳐준다. 그리고 ftp 라는 유저도 등록해 주자.. 그래야 알아먹지..


<Anonymous ~ftp>   <=== 요기처럼 ~ 로 줘도 된다.
  User    ftp <=== ftp 유져와 그룹을 지정한다.
  Group    ftp
  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias   anonymous ftp <=== anonymous 로 들어온 사용자를 ftp 라는 별칭을 부여해준다.

  # Limit the maximum number of anonymous logins
  MaxClients   10 <=== 익명사용자의 최대 접속수를 지정해주는 부분이다.

  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin   welcome.msg <=== 익명 사용자의 환영 메세지이다.
  DisplayFirstChdir  .message


  # Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>  <=== 이 부분은 익명 사용자의 write 권한을 박탈한다.
    DenyAll  <=== 요기가 AllowAll 이라고 되어있으면 어케 될까?? 파일이 올라가게 된다.
  </Limit>
</Anonymous>

이제 대충 설정이 끝났다. 그리고 만약 익명사용자가 접근이 안된다면
<Anonymous > 태그 안에 아래처럼 적어준다.
RequireValidShell off

이 부분이 off 로 되어있어야 접속이 가능하게 된다. 이부분이 없어도 접속은 되지만
만약 익명 계정 접속이 안된다면 이부분부터 추가시켜준다.

그리고 만약 익명 사용자가 10명이 넘었을때 메세지를 보내야 하는데 아래와 같이 설정한다.

MaxClients  10 "미안허다. 10명밖에 못들어와.... 조금만 지둘려 ㅡ,.ㅡ"

이렇게 하면 10명이 넘은 사용자들에게는 따옴표 안의 문자가 출력될것이다.
그리고 성질급한 넘들은 브라우저 10개 띠워놓고 10개를 한 ftp 서버에 접속한 후에
파일다운로드를 시도하려 할수도 있다.
이때 이것을 막아주려면
MaxClientsPerHost 2 "이눔아.!! 좀 지둘려...."

이렇게 써주면 된다.

이제 환영메세지를 만들어보자.

아래의 내용을 /home/ftp/ 밑에 welcome.msg 에 입력한다.

vi welcome.msg
*****************************************************
어서오시게... 많이 가져가게나...
*****************************************************
proftp 1.2 %V
ftp://%L/

남은 용량 : %F
현재 사용자 수 : %N/%M (한 호스트당 1회 접속만 허용)
%R에서 %U님이 접속했습니다.
%T년에 접속.

불편한점은 메일로 보내주세요.
E-mailto:%E

*****************************************************

위의 내용중에 % 가 붙은 넘들은 아래와 같다.

%V 버젼 표시
%L 호스트 주소표시
%F 남은 용량
%N 현재 접속자수
%M 최대 접속자수
%R 접속한 호스트 주소
%U 유져이름 (anonymous 가 나오겠지???)
%T 접속한 날짜
%E 관리자 이메일주소(네임서버에 지정된 메일)

머 대충 이정도가 있다.. 더 알고 싶으면 proftpd.org 가보면 많다.


현재 계정사용자는 업로드/다운로드가 다 가능하지만 익명사용자는 다운로드만 가능하다.
만약 업로드까지 가능하게 해주려면 <Anonymous> 태그 안쪽에 아래와 같이 설정한다.

# 익명 사용자 업로드 디렉토리
<Directory incoming/*>    <=== /home/ftp/ 디렉토리 안에 incoming 라는 디렉토리를 만들어줘야한다. 퍼미션도 755로 변경해준다.
  AllowOverWrite on <=== on으로 해줘야 업로드가 가능하다.
  AllowRetriveRestart on <=== 요기랑 아래줄은 아마 이어올리기가 가능한 옵션일것이다. 생각 안나네.. ㅡ,.ㅡ;
  AllowStoreRstart on
  <Limit DELE RMD>   <=== 요기는 업로드 한 파일을 마음대로 지울수 없게 하기 위해서 지우는 속성을 박탈한 부분이다.
    DenyAll
  </Limit>
</Directory>

이렇게 해주면 익명계정의 사용자도 업로드가 가능하게 된다.

오늘은 여기까지... ^^



 

Posted by tornado
|