1. centos 설치후 업데이트 및 apm 컴파일전 필요 라이브러리 설치
1-1) 기본 라이브러리 설치 내역
root@localhost tmp]# yum -y install gd gd-devel freetype freetype libpng libmng* libtiff* libjpeg* libc-client* giflib*
root@localhost tmp]# yum -y ncurses*
root@localhost tmp]# yum -y gcc-c++
root@localhost tmp]# yum -y flex
root@localhost tmp]# yum -y libxml*
root@localhost tmp]# yum -y gdbm-devel
root@localhost tmp]# yum list gcc-c++
root@localhost tmp]# yum -y update // 나머지 머 필요한거 업뎃
2. openssl compile
root@localhost tmp]# wget http://openssl.org/source/openssl-0.9.8e.tar.gz
압축풀고
root@localhost tmp]# ./config --prefix=/usr/local --openssldir=/usr/local/openssl
쭉쭉~
root@localhost tmp]# make
root@localhost tmp]# make install
3. mysql download & compile
3-1) mysql download
root@localhost tmp]#wget http://ftp.linux.co.kr/pub/mysql/적당한 mysql버전선택해서 download
3-2)
root@localhost tmp]# groupadd mysql
root@localhost tmp]# vi /etc/group // mysql:x:501 확인
root@localhost tmp]# useradd -m -s /sbin/nologin -g mysql -d /usr/local/mysql/data mysql
root@localhost tmp]# tar -xvzf mysql-5.xxxxxxxx
root@localhost tmp]# groupadd mysql
root@localhost tmp]# useradd -g mysql mysql
root@localhost tmp]# cd mysql디렉토리
3-3) compile
root@localhost tmp]# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-unix-socket-path=/var/lib/mysql/mysql.sock --with-innodb --with-big-tables -with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static -without-debug --without-docs --without-bench --with-mysqld-usr="mysql" --with-charset=utf8 --enable-thread-safe-client
root@localhost tmp]# make
root@localhost tmp]# make install
3-4) my.cnf 복사 수정 (innodb 사용시 innodb관련된 주석 제거 뭐..알아서 튜닝하셈
root@localhost tmp]# cp mysql디렉토리/support-files/my-medium.cnf /etc/my.cnf
root@localhost tmp]# vi /etc/my.cnf
ex)
#innodb_data_home_dir =
#innodb_data_file_apth =
#innodb_log_group_home_dir =
#innodb_log_arch_dir =
#innodb_buffer_pool_size =
#innodb_additional_mem_pool_size =
#innodb_log_file_size =
#innodb_log_buffer_size =
#innodb_flush_log_at_trx_commit =
#innodb_lock_wait_timeout =
등등등 주석 제거
3-5) mysql_install_db
root@localhost tmp]#/usr/local/mysql/bin/mysql_install_db
[root@localhost bin]# ./mysql_install_db
Installing MySQL system tables...
130820 18:20:27 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-federated'
130820 18:20:27 [ERROR] Aborting
130820 18:20:27 [Warning] Forcing shutdown of 1 plugins
130820 18:20:27 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete
[root@localhost bin]# vi /etc/my.cnf
# Disable Federated by default
#skip-federated <~~~~ 요놈 주석처리
[root@localhost bin]# ./mysql_install_db
Installing MySQL system tables...
[root@localhost bin]# 머..설치 끝난듯..
[root@localhost bin]# ./mysqld_safe &
최초 기동시 에러날때..
file './mysql-bin.index' not found (errcode 13)
이런 에러 나면
[root@localhost bin]# chown -R mysql:mysql data // data 디렉토리의 소유자, 그룹을 mysql로 변경
[root@localhost bin]# ./mysqld_safe &
데몬올라가면 성공!!
접속테스트 ㄱㄱ
[root@localhost bin]# vi /etc/rc.d/rc.local
/usr/local/mysql/bin/mysqld_safe &
부팅하고 바로 mysql데몬 올리기
'program' 카테고리의 다른 글
2 (0) | 2015.12.28 |
---|---|
리눅스 시간 동기화 (0) | 2014.02.26 |
리눅스 압축 (0) | 2014.02.21 |
MySQL Query (0) | 2014.02.19 |
javascript 정규식 (0) | 2014.02.18 |