'CentOS 5.3'에 해당되는 글 1건
- 2009/09/21 CentOS 5.3 에서 MySQL 5.1 컴파일 설치. (1)
CentOS 5.3 에서 MySQL 5.1 컴파일 설치.
BSD / Linux 2009/09/21 14:04
1. 사용자 및 그룹 추가
5. mysql 기본 데이터베이스 생성
수고 하셨습니다.
# groupadd -g 27 mysql2. 최적화 컴파일을 위한 준비작업
# useradd -M -c "MySQL Server" -g mysql -s /bin/false -u 27 -d /opt/mysql mysql
# CFLAGS="-O3 -mpentiumpro -mstack-align-double"3. configure
# CXX=gcc
# CXXFLAGS="-O3 -mpentiumpro -mstack-align-double -felide-constructors -fno-exceptions -fno-rtti"
# ./configure \4. make && make install
--prefix=/opt/mysql \
--localstatedir=/opt/mysql/data \
--with-unix-socket-path=/tmp/mysql.sock \
--sysconfdir=/etc \
--with-mysqld-user=mysql \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static \
--without-debug \
--enable-assembler \
--with-gnu-ld \
--with-big-tables \
--with-plugins=innobase \
--with-charset=euckr \
--with-collation=euckr_korean_ci \
--with-extra-charsets=all
# make && make install $$ echo $?만약 여기서 결과가 0으로 안나오면 망한거니깐 뭐가 잘못됐는지 확인하고 처음부터 다시.
5. mysql 기본 데이터베이스 생성
# cd /opt/mysql/bin/6. 기본 설정파일 복사 및 init 스크립트 복사.
# ./mysql_install_db
# cd /opt/mysql/share/mysql/7. 시작 프로그램 등록
# cp -p my-medium.cnf /etc/my.cnf
# cp -p mysql.server /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld8. 공유 라이브러리 등록
# chkconfig --level 345 mysqld on
# cd /opt/mysql/lib/mysql/9. localstatedir에 mysql 권한 상속
# pwd >> /etc/ld.so.conf
# ldconfig
# chown mysql.mysql -R /opt/mysql/data/10. 서버 시작
# /etc/rc.d/init.d/mysqld start
수고 하셨습니다.

이올린에 북마크하기
이올린에 추천하기


