메뉴얼을 보면 이렇게 나와있습니다. shell> groupadd mysql shell> useradd -g mysql mysql shell> cd /usr/local shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - shell> ln -s mysql-VERSION-OS mysql shell> cd mysql shell> scripts/mysql_install_db shell> chown -R root /usr/local/mysql shell> chown -R mysql /usr/local/mysql/data shell> chgrp -R mysql /usr/local/mysql shell> chown -R root /usr/local/mysql/bin shell> bin/safe_mysqld --user=mysql & 순서대로 하시면 설치가 바로 됩니다. p .s 소스도 PGCC 로 컴파일하면 20~30%의 성능향상이 있다는 보고입니다.() : 설날을 투자해서.. mysql 을 업그레이드 해보자.. 하고 문서를 수집하던중 : : " Binary 를 받아서 설치하십시요. 당신이 컴파일한 코드는 아무리 노력 : 해도 최적화 되지 않습니다 mysql 에서도 binary 가 가장 최적화 되었 : 다고 합니다" : : 라는 글을 보았다. 아무래도 그렇겠지. 만든놈이 컴파일한게 ; : 제일 좋지 않을까.. : : 바이너리를 다운받았다. 허나 바이너리를 어떻게 설치해야 하는가.. : 막막했다. binary 를 /usr/local/mysql 로 옮겼다 쳐도, with-charset : 옵션이라던가, localstatedir 즉 db 가 위치하는곳은 어떻게정하는지.. : 잘 모르겠다. : : 그래서 mysql 홈페이지를 뒤지던중..(메뉴얼 찾기가 참 힘들더라..) : MySQL ab 라고 하는 집단(아마도 개발이나 컴파일을 맡는 집단?) : 에서 컴파일을 했다고 하길래..(binary 배포판을) : : 쭉 읽어보니 그쪽에서 컴파일한 옵션을 발견할수 있었다. : 이대로 한다면 내가 원하는 옵션을 추가하여 바이너리와 거의 동급의 : 성능을 기대할수 있겠군.. 하는 생각이 문득 들었다. : (바이너리의 성능이 최고라고들 하므로) : : 물론 보신분은 많겠지만 유용한 자료일것이라 생각되어 이곳에 올리기로 : 했다. (못되도 1원짜리는 되지않을까 안되면 5전이라도..) : : Linux 2.4.xx i386 with gcc 2.95.3 : CFLAGS="-O2 -mcpu=pentiumpro" CXX=gcc CXXFLAGS="-O2 -mcpu=pentiumpro -felide-constructors" ./configure --prefix=/usr/l : ocal/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disabl : e-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static Linux 2.4.xx ia64 with ecc (Intel C++ Ita : nium Compiler 7.0) CC=ecc CFLAGS=-tpp1 CXX=ecc CXXFLAGS=-tpp1 ./configure --prefix=/usr/local/mysql --with-extra-chars : ets=complex --enable-thread-safe-client --enable-local-infile Linux 2.4.xx alpha with ccc (Compaq C V6.2-505 / Compaq : C++ V6.3-006) CC=ccc CFLAGS="-fast -arch generic" CXX=cxx CXXFLAGS="-fast -arch generic -noexceptions -nortti" ./confi : gure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with- : mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared --disable-shared Linux 2.2.xx sparc with egcs 1.1.2 CC=gc : c CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-excepti : ons -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enabl : e-local-infile --enable-assembler --disable-shared Linux 2.4.xx s390 with gcc 2.95.3 CFLAGS="-O2" CXX=gcc CXXFLAGS="-O : 2 -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-clien : t --enable-local-infile --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static Sun Solar : is 2.8 sparc with gcc 3.2 CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -f : elide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --en : able-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=no --with-named-curses-libs=-lcur : ses --disable-shared Sun Solaris 2.9 sparc with gcc 2.95.3 CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAG : S="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql - : -with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-curses- : libs=-lcurses --disable-shared Sun Solaris 2.9 sparc with cc-5.0 (Sun Forte 5.0) CC=cc-5.0 CXX=CC ASFLAGS="-xarch=v9" : CFLAGS="-Xa -xstrconst -mt -D_FORTEC_ -xarch=v9" CXXFLAGS="-noex -mt -D_FORTEC_ -xarch=v9" ./configure --prefix=/usr/l : ocal/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-n : amed-z-libs=no --enable-thread-safe-client --disable-shared IBM AIX 4.3.2 ppc with gcc 3.2.1 CFLAGS="-O2 -mcpu=powerpc : -Wa,-many " CXX=gcc CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure : --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-name : d-z-libs=no --disable-shared IBM AIX 5.1.0 ppc with gcc 3.2.1 CFLAGS="-O2 -mcpu=powerpc -Wa,-many" CXX=gcc CXXFLAGS="- : O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --wit : h-extra-charsets=complex --with-server-suffix="-pro" --enable-thread-safe-client --enable-local-infile --with-named-z- : libs=no --disable-shared --with-innodb HP-UX 10.20 pa-risc1.1 with gcc 3.1 CFLAGS="-DHPUX -I/opt/dce/include -O3 -fPIC : " CXX=gcc CXXFLAGS="-DHPUX -I/opt/dce /include -felide-constructors -fno-exceptions -fno-rtti -O3 -fPIC" ./configure - : -prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-pthrea : d --with-named-thread-libs=-ldce --with-lib-ccflags=-fPIC --disable-shared HP-UX 11.11 pa-risc2.0 with aCC (HP ANSI C+ : + B3910B A.03.33) CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64 ./configure --prefix=/usr/local/mysql --with-extra-charset : s=complex --enable-thread-safe-client --enable-local-infile --disable-shared Apple MacOS X 10.2 powerpc with gcc 3.1 C : C=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exc : eptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --e : nable-local-infile --disable-shared FreeBSD 4.7 i386 with gcc 2.95.4 CFLAGS=-DHAVE_BROKEN_REALPATH ./configure --prefi : x=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler : --with-named-z-libs=not-used --disable-shared URL 은 다음과 같다. http://www.mysql.com/doc/en/MySQL_binaries.htm : l : 다른 Third-party 머쉰에서의 컴파일 옵션도 다루고 있었다. SCO Unix 3.2v5.0.6 i386 with gcc 2.95. : 3 CFLAGS="-O3 -mpentium" LDFLAGS=-static CXX=gcc CXXFLAGS="-O3 -mpentium -felide-constructors" ./configure --prefix=/u : sr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no : --enable-thread-safe-client --disable-shared Caldera Open Unix 8. i386 with CC 3.2 CC=cc CFLAGS="-O" CXX=CC ./confi : gure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with- : named-z-libs=no --enable-thread-safe-client --disable-shared Compaq Tru64 OSF/1 V5.1 732 alpha with cc/cxx (Compaq C V : 6.3-029i / DIGITAL C++ V6.1-027) CC="cc -pthread" CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed -speculate al : l" CXX="cxx -pthread" CXXFLAGS="-O4 -ansi_alias -fast -inline speed -speculate all -noexceptions -nortti" ./configure : --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-prefi : x=/usr/local/mysql --with-named-thread-libs="-lpthread -lmach -lexc -lc" --disable-shared --with-mysqld-ldflags=-all-s : tatic SGI Irix 6.5 IP32 with gcc 3.0.1 CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXXFLAGS="-O3 -fno-omit-frame-point : er -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex : --enable-thread-safe-client --enable-local-infile --disable-shared 이후에 나온 컴파일 옵션. gcc 의 버전 : 에 유의하자. Linux 2.2.x with x686 with gcc 2.95.2 CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro - : felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld- : ldflags=-all-static --disable-shared --with-extra-charsets=complex SunOS 4.1.4 2 sun4c with gcc 2.7.2.1 CC=gcc CXX=gcc : CXXFLAGS="-O3 -felide-constructors" ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=comp : lex --enable-assembler SunOS 5.5.1 (and above) sun4u with egcs 1.0.3a or 2.90.27 or gcc 2.95.2 and newer CC=gcc CFLAGS : ="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --w : ith-low-memory --with-extra-charsets=complex --enable-assembler SunOS 5.6 i86pc with gcc 2.8.1 CC=gcc CXX=gcc CXXFLAGS : =-O3 ./configure --prefix=/usr/local/mysql --with-low-memory --with-extra-charsets=complex BSDI BSD/OS 3.1 i386 with g : cc 2.7.2.1 CC=gcc CXX=gcc CXXFLAGS=-O ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex BSDI BSD/OS : 2.1 i386 with gcc 2.7.2 CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-extra-charsets=comple : x AIX 2 4 with gcc 2.7.2.2 CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-extra-charsets=com : plex 다음과 같은 말도 덧붙였다. If you want to compile a debug version of MySQL, you should add --with-debu : g or --with-debug=full to the preceding configure lines and remove any -fomit-frame-pointer options. 그리고 아래 : 에 코멘트를 달수있는데, 한국사람이 다녀갔다는 말을 한마디 씩 하면 어떨까 ? : 나도 지금 이 글을 쓰면서 위의 옵션으로 컴파일 하고있는 중이다. : : 아참, 혹시 저 옵션을 사용할줄 모르는가? : : export 옵션으로 하면된다. 예를 들면 : : CC="뭐뭐다" : export CC : : 이런식이다. : : CXXFLAGS 는 c++ 의 Flag 옵션이다. : : : -- : 커널컴파일초보가.. --