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> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=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> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
☞완이의 설치가이드~
1.소스파일 다운
mysql-5.0.27.tar.gz
2.압축해제
# tar zxvf mysql-5.0.27.tar.gz
3.환경설정
간단히 쉘 스크립트로 작성해보자..(wans_myslq5.sh 파일의 내용)
#/bin/bash
cd ./mysql-5.0.27
export PATH=/usr/local/mysql5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/mysql5/lib:/usr/local/mysql5/lib/mysql:$LD_LIBRARY_PATH
export LD_RUN_PATH=$LD_LIBRARY_PATH
./configure \
--prefix=/usr/local/mysql5 \
--localstatedir=/usr/local/mysql5/data \
--with-charset=ujis \
--with-extra-charsets=all \
--with-mysqld-user=mysql \
--with-tcp-port=3306 \
--enable-thread-safe-client \
--enable-local-infile
cd ./mysql-5.0.27
export PATH=/usr/local/mysql5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/mysql5/lib:/usr/local/mysql5/lib/mysql:$LD_LIBRARY_PATH
export LD_RUN_PATH=$LD_LIBRARY_PATH
./configure \
--prefix=/usr/local/mysql5 \
--localstatedir=/usr/local/mysql5/data \
--with-charset=ujis \
--with-extra-charsets=all \
--with-mysqld-user=mysql \
--with-tcp-port=3306 \
--enable-thread-safe-client \
--enable-local-infile
wans_mysql5.sh |
# sh wans_mysql5.sh
4. 컴파일 한다
# cd ./mysql-5.0.27
# make
# make
5. 인스톨
# make install
6. 옵션파일을 설정하고 싶다면 support-files디렉트로 안에 있는 샘플파일을 복사해서 이용하자!
# cp support-files/my-medium.cnf /etc/my.cnf
7. 설치된 디렉트로로 이동
# cd /usr/local/mysql5
8. 시스템 데이터베이스 생성
# bin/mysql_install_db --user=mysql
9. MySQL 서버와 데이터 디렉토리의 퍼미션 설정
# chown -R root .
# chown -R mysql data
# chgrp -R mysql .
# chown -R mysql data
# chgrp -R mysql .
10. Mysql 실행
# bin/mysqld_safe --user=mysql &
11. 리눅스부팅시 자동으로 MySQL 실행하기
매번 부팅시마다 10번처럼 MySQL을 실행하기 귀찮다.
부팅시 자동으로 실행시키는 방법은 아래 글 참조!!
2009/08/03 - [study/MySQL] - 리눅스(데비안) 부팅시 자동으로 MySQL 실행시키는 방법
'study > MySQL' 카테고리의 다른 글
| MySQL 유저 추가 및 DB설정 (0) | 2009/08/04 |
|---|---|
| MySQL Root 패스워드 설정 및 변경 (0) | 2009/08/03 |
| 리눅스(데비안) 부팅시 자동으로 MySQL 실행시키는 방법 (0) | 2009/08/03 |
| 리눅스(데비안)에서 MySQL 소스로 설치하기 (0) | 2009/08/03 |
| Mysql 소스 컴파일 설치시 에러 해결(checking for termcap functions library... configure: error: No curses/termcap library found.) (0) | 2009/07/27 |
| MySQL Auto_increase 값 초기화 (0) | 2009/01/22 |
| Mysql 환경설정 - 다국어 개발환경(utf-8)일 경우 (0) | 2009/01/20 |

wans_mysql5.sh
댓글을 달아 주세요