Á¦ 1° MySQL ¼³Ä¡Çϱâ
MySQLÀº DBÁß °·ÂÇÑ ±â´ÉÀ»
¹ßÈÖÇÑ´Ù. ƯÈ÷
LINUX ¼¹ö
¿¡¼ Apach¿Í
PHP¿Í ¿¬µ¿Çؼ Á¤¸»·Î ¸·°ÇÑ ±â´ÉÀ» ¹ßÈÖÇÑ´Ù. ¹°
·Ð
Oracleº¸´Ù´Â ±â´É»ó¿¡¼± Á¦¾àÀÌ Á» ÀÖ±â´Â ÇÏÁö¸¸ Áß¼Ò±Ô¸ðÀÇ »çÀÌÆ®¿¡¼
µü
Á¦°ÝÀÌ´Ù°í ÇÒ¼ö ÀÖ´Ù. ÀÛÁö¸¸ ºü¸£°í °·ÂÇÑ ±â´ÉÀ» ¿øÇÏ´Ù¸é MySQL
¸¦ »ç¿ëÇϱ⸦
°·ÂÈ÷ ±ÇÀåÇÑ´Ù.
MySQL¿¡¼ ÇÑ±Û Ä³¸¯ÅÍ ¼ÂÀ¸·Î Á¤·ÄÀ» Çϱâ À§ÇØ
¼´Â ¼Ò½º ÄÄÆÄÀÏÀ» ÇØ¾ß ÇÑ´Ù. Apache,PHP¸¦
ÇÔ²² ¿¬µ¿ÇÏ·Á¸é Á» ´õ º¹ÀâÇÑ °úÁ¤À» °ÅÃľ߸¸ ÇÑ´Ù. ¿©±â¼´Â ÀÏ´Ü
Apache,PHP
´Â Á¦¿ÜÇÏ°í »ý°¢ÇÑ´Ù. (ÃßÈÄ¿¡ ±âȸ°¡ µÈ´Ù¸é APM¿¬µ¿¿¡ ´ëÇØ¼ °ÁÂ
¸¦ ¿Ã¸®°Ú´Ù. ¼³Ä¡ÇÏ´Â
µ¥´Â ·¹µåÇÞ °è¿ÀÇ 6.0 ÀÌ»óÀÇ LINUX ¶ó¸é ÀüÇô ¹®Á¦°¡ ¾ø
´Ù.
(1) ¼³Ä¡ Àü¿¡ ÁغñÇÒ »çÇ×
MySQL ÃֽйöÀüÀÇ ¼Ò½º°¡ ÇÊ¿äÇÏ
´Ù. ¼Ò½º´Â
¾Æ·¡ ÁÖ¼Ò¿¡¼ ´Ù¿î·Îµå¹ÞÀ»¼ö ÀÖ´Ù.
http://www.mysql.org">http://www.mysql.org
ÀÌ ±ÛÀ» ¾²°í ÀÖ´Â ÇöÀç ÃֽйöÀüÀº
3.22.32 ¹öÀüÀÌ´Ù. /root/sw(ÀÓÀÇÀÇ
¾î¶² µð·ºÅ丮µµ °¡´ÉÇÏ´Ù) ¿¡ ¼Ò½º¹èÆ÷ÆÇÀÌ
ÀÖ´Ù°í °¡Á¤ÇÑ´Ù
1.¾ÐÃàÀ» Ǭ´Ù
# cd /root/sw
# tar -xvzf
mysql-3.22.32.tar.gz
# tar
-xvzf mysql-3.22.32.tar.gz
mysql-
3.22.32/ mysql-3.22.32/Makefile.in mysql-
3.22.32/README mysql-3.22.32/stamp-h.in mysql-
3.22.32/Makefile.am
... ... ...
mysql-
3.22.32/support-files/mysql.spec.sh mysql-3.22.32/support-
files/my-example.cnf.sh mysql-3.22.32/support-files/mysql-log-
rotate.sh mysql-3.22.32/support-files/mysql.server.sh mysql-
3.22.32/support-files/binary-configure.sh |
±×·¯¸é mysql-3.22.32¶ó´Â µð·ºÅ丮°¡ »ý
¼ºµÈ´Ù.
2.¾ÐÃàÀÌ Ç®¸° µð·ºÅ丮·Î ÀÌ
µ¿ÇÑ´Ù.
# cd mysql-3.22.32
3.configure ½ºÅ©¸³Æ® ½ÇÇà
# ./configure --
prefix=/usr/local/mysql --
localstatedir=/usr/local/mysql/data
--with-charset=euc_kr cofigure ¸¦
½ÇÇàÇÑ´Ù. »ç¿ë°¡´ÉÇÑ ¿É¼ÇÀ» ÀÚ¼¼È÷ º¸·Á¸é --help ¸¦ ºÙ¿©ÁÖ¸é
µÈ´Ù.
#
./configure --help
Usage: configure [options] [host]
Options: [defaults in
brackets after descriptions] Configuration: --cache-
file=FILE
cache test results in FILE --
help  
; print this message
--no-
create &nb
sp; do not create output files --quiet, --
silent
do not print `checking...' messages --
version &n
bsp; print the
version of autoconf that created
configure ... |
--
prefix :
ÄÄÆÄÀÏÀÌ ³¡³ ÈÄ ÆÄÀϵéÀÌ ÀνºÅçµÇ´Â µð·ºÅ丮¸¦ Á¤ÇØÁØ
´Ù. --with-
charset :
Á¤·Ä¿¡ »ç¿ëµÉ ij¸¯ÅÍ ¼ÂÀ» Á¤ÇØ ÁØ´Ù. ÇѱÛÁ¤·ÄÀ» À§ÇØ ÇÊ¿äÇÏ
´Ù. --localstatedir
: µ¥ÀÌŸº£À̽º°¡ ÀúÀåµÉ À§Ä¡¸¦ ÁöÁ¤ÇØÁØ´Ù.
4.ÄÄÆÄÀÏÇϱâ
ÀÌÁ¨ ÄÄÆÄÀÏÇÒ Áغñ°¡ ´Ù ³¡³µ´Ù. ÄÄ
Ç»ÅÍ»ç¾ç¿¡
µû¶ó ´Ù¸£Áö¸¸ make Çϴµ¥ ÆæÆ¼¾ö ¼¿·¯·Ð 466Mhz ¿¡¼ ¾à 8ºÐ Á¤µµ °É·È
´Ù.
# make
# make
make
all-recursive make[1]: Entering directory `/tmp/mysql-
3.22.32' Making all
in Docs make[2]: Entering directory `/tmp/mysql-
3.22.32/Docs' make[2]:
Nothing to be done for
`all'. ... ... ... |
5.ÀνºÅçÇϱâ
ÄÄÆÄÀÏ¿¡ ÀÇÇØ ¸¸µé¾îÁø ÆÄÀϵéÀ» ÀνºÅçÇÏ
ÀÚ
# make install
# make
install
Making
install in Docs make[1]: Entering directory
`/tmp/mysql-3.22.32/Docs' make[2]: Entering directory
`/tmp/mysql-3.22.32/Docs' make[2]: Nothing to be done for
`install-exec-
am'. /bin/sh ../mkinstalldirs /usr/local/mysql/info mkdir
/usr/local/mysql ... ... ... make[2]: Leaving directory
`/tmp/mysql-3.22.32' make[1]: Leaving directory
`/tmp/mysql-3.22.32'
#
|
6. ±ÇÇÑ Å×ÀÌ
ºí ÃʱâÈ : mysql_install_db
½ÇÇà
À§¿¡¼ ÀνºÅçµÈ MySQL µð·ºÅ丮·Î
À̵¿ÇÑ´Ù.
# cd
/usr/local/mysql
MySQL µ¥ÀÌÅͺ£À̽ºÀÇ ±ÇÇÑÀ» °ü¸®ÇÏ´Â
ySQL¿¡ Å×À̺íÀ» »ý¼ºÇÏ´Â ½ºÅ©¸³Æ®¸¦ ½ÇÇà
ÇÑ´Ù.
# ./bin/mysql_install_db
# ./bin/mysql_install_db
Creating db
table Creating host table Creating user table Creating func
table Creating tables_priv table Creating columns_priv
table
To start mysqld at boot
time you have to copy
support-files/mysql.server to the right place for your
system
PLEASE REMEMBER TO SET A
PASSWORD FOR THE MySQL root USER
! This is done with: /usr/local/mysql/bin/mysqladmin -u root
password
'new-password' See the manual for more instructions.
Please report any
problems with the /usr/local/mysql/bin/mysqlbug
script!
...
[root@localhost mysql]
# |
ÀÚ ±×·³ Çѹø MySQL¸¦ ½ÇÇà
ÇØº¸ÀÚ
# /usr/local/mysql/bin/safe_mysql
&
Reading table information for completion
of table and column
names You can turn off this feature to get a quicker startup
with -A
Welcome to the MySQL
monitor. Commands end with ; or \g. Your
ySQL connection id is 5 to server version: 3.22.32
Type 'help' for
help.
mysql>
|
À§¿Í °°Àº ³»¿ëÀÌ ³ª¿Ô´Ù¸é ¼³Ä¡¿¡ ¼º°ø
ÇÑ °ÍÀÌ´Ù.
ÃàÇϵ帳´Ï´Ù.
ÀÌ»óÀ¸·Î MySQLÀÇ ÄÄÆÄÀÏ ÀÛ¾÷Àº ¸ðµÎ
³¡³µ´Ù. ¹°·Ð
´Ù¸¥ ¹æ¹ýµµ ÀÖ´Ù. ´ÙÀ½ °Á¿¡¼ MySQL¿¡ ´ëÇØ ÀÚ¼¼È÷ ´Ù·ê
°ÍÀÌ´Ù.
|