ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Install Mysql (source version)
    └ Mysql 2007. 7. 10. 15:26

    Install Mysql (source version)


    설치파일을 다운받아보자~

    [root@willow_linux src]# wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.41.tar.gz/from/http://mysql.new21.com/
    --15:20:47-- http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.41.tar.gz/from/http://mysql.new21.com/
    Resolving dev.mysql.com... 213.136.52.29
    Connecting to dev.mysql.com|213.136.52.29|:80... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: http://mysql.new21.com/Downloads/MySQL-5.0/mysql-5.0.41.tar.gz [following]
    --15:20:47-- http://mysql.new21.com/Downloads/MySQL-5.0/mysql-5.0.41.tar.gz
    Resolving mysql.new21.com... 211.115.64.250
    Connecting to mysql.new21.com|211.115.64.250|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 24083795 (23M) [application/x-gzip]
    Saving to: `mysql-5.0.41.tar.gz'
    100%[=======================================>] 24,083,795 2.13M/s in 11s
    15:20:58 (2.16 MB/s) - `mysql-5.0.41.tar.gz' saved [24083795/24083795]

    [root@willow src]# tar xzvf mysql-5.0.45.tar.gz

    설치전에 gcc패키지가 설치되어 있는지 확인하자.

    [root@willow_linux local]# yum list installed | grep gcc
    libgcc.i386                              4.1.2-13.fc6           installed

    없다면 설치해주시고~

    [root@willow_linux local]# yum install gcc
    ~ 생략 ~

    =============================================================================
    Package                 Arch       Version          Repository        Size
    =============================================================================
    Installing:
    gcc                     i386       4.1.2-13.fc6     updates           5.2 M
    Installing for dependencies:
    glibc-devel             i386       2.5-10.fc6       updates           2.0 M
    glibc-headers           i386       2.5-10.fc6       updates           605 k
    libgomp                 i386       4.1.2-13.fc6     updates            75 k
    Transaction Summary
    =============================================================================
    Install      4 Package(s)
    Update       0 Package(s)
    Remove       0 Package(s)

    ~ 생략 ~

    설치는 언제나 처럼 manual  에 있는 그대로 따라한다.

    The basic commands that you must execute to install a MySQL source
    distribution are:
        shell> groupadd mysql
        shell> useradd -g mysql mysql
        shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
        shell> cd mysql-VERSION
        shell> ./configure --prefix=/usr/local/mysql
        shell> make
        shell> make install
        shell> cp support-files/my-medium.cnf /etc/my.cnf
        shell> cd /usr/local/mysql
        shell> chown -R mysql .
        shell> chgrp -R mysql .
        shell> bin/mysql_install_db --user=mysql
        shell> chown -R root .
        shell> chown -R mysql var
        shell> bin/mysqld_safe --user=mysql &

    configure 할때 추가하고자 하는 옵션을 넣어서 하자.
    ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=utf8 --with-extr-charsets=euckr --with-mysqld-user=mysql --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock

    aDD  
    OS 를 Pedora Core 6 에서 CentOS 5 로 바꿨더니 필요한 패키지가 없었다.

    configure 시 오류 메세지
    checking for termcap functions library... configure: error: No curses/termcap library found

    기본 ncurses가 깔려있어도 오류가 나서 devel버젼을 설치했다.
    [root@willow mysql-5.0.45]# yum -y install ncurses-devel
    ~ 생략~
    =============================================================================
    Package                 Arch       Version          Repository        Size
    =============================================================================
    Installing:
    ncurses-devel           i386       5.5-24.20060715  base              1.6 M
    ~ 생략 ~

    다시 configure 시도~ 성공~

    MySQL has a Web site at http://www.mysql.com/ which carries details on the
    latest release, upcoming features, and other information to make your
    work or play with MySQL more productive. There you can also find
    information about mailing lists for MySQL discussion.

    Remember to check the platform specific part of the reference manual for
    hints about installing MySQL on your platform. Also have a look at the
    files in the Docs directory.

    Thank you for choosing MySQL!

    Important   삽질 (쓰기 민망하다.)
    소스디렉토리를 prefix (/usr/local/mysql) 에 풀어놓고..거기서 make 를 했다.
    당연히..계속 에러날 수 밖에.. OTL

    소스디렉토리는 설치디렉토리가 아닌곳에 풀어라. 

    '└ Mysql' 카테고리의 다른 글

    Mysql Triggers  (0) 2007.11.21
    MySQL DataBase 서버 튜닝 - Connection과 Memory  (0) 2007.04.27
    Install Mysql (binary version)  (0) 2007.01.05

    댓글

Designed by Tistory.