Ŭ¶ó¿ìµåű×
Javascript
PHP
ASP
CSS
html
mysql
jquery
image
API
Mobile
¸Þ´º
slide
°Ô½ÃÆÇ
ÇöÀçÁ¢¼ÓÀÚ ¸í
Netmania mail (À¥¸ÞÀÏ) V1.0.1
¼Ò½ººÐ·ù
À¥±â¹Ý ¸ÞÀÏ
´Ù¿î·Îµå Ƚ¼ö
1285 ȸ
°£´Ü¼³¸í
PHP¿Í Mysql ȯ°æ¿¡¼ ¸¸µé¾îÁø À¥¸ÞÀÏÀÔ´Ï´Ù.
1. »ç¿ëȯ°æ
OS : Redhat linux 6.2 (2.2.14-5.0), other Linux , UNIX ,FreeBSD, etc
Database : MySQL 3.22.30 ÀÌ»ó
Webserver : Apache 1.3.x ÀÌ»ó
PHP : 4.0.0 ÀÌ»ó
Perl : 5.0 ÀÌ»ó ( ´ÜÁö install¿¡¸¸ »ç¿ë, ¼öµ¿ ¼³Ä¡½Ã ºÒÇÊ¿ä )
2. µð·ºÅ丮 ±¸Á¶
¼³Ä¡°¡ ³¡ÀÌ ³ª¸é ´ÙÀ½°ú °°Àº ±¸Á¶ÀÇ µð·ºÅ丮°¡ »ý¼ºµÇ°Ô µË´Ï´Ù.
Àý´ë°æ·Î´Â ¼³Ä¡½Ã ÁöÁ¤ÇÏ´Â °æ·Î¿¡ µû¶ó ´Ù¸£°Ô µË´Ï´Ù.
/---------htdocs
| |---bin => ÇÁ·Î±×·¥ ÆÄÀϵé
| |
| |---tle => µðÀÚÀÎ ¼Â ÆÄÀϵé
| |
| |---img => À̹ÌÁö ÆÄÀϵé
| |
| |---lib => ¶óÀ̺귯¸®
|
|-----conf => ȯ°æ¼³Á¤
| |
| |---language => ¾ð¾îÆÑ
|
---- DB_information => db table Á¤º¸
bin : netmania mailÀÇ Áß¿äÇÑ ½ÇÇེũ¸³Æ® ÆÄÀϵéÀÌ µé¾îÀÖ½À´Ï´Ù. ÀÌ °÷ÀÇ
ÆÄÀϵéÀ» ÀÓÀÇ·Î ¼öÁ¤ÇÏ½Ç ¶§´Â ºñÁ¤»óÀûÀ¸·Î µ¿ÀÛÇÒ ¼ö ÀÖ½À´Ï´Ù.
tle : netmania mailÀÇ ÀÎÅÍÆäÀ̽º¿Í °ü·ÃµÈ ÆÄÀϵéÀÌ µé¾îÀÖ½À´Ï´Ù. ÀÌ °÷ÀÇ
ÆÄÀϵ鿡µµ ¸¹Àº ½ºÅ©¸³Æ®µéÀÌ Æ÷ÇԵǾî Àֱ⠶§¹®¿¡ ¼öÁ¤½Ã¿¡´Â
ÁÖÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù.
img : netmania mail¿¡¼ »ç¿ëµÇ´Â ±×·¡ÇÈ ÆÄÀϵéÀÌ µé¾îÀÖ½À´Ï´Ù.
lib : netmania mailÀÌ »ç¿ëÇÏ´Â Áß¿äÇÑ ¶óÀ̺귯¸®µéÀÌ µé¾îÀÖÀ¸¸ç ÀÌ °÷ÀÇ
ÆÄÀϵ鵵 ÀÓÀÇ·Î ¼öÁ¤½Ã¿¡´Â ºñÁ¤»óÀûÀ¸·Î µ¿ÀÛÇÒ ¼ö ÀÖ½À´Ï´Ù.
conf : netmania mailÀÇ È¯°æ¼³Á¤ °ü·Ã ÆÄÀϵéÀÌ µé¾îÀÖ½À´Ï´Ù.
language : netmania mailÀÇ ¾ð¾îÆÑÀÌ µé¾îÀÖ½À´Ï´Ù. ÇØ´çµÇ´Â ¾ð¾îÀÇ ÆÑÀ»
ÀÌ°÷¿¡ ¼³Ä¡ÇϽŠÈÄ conf¿¡¼ ¾ð¾î°ü·Ã ¼³Á¤À» ¹Ù²Ù½Ã¸é ÇØ´ç
¾ð¾î·Î ¼ºñ½º µÇ°Ô µË´Ï´Ù. ÀÌ°÷¿¡´Â °¢Á¾ ¸Þ¼¼ÁöµéÀ» ´ãÀº
ÆÄÀϵé°ú ¸Þ´º¿¡ »ç¿ëµÈ °¢Á¾ ±×·¡ÇÈ ÆÄÀϵéÀÌ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.
DB_information : netmania mailÀÌ »ç¿ëÇÏ´Â Áß¿äÇÑ db Á¤º¸°¡ µé¾îÀÖ½À´Ï´Ù.
3. Áغñ
netmania mailÀ» »ç¿ëÇϱâ À§Çؼ´Â Apache, pop3 server, smtp server
(sendmail,qmail..etc), MySQL ÀÌ ¼³Ä¡ µÇ¾î ÀÖ¾î¾ß ÇÕ´Ï´Ù.
ÀÌ¹Ì Apache, pop3 server, smtp server, MySQL ÀÌ ¼³Ä¡µÇ¾î ÀÖ´Â
°æ¿ì 4ÀåÀ¸·Î ³Ñ¾î°¡¼¼¿ä.
´ÙÀ½¿¡ ¼Ò°³µÇ¾îÀÖ´Â ¼³Ä¡ °úÁ¤Àº Redhat 6.2 ±â¹Ý¿¡¼ÀÇ ¼³Ä¡°úÁ¤ÀÔ´Ï´Ù.
3.1 MySQL ¼³Ä¡
MySQL Àº RedHat 6.2 ¿¡¼ ±âº»ÀûÀ¸·Î Á¦°øÇÏ°í ÀÖÁö ¾Ê±â ¶§¹®¿¡
http://www.mysql.com ¿¡¼ down ¹Þ¾Æ ¼³Ä¡ ÇØ¾ß ÇÕ´Ï´Ù.
¼³Ä¡´Â Source Compile, RPM ¼³Ä¡ µÎ °¡Áö ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù.
3.1.1 Source Compile
http://www.mysql.com/downloads/ ¿¡¼ ÃֽŠ¾ÈÁ¤¹öÀüÀ» ´Ù¿î·Îµå ¹ÞÀ¸¼¼¿ä.
´ÙÀ½ ¿¹Á¦´Â mysql ¹öÀü 3.22.32 ¹öÀüÀ» ¼³Ä¡ÇÏ´Â °ÍÀ¸·Î ÇÕ´Ï´Ù.
Âü°í) ÇÁ·Î±×·¥ ¼³Ä¡½Ã ¸ðµÎ root ±ÇÇÑÀ¸·Î ÀÛ¾÷À» ÇØ¾ß ÇÕ´Ï´Ù.
shell ¿¡¼ ´ÙÀ½ °°Àº ¸í·É¾î·Î ¾ÐÃàµÈ ¹èÆ÷ÆÇÀÇ ¾ÐÃàÀ» Ç®¾îÁÝ´Ï´Ù.
shell> tar zxvf mysql-3.22.32.tar.gz
¾ÐÃàÀÌ Ç®·ÈÀ¸¸é »ý¼ºµÈ µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
shell> cd mysql-3.22.32
ÀÌÁ¦´Â ¼³Á¤À» ÇØÁÖ°Ô µË´Ï´Ù.
shell> ./configure --prefix=/usr/local/mysql
--with-charset=euc_kr
¿©±â¿¡¼ charsetÀ» euc_kr·Î ÇÏÁö ¾Ê°ÔµÇ¸é Çѱ۷ΠµÇ¾î ÀÖ´Â data ¸¦
sort ½Ã¿¡ Á¤È®ÇÑ sort °ªÀ» ¾òÁö ¸øÇÏ°Ô µË´Ï´Ù.
(¿ª½½·¡½Ã)´Â ¿É¼ÇÀ» ³Ö´Ù º¸´Ï ±æ¾îÁú °æ¿ì ´ÙÀ½ÁÙ¿¡¼ ÀÌ¾î¼ ¾µ °æ¿ì
¿ª½½·¡½Ã¸¦ ÀÌ¿ëÇÏ¸é µË´Ï´Ù.
--prefix ¿É¼ÇÀº ¼³Ä¡ÇÒ µð·ºÅ丮¸¦ ÁöÁ¤ÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. default
°ªÀº /usr/local ÀÔ´Ï´Ù.
--prefix, --with-charset ¿É¼Ç ÀÌ¿Ü¿¡ ´Ù¾çÇÑ ¿É¼ÇÀÌ ÀÖ½À´Ï´Ù.
´Ù¸¥ ¿É¼Ç¿¡ ´ëÇÑ Á¤º¸¸¦ ¿øÇÒ¶§´Â
´ÙÀ½°ú °°ÀÌ --help ¿É¼ÇÀ» ÇÏ¸é ´Ù¾çÇÑ ¿É¼ÇÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.
shell> ./configure --help
configure °¡ ³¡ÀÌ ³ª¸é make °úÁ¤À¸·Î ³Ñ¾î °©´Ï´Ù. make °úÁ¤Àº souce¸¦
compile ÇÏ´Â °úÁ¤À¸·Î ¸¸¾à make µµÁß ¿À·ù°¡ ¹ß»ýÇÏ¿© ´Ù½Ã make ÇÒ °æ¿ì¿£
make clean À¸·Î object ÆÄÀÏÀ» »èÁ¦ÇÏ½Ã°í ´Ù½Ã ½ÃµµÇØ º¸¼¼¿ä.
shell> make clean
shell> make
ÀÌÁ¦ ¼³Ä¡¸¦ ÇÕ´Ï´Ù.
shell> make install
MySQL ÀÌ ¼³Ä¡µÇ¾î ÀÖ´Â µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
shell> cd /usr/local/mysql/bin
MySQLÀÇ µ¥ÀÌÅ͸¦ °ü¸®ÇÒ ±âº»ÀûÀÎ Å×À̺í 6°³¸¦ »ý¼º½Ãŵ´Ï´Ù.
shell > ./mysql_install_db
MySQL share µð·ºÅ丮·Î À̵¿Çؼ mysql.server ÆÄÀÏÀ» ¼öÁ¤ÇÕ´Ï´Ù.
shell> cd /usr/local/mysql/share/mysql
shell> vi mysql.server
safe_mysqlÀÌ ½ÇÇàµÇ´Â ¶óÀÎ(78 line)¿¡ --language=korean ¿É¼ÇÀ» Ãß°¡ÇÕ´Ï´Ù.
ÀÌ ¿É¼ÇÀ» Ãß°¡ÇÏ¸é ¿¡·¯ ¸Þ¼¼Áö°¡ Çѱ۷Π³ª¿À°Ô µË´Ï´Ù.
$bindir/safe_mysqld --user=$mysql_daemon_user --pid-file=$pid_file
--datadir=$datadir --language=korean &
mysql.server ÆÄÀÏ ½ÇÇà±ÇÇÑÀ» º¯°æÇÕ´Ï´Ù.
shell> chmod 755 mysql.server
linux °¡ ºÎÆÃÇÏ¸é¼ ½ÇÇàµÇ°Ô ÇÏ·Á¸é mysql.server ¸¦ /etc/rc.d/init.d/mysqld
·Î copy ÇÏ°í ´ÙÀ½°ú °°ÀÌ ÇÕ´Ï´Ù.
shell> cp mysql.server /etc/rc.d/init.d/mysqld
shell> cd /etc/rc.d/rc3.d
shell> ln -s /etc/rc.d/init.d/mysqld S85mysqld
¼³Ä¡ ÀÛ¾÷ÀÌ ³¡ÀÌ ³µ½À´Ï´Ù. ÀÌÁ¨ mysqlÀ» ½ÇÇàÇØ º¸°Ú½À´Ï´Ù.
shell> /etc/rc.d/init.d/mysqld start
±×¸®°í ³ª¼ mysqlÀÇ root password ¸¦ ¹Ù²ãº¸°Ú½À´Ï´Ù. ¿¹¸¦ µé¸é »õ·Î ¸¸µé
password °¡ netmania ÀÏ °æ¿ì
´ÙÀ½°ú °°ÀÌ ÇÏ¸é µË´Ï´Ù.
shell> /usr/local/mysql/mysqladmin -u root password ``netmania``
3.1.2 RPM ¼³Ä¡
http://www.mysql.com¿¡¼ ÃֽžÈÁ¤¹öÀüÀ» ´Ù¿î·Îµå ¹Þ½À´Ï´Ù.
ȨÆäÀÌÁö¿¡ º¸¸é ¿©·¯°³ÀÇ rpmÀÌ Àִµ¥, ±×Áß¿¡¼
Binary RPM containing the server for i386 machines.
Binary RPM containing client programs for i386 machines.
Binary RPM containing include files and libraries
for development for i386 machines
ÀÌ ¼¼ °¡Áö¸¦ ´Ù¿î·Îµå Çϼ¼¿ä.
±×·± ÈÄ
´ÙÀ½°ú °°Àº rpm ¸í·É¾î·Î ¼³Ä¡ÇÑ´Ù.
shell> rpm -Uvh MySQL-3.22.21-1.i386.rpm
shell> rpm -Uvh MySQL-client-3.22.21-1.i386.rpm
shell> rpm -Uvh MySQL-devel-3.22.21-1.i386.rpm
3.2 apache & php
apache ÇÁ·Î±×·¥Àº http://www.apache.org/ ¿¡¼ °¡Àå ÃֽŹöÀüÀ»
´Ù¿î ¹Þ½À´Ï´Ù.
php ÇÁ·Î±×·¥Àº http://www.php.net/downloads.php ¿¡¼ °¡Àå
ÃֽŹöÀüÀ» ´Ù¿î ¹Þ½À´Ï´Ù.
´ÙÀ½°ú °°Àº ¸í·É¾î·Î apache, php ÇÁ·Î±×·¥ÀÇ ¾ÐÃà°ú tar¸¦ DZ´Ï´Ù.
shell> tar xvfz apache_1.3.14.tar.gz
shell> tar xvfz php-4.0.4.tar.gz
¸ÕÀú apache¼Ò½º µð·ºÅ丮¿¡¼ configure ¸¦ ½ÇÇà½Ãŵ´Ï´Ù.
shell> cd apache_1.3.14
shell> ./configure
3.2.1 php ¼³Ä¡
¾ÐÃàÀÌ Ç®¸° php ¹èÆ÷ÆÇ µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
shell> cd ..
shell> cd php-4.0.4
´ÙÀ½°ú °°Àº ¿É¼ÇÀ¸·Î configure ¸¦ ½ÇÇàÇÏ°í ¼³Ä¡ ÇÕ´Ï´Ù.
shell> ./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.14
--enable-track-vars --with-config-file-path=/usr/local/apache/conf
--with-mod-charset --with-language=korean --with-charset=euc_kr
--disable-debug --with-xml --enable-magic-quotes
shell> make
shell> make install
3.2.2 apache ¼³Ä¡
´ÙÀ½°ú °°ÀÌ apache ¹èÆ÷ÆÇ µð·ºÅ丮·Î À̵¿ÇÏ¿© ´Ù½Ã ´ÙÀ½ ¿É¼ÇÀ» ÁÖ°í
configure¸¦ ÇØÁÝ´Ï´Ù.
shell> cd ../apache_1.3.14
shell> ./configure --prefix=/usr/local/apache
--activate-module=src/modules/php4/libphp4.a
--prefix ´Â apache°¡ ¼³Ä¡µÇ´Â µð·ºÅ丮¸¦ ÁöÁ¤ÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù.
ÀÌÁ¦ apache¸¦ ÄÄÆÄÀÏ ÇÏ°í ¼³Ä¡ ÇÕ´Ï´Ù.
shell> make
shell> make install
ÀÌÁ¦ php.ini-dist ÆÄÀÏÀ» /usr/local/apache/conf ¿¡ À̸§À»
º¯°æÇÏ¿© º¹»çÇÕ´Ï´Ù.
shell> cp ../php-4.0.4/php.ini-dist /usr/local/apache/conf/php.ini
ÀÌÁ¦´Â ApacheÀÇ È¯°æ¼³Á¤ ÆÄÀÏÀÎ httpd.conf ¿¡¼ php°¡ µ¿ÀÛÇÏ°Ô²û
¼öÁ¤ÇØ¾ß ÇÕ´Ï´Ù. httpd.conf ÆÄÀÏÀ» vi °°Àº ¿¡µðÅÍ¿¡¼ ¿°í
#AddType application/x-httpd-php .php
ÀÌ·¸°Ô ÁÖ¼®Ã³¸® µÇ¾î ÀÖ´Â ºÎºÐÀ» ´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÕ´Ï´Ù.
AddType application/x-httpd-php .php .php3 .inc .lib .ph
±×¸®°í ÀúÀåÇÏ°í ÆíÁý±â¸¦ ºüÁ®³ª¿É´Ï´Ù.
ÀÌÁ¦´Â linux °¡ ºÎÆÃÇÏ¸é¼ ÀÚµ¿À¸·Î apache ¸¦ µ¿ÀÛÇÏ°Ô º¯°æÇϵµ·Ï ÇÕ´Ï´Ù.
shell> cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
shell> cd /etc/rc.d/rc3.d
shell> ln -s /etc/rc.d/init.d/httpd S85httpd
apache ¼³Ä¡ÀÇ ¸ðµç °úÁ¤ÀÌ ³¡ÀÌ ³µ½À´Ï´Ù. ÀÌÁ¦ apache¸¦ ÀÛµ¿ÇØ º¸µµ·Ï ÇÏÁÒ.
shell> /etc/rc.d/init.d/httpd start
3.3 pop3 server
pop3 server ´Â redhat6.2 ¹öÀü¿¡´Â ÀÌ¹Ì ±ò·Á ÀÖÀ»°Ì´Ï´Ù.
vi °°Àº ÆíÁý±â·Î /etc/inetd.conf ¸¦ ¿¾îº¸½Ã¸é ´ÙÀ½°ú °°ÀÌ ÁÖ¼®
ó¸® µÇ¾î ÀÖÀ»°Ì´Ï´Ù.
#pop-2 stream tcp nowait root /usr/sbin/tcpd ipop2d
#pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d
#imap stream tcp nowait root /usr/sbin/tcpd imapd
±×·¯¸é ÁÖ¼®Ã³¸® µÇ¾î ÀÖ´Â ºÎºÐÀ» ´ÙÀ½°ú °°ÀÌ Ç®¾îÁÝ´Ï´Ù.
#pop-2 stream tcp nowait root /usr/sbin/tcpd ipop2d
pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d
#imap stream tcp nowait root /usr/sbin/tcpd imapd
ÀúÀåÇÏ°í ³ª¿Í¼ inetd¸¦ ´ÙÀ½°ú °°ÀÌ restart ½ÃÄÑÁÖ¼¼¿ä.
shell> /etc/rc.d/init.d/inetd restart
±×·¯¸é pop3 °¡ Á¦´ë·Î ÀÛµ¿ÇÏ´ÂÁö ¾Ë¾Æº¸µµ·Ï ÇÏ°Ú½À´Ï´Ù. ´ÙÀ½°ú °°ÀÌ shell
¿¡¼ telnet À¸·Î 110 ¹ø Æ÷Æ®¿¡ Á¢¼ÓÀ» ½ÃµµÇØ º¾´Ï´Ù.
shell> telnet localhost 110
ȸ鿡 ´ÙÀ½°ú °°ÀÌ ³ª¿À¸é Pop3 server°¡ Á¤»óÀûÀ¸·Î µ¿ÀÛÇÏ°í ÀÖ´Ù°í
º¼ ¼ö ÀÖ½À´Ï´Ù.
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is ``^]``.
+OK POP3 localhost v7.64 server ready
ÀÌ »óÅ¿¡¼
user "ÀϹݻç¿ëÀÚ °èÁ¤"
¶ó°í Ä¡°í ¿£Å͸¦ Ãĺ¾´Ï´Ù.
±×¸®°í,
pass "°èÁ¤ Æнº¿öµå"
¶ó°í Ä¡°í ¿£Å͸¦ Ĩ´Ï´Ù.
¸¸¾à Á¦´ë·Î ¼³Á¤ÀÌ µÇ¾î ÀÖ´Ù¸é ´ÙÀ½°ú À¯»çÇÑ ³»¿ëÀÌ È¸é¿¡ Ãâ·ÂµÉ°Ì´Ï´Ù.
Connected to localhost (127.0.0.1).
Escape character is ``^]``.
+OK POP3 localhost v7.64 server ready
user userid
+OK User name accepted, password please
pass userpassword
+OK Mailbox open, 0 messages
À§¿Í °°Àº ¸Þ½ÃÁö°¡ ³ª¿À¸é Pop3 ¼¹ö°¡ Á¤»óÀûÀ¸·Î µ¿ÀÛÇÏ´Â °Ì´Ï´Ù.
ÀÌÁ¦´Â quit ¶ó°í Ãļ Á¢¼ÓÀ» ²÷½À´Ï´Ù.
quit
+OK Sayonara
Connection closed by foreign host.
¸¸¾à ÀÌ·¸°Ô µÇÁö ¾ÊÀ»°æ¿ì³ª pop3 server¸¦ À缳ġ ÇÒ°æ¿ì
http://www.eudora.com/qpopper/ ¿¡¼ qpopper ÃֽŠ¹öÀüÀ» ´Ù¿î ¹Þ¾Æ¼
¼³Ä¡ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.
3.3.1 qpoper
´ÙÀ½°ú °°ÀÌ ´Ù¿î·Îµå ¹ÞÀº ÆÄÀÏÀÇ ¾ÐÃàÀ» Ç®°í ÇØ´ç µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
shell> tar xvfz qpopper3.1.2.tar.gz
shell> cd qpopper3.1.2
¸¸¾à shadow password ¹æ½ÄÀ» »ç¿ëÇÏ´Â ½Ã½ºÅÛÀ̶ó¸é configure ¿É¼Ç¿¡
--enable-specialauth ¸¦ Ãß°¡ÇØ ÁÖµµ·Ï ÇÕ´Ï´Ù. ±×¸®°í ÄÄÆÄÀÏÀ» ÇÕ´Ï´Ù.
shell> ./configure --enable-specialauth
shell> make
shell> cd popper
¸ÕÀú »ý¼ºµÈ popper¸¦ º¹»çÇÑ´Ù.
shell> cp popper /usr/local/lib
¸¸ÀÏ /usr/local/lib µð·ºÅ丮°¡ ¾ø´Ù¸é mkdir ¸í·ÉÀ¸·Î »ý¼º½ÃÄÑÁÖ¼¼¿ä.
µð·ºÅ丮°¡ Á¸ÀçÇÒ °æ¿ì mkdir ¸í·ÉÀ» ³»¸± ÇÊ¿ä¾øÀÌ º¹»ç
ÀÛ¾÷¸¸ ÇÏ½Ã¸é µË´Ï´Ù.
ÀÌÁ¦´Â /etc/services ,/etc/inetd.conf ÈÀÏÀ» ¼öÁ¤ÇØ¾ß ÇÕ´Ï´Ù.
/etc/services ÈÀÏ¿¡ ´ÙÀ½°ú °°Àº ºÎºÐÀÌ ÀÖ´ÂÁö È®ÀÎÀ» ÇÏ½Ã°í ¸¸ÀÏ
¾ø´Ù¸é Ãß°¡¸¦ ÇØÁÖ¼¼¿ä.
pop3 110/tcp # popper
/etc/inetd.confÀÇ ÈÀϵµ ´ÙÀ½°ú °°Àº ºÎºÐÀÌ ÀÖ´ÂÁö È®ÀÎÀ» ÇÏ°í
¾øÀ¸¸é Ãß°¡ÇØÁÖ¼¼¿ä.
pop3 stream tcp nowait root /usr/local/lib/popper popper -s
ÀÌÁ¦´Â inetd¸¦ ´ÙÀ½°ú °°ÀÌ restart ÇØÁÝ´Ï´Ù.
shell> /etc/rc.d/init.d/inetd restart
±×¸®°í À§¿¡¼¿Í °°ÀÌ Å×½ºÆ®ÇØ º¸µµ·Ï ÇÕ´Ï´Ù.
shell> telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is ``^]``.
+OK QPOP (version 3.1) at localhost starting.
user userid
+OK Password required for myname.
pass userpassword
+OK myname has 0 messages (0 octets).
quit
+OK Pop server at localhost signing off.
Connection closed by foreign host.
ÀÌ·±½ÄÀ¸·Î ¸Þ¼¼Áö°¡ ³ª¿À¸é Á¦´ë·Î ¼³Ä¡°¡ µÈ °ÍÀÔ´Ï´Ù.
4. netmania mail ¼³Ä¡
netmania mail À» ¼³Ä¡Çϱâ Àü¿¡ MySQL ,apache (with php4),pop3 server ,
smtp server(sendmail or qmail) µîÀÌ ¼³Ä¡°¡ µÇ¾î ÀÖ¾î¾ß ÇÕ´Ï´Ù.
¸¸¾à ÀÌ·±°ÍÀÌ ¼³Ä¡ µÇ¾î ÀÖÁö ¾ÊÀ¸¸é "3. Áغñ" ¸¦ Âü°í Çؼ ÇÁ·Î±×·¥µéÀ»
¼³Ä¡ÇØÁÖ¼¼¿ä.
netmania mail ¿¡¼´Â install.me ¶ó´Â installerÇÁ·Î±×·¥À¸·Î ½±°Ô ¼³Ä¡ÇÒ
¼ö ÀÖ½À´Ï´Ù. ÀÌ installer ´Â perl·Î ¸¸µé¾îÁ® ÀÖ¾î¼ ÀÌ installer·Î ¼³Ä¡Çϱâ
À§Çؼ´Â Perl 5 °¡ ±ò·Á ÀÖ¾î¾ß ÇÕ´Ï´Ù. ´ëºÎºÐÀÇ ¸®´ª½º ½Ã½ºÅÛ¿¡¼´Â
±âº»À¸·Î Perl 5°¡ ±ò·Á ÀÖ½À´Ï´Ù.
ÀÌ ÇÁ·Î±×·¥Àº ´Ü°èº°·Î ±¸¼ºµÇ¾îÀÖ°í ÃÑ 3´Ü°è·Î µÇ¾îÀÖ½À´Ï´Ù.
1´Ü°è => file copy
2´Ü°è => MySQL setting
3´Ü°è => conf ÆÄÀÏ ¼öÁ¤
ÀÌ·± ¼ø¼·Î ¼³Ä¡¸¦ ÇÏ°Ô µË´Ï´Ù.
4.1 install.me¸¦ ÀÌ¿ëÇÑ ¼³Ä¡
¿ì¼± installÀ» Çϱâ Àü¿¡ »ç¿ëÀÚ´Â root ±ÇÇÑÀ¸·Î ¸ðµç ÀÛ¾÷À» ÇØ¾ß ÇÑ´Ù´Â
°ÍÀ» ´Ù½ÃÇѹø »ó±â½ÃÄÑ µå¸®°Ú½À´Ï´Ù. ±×¸®°í mysqlÀÇ root Æнº¿öµå
¶ÇÇÑ ¾Ë°í ÀÖ¾î¾ß ÇÕ´Ï´Ù.
ÀÌ°ÍÀº MySQL ¿¡ database ¿Í user ¸¦ Ãß°¡ Çϱâ À§Çؼ ÀÔ´Ï´Ù.
¸ðµç ÀÛ¾÷Áغñ°¡ ³¡³µÀ¸¸é netmania website (http://www.netmania.org/) ¿¡¼
¹ÞÀº netmania-1.0.1.tar.gzÀÇ ¾ÐÃà°ú tar¸¦ Ç®¾îÁÝ´Ï´Ù.
shell>tar zxvf netmania-1.0.1.tar.gz
±×¸®°í »ý¼ºµÈ µð·ºÅ丮·Î À̵¿ÇÏ¿©¼ ÀνºÅç ÇÁ·Î±×·¥À» ½ÇÇà½Ãŵ´Ï´Ù.
shell> cd netmania-1.0.1
shell> perl install.me
±×·¯¸é ´ÙÀ½°ú °°Àº ÁÖÀÇ ¹®±¸°¡ ³ª¿Ã°Ì´Ï´Ù.
[netmania mail Installer version 1.0.2 ]
[NOTICE!] This install program MUST be run as root, and
to connect to MySQL db, root password of MySQL is needed. If not
quit install program by press control+C.
[Session 1. File copy ]
Please locate the path where netmania mail will be
installed. [/usr/local/netmania]
enter¸¦ Ä¡¸é /usr/local/netmnaia ¿¡ ±ò¸®°Ô µÇ¸ç ¼öÁ¤ÇÏ°í ½ÍÀ¸¸é ¿øÇÏ´Â
µð·ºÅ丮 Æо²¸¦ ÀÔ·ÂÇÏ¸é µË´Ï´Ù.
¼º°øÇϸé "[Session 1. File copy -- END --]" À̶ó´Â ¹®±¸°¡ ³ª¿À°í ´ÙÀ½
´Ü°èÀÎ mysql settingÀÌ ³ª¿À°Ô µË´Ï´Ù.
[Session 1. File copy -- END --]
[Session 2. Mysql Setting ]
Please locate the path where MySQL is installed
[/usr/local/mysql] /usr/local/mysql
<== mysql ÀÌ ¼³Ä¡µÈ µð·ºÅ丮¸¦ Àû¾îÁÖ¸é µË´Ï´Ù.
What is the hostname of MySQL [localhost] ?
<== mysql ÀÌ ¼³Ä¡µÈ server ÁÖ¼Ò¸¦ Àû¾îÁÖ¸é µË´Ï´Ù..
Please type MySQL root password.--> rootpasswd
<== mysql ÀÇ rootÀÇ password ¸¦ Àû¾îÁÝ´Ï´Ù.
We``re going to add new database to MySQL.
Please type new database name [netmania] --> netmania
<== netmania mail ¿¡¼ »ç¿ëÇÒ database name
We``re going to add new user to MySQL.
Please type new user name [webmail] --> webmail
<== netmania mail ¿¡¼ »ç¿ëÇÒ mysql id
Please type password of new user --> ******
<== »õ·Î ¸¸µé idÀÇ Æнº¿öµå
Connecting MySQL to add new database and to add new user...
[Session 2. Mysql Setting -- END --]
À§¿Í °°Àº ¸Þ¼¼Áö°¡ ³ª¿À¸é¼ 3´Ü°è·Î µé¾î°¡°Ô µË´Ï´Ù.
´ÙÀ½°ú °°Àº ¸Þ¼¼Áö°¡ ³ªÅ¸³³´Ï´Ù.
[Session 3. conf file setting ]
conf/db_auth.conf file writing..........
Please type server name of e-mail address
ex)if your email address is ``user@email.com``
, server name is ``email.com`` --> netmania.org
<== »ç¿ëÇÒ email ÁÖ¼ÒÀÇ ¼¹öÀ̸§À» ¾²¸é µË´Ï´Ù.
´ÙÀ½°ú °°Àº ¸Þ¼¼Áö°¡ ³ªÅ¸³ª¸é ³¡À̳³´Ï´Ù.
Installation End.
ÀÌÁ¦´Â apach server ÀÇ document root ¼¼Æø¸ ÇÏ¸é µË´Ï´Ù.
ApacheÀÇ httpd.conf ÆÄÀÏÀ» vi °°Àº ÆíÁý±â·Î ¿¾î¼ ¼öÁ¤ÇÕ´Ï´Ù.
shell> vi /usr/local/apache/conf/httpd.conf
DocumentRoot¸¦ ÁöÁ¤ÇÏ´Â ³»¿ëÀ» ã¾Æ¼ ´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇØ ÁÝ´Ï´Ù.
DocumentRoot "/usr/local/netmania/conf/htdocs"
À§°ú °°ÀÌ ¼öÁ¤ÇÏ¿´À¸¸é ´ÙÀ½°ú °°ÀÌ apache ¸¦ Àç½ÃÀÛ ÇØÁÝ´Ï´Ù.
shell>/etc/rc.d/init.d/httpd restart
¿©±â ±îÁö µÇ¾úÀ¸¸é, install ÀÛ¾÷ÀÌ ³¡ÀÌ ³ª°Ô µË´Ï´Ù.
¸¸ÀÏ ÀÌ¹Ì ±âÁ¸¿¡ »ç¿ëÇÏ´ø À¥¼ºñ½º°¡ ÀÖ¾ú°í À¥¸ÞÀÏ ¼ºñ½º¸¦ Ãß°¡ÇϽôÂ
°æ¿ì¶ó¸é ApacheÀÇ httpd.conf¿¡¼ °¡»óÈ£½ºÆ®¸¦ Àâ¾ÆÁÖ¼Å¾ß ÇÕ´Ï´Ù.
ÀÌ °æ¿ì¶ó¸é httpd.conf¸¦ vi °°Àº ÆíÁý±â¿¡¼ ¿°í ´ÙÀ½°ú °°ÀÌ
¼öÁ¤ÇØÁÖ¾î¾ß ÇÕ´Ï´Ù.
shell>vi /usr/local/apache/conf/httpd.conf
ÆÄÀÏÀ» ¿¬ ´ÙÀ½ °¡»óÈ£½ºÆ®ÀÇ ³»¿ëÀ» ´ÙÀ½°ú °°Àº ³»¿ëÀ»
ÀÔ·ÂÇØ ÁÖ½Ã¸é µË´Ï´Ù.
NameVirtualHost xxx.xxx.xxx.xxx <== ¼¹öÀÇ IP ÁÖ¼Ò¸¦ Àû¾îÁÖ½Ã¸é µË´Ï´Ù.
<== ¿ª½Ã ¼¹öÀÇ IPÁÖ¼Ò¸¦ Àû½À´Ï´Ù.
ServerAdmin admin@netmania.org <== ¼¹ö °ü¸®ÀÚÀÇ À̸ÞÀÏ ÁÖ¼Ò¸¦ Àû½À´Ï´Ù.
DocumentRoot /usr/local/netmania/conf/htdocs
<== À§¿¡¼ »ç¿ëÇÑ DocumentRoot¿Í °°½À´Ï´Ù.
ServerName webmail.netmania.org
<== »õ·Î °¡»óÈ£½ºÆ®·Î ÀâÀ¸·Á´Â ¼¹öÀ̸§À» Àû½À´Ï´Ù.
ErrorLog logs/webmail-netmania-error_log
<== ¿¡·¯·Î±× ÆÄÀÏÀÇ À̸§À» ÁöÁ¤ÇØ ÁÝ´Ï´Ù.
CustomLog logs/en-netmania-access_log common
<== ·Î±× ÆÄÀÏÀÇ À̸§À» ÁöÁ¤ÇØ ÁÝ´Ï´Ù.
À§¿Í °°ÀÌ ¼öÁ¤Çϼ̴ٸé ÀúÀåÇϽðí Apache¸¦ Àç½Ãµ¿ ÇØÁÖ¼Å¾ß ÇÕ´Ï´Ù.
shell>/etc/rc.d/init.d/httpd restart
¸¸ÀÏ httpd.conf¿¡¼ °¡»óÈ£½ºÆ® °ü·Ã ºÎºÐ¸¸À» µû·Î »©¼ º°µµÀÇ ÆÄÀÏ·Î
°ü¸®ÇÏ½Å´Ù¸é º°µµÀÇ ÆÄÀÏÀ» °íÄ¡½Ã¸é µË´Ï´Ù.
4.2 ¼öµ¿ ¼³Ä¡
´Ù¿î¹ÞÀ¸½Å ÆÄÀÏÀÇ ¾ÐÃàÀ» Ǫ½Ã°í »ý¼ºµÈ µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
shell> cd netmania-1.0.1
¸ÕÀú ´ÙÀ½°ú °°ÀÌ ÇÊ¿äÇÑ µð·ºÅ丮¿Í ÆÄÀϵéÀ» º¹»çÇÕ´Ï´Ù.
shell> cp -R htdocs/ conf/ /usr/local/netmania
<== ¼³Ä¡ÇÒ µð·ºÅ丮¸¦ Àû¾îÁÖ½Ã¸é µË´Ï´Ù.
´ÙÀ½ createuser.sql ÆÄÀÏÀ» ¿°í new_database, new_user, new_passwd ¸¦
°¢°¢ Àû´çÇÏ°Ô ¼öÁ¤ÇÕ´Ï´Ù.
shell> cd DB_information
shell> vi createuser.sql
´ÙÀ½°ú °°ÀÌ ÇÏ¿© table¸¦ ±¸¼ºÇÕ´Ï´Ù.
shell> cat mailbox.sql | /usr/local/mysql/bin/mysql --user=
new_user --password=**** new_database
shell> cat mailfolder.sql | /usr/local/mysql/bin/mysql --user=
new_user --password=**** new_database
shell> cat pop3.sql | /usr/local/mysql/bin/mysql --user=
new_user --password=**** new_database
shell> cat profile.sql | /usr/local/mysql/bin/mysql --user=
new_user --password=**** new_database
À̹ø¿¡´Â conf ÆÄÀÏÀ» ¼öÁ¤ÇÕ´Ï´Ù.
shell> cd /usr/local/netmania/conf
shell> cp db_auth.conf.default db_auth.conf
shell> cp webmail.conf.default webmail.conf
shell> vi db_auth.conf
/* Connect to host */
$DB_HOSTNAME = "localhost";
<== MySQL ¼¹ö host nameÀ» Àû½À´Ï´Ù.
/* Database to use */
$DB_DATABASE_NAME = "database_name";
<== À̹ø¿¡ »õ·ÎÃß°¡ÇÑ database nameÀ» Àû½À´Ï´Ù.
/* User for login */
$DB_USER_NAME = "user_name";
<== À̹ø¿¡ »õ·ÎÃß°¡ÇÑ db id À» Àû½À´Ï´Ù.
/* Password to use when connecting to server */
$DB_USER_PASSWD = "user_passwd";
<== À̹ø¿¡ »õ·ÎÃß°¡ÇÑ db id ÀÇ password À» Àû½À´Ï´Ù.
/* Port number to use for connection */
$DB_PORT = ":3306";
/* Socket filename to use for connection */
$DB_PATH_SOCKET = ":/tmp/mysql.sock";
´ÙÀ½°ú °°Àº µð·ºÅ丮¸¦ Ãß°¡ÇÏ°í Æ۹̼ÇÀ» º¯°æÇÕ´Ï´Ù.
nobody.nobody ·Î º¯°æÇÑ °ÍÀº apache ½ÇÇà Æ۹̼ǰú ÀÏÄ¡ ½ÃÅ°±â
À§ÇÑ ÀÛ¾÷ÀÔ´Ï´Ù. ¸¸¾à apache°¡ ´Ù¸¥ Æ۹̼ÇÀ¸·Î ÀÛµ¿ÇÏ°í ÀÖÀ¸¸é
±× Æ۹̼ǿ¡ ¸Â°Ô ¼öÁ¤ÇÏ½Ã¸é µË´Ï´Ù.
shell> mkdir /usr/local/netmania/maildata
shell> chown -R nobody.nobody /usr/local/netmania/maildata
ÀÌÁ¦´Â apache server ÀÇ document root ¼¼Æø¸ ÇÏ¸é µË´Ï´Ù.
shell> vi /usr/local/apache/conf/httpd.conf
DocumentRoot "/usr/local/netmania/conf/htdocs"
´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÏ°í apache ¸¦ Àç½ÃÀÛ ÇÏ½Ã¸é µË´Ï´Ù.
ÃàÇÏÇÕ´Ï´Ù! ¿©±â±îÁö Àß µÇ¾ú´Ù¸é install ÀÛ¾÷ÀÌ ³¡ÀÌ ³°Ì´Ï´Ù.
³×ƼÁð ÀÇ°ß ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.)
À̸§
³»¿ë
Æò°¡Çϱâ
µµ¹è¹æÁöÅ°