[centos]APM 설치 2 - 설치하기전 필요 패키지 설치
[centos]APM 설치 3 - mysql 5.6 설치
[centos]APM 설치 4 - apache 2.4.7 설치
[centos]APM 설치 5 - php 5.3.28 설치
[centos]APM 설치 6 - 설시치 문제점 해결책
첫번재 설치 순서인 mysql을 설치 하겠습니다.
설치버전 : mysql 5.6
다운경로: http://dev.mysql.com/downloads/mysql/
Select Platform : Source Code 선택
Generic Linux (Architecture Independent), Compressed TAR Archive (mysql-5.6.15.tar.gz) 다운
위의 내역처럼 다운받아 FTP로 업로드하여 진행하여도 됩니다.
지금 설치는 리눅스에서 바로 다운받아 설치 진행하겠습니다. 보안상의 이유로 mysql.sock의tmp폴더 위치는 /usr/local/mysql/tmp 변경하여 설정하였습니다.
# useradd -M -s /bin/false mysql (계정생성)
# cd /usr/local/src
# wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.17.tar.gz
# tar xvpf mysql-5.6.17.tar.gz
# cd mysql-5.6.15
# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql --socket=/usr/local/mysql/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DMYSQL_DATADIR=/usr/local/mysql/data -DENABLED_LOCAL_INFILE=1 DWITH_INNOBASE_STORAGE_ENGINE=1 .
# make && make install
# cp support-files/mysql.server /etc/init.d/mysqld
# rm -rf /etc/my.cnf (기존 my.cnf 설정 파일 삭제 )
# mkdir /usr/local/mysql/tmp ( mysql.sock 생성을 윈한설정)
# vi /etc/my.cnf ( 새로운 기본 my.cnf 설정 생성 )
[client]
socket = /usr/local/mysql/tmp/mysql.sock
[mysqld]
datadir=/usr/local/mysql/data
socket = /usr/local/mysql/tmp/mysql.sock
tmpdir = /usr/local/mysql/tmp
<---내역 추가
# chmod 755 /etc/init.d/mysqld (권한변경)
# chown -R mysql:mysql /usr/local/mysql (소유주변경)
# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
# chkconfig --add mysqld
# /etc/init.d/mysqld start
# /usr/local/mysql/bin/mysqladmin -u root password test12#$ (패스워드지정)
# ln -s /usr/local/mysql/bin/mysql /usr/bin/
# ln -s /usr/local/mysql/bin/mysqldump /usr/bin/
# vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin <— 내역 추가
# source ~/.bash_profile
# mysql -uroot –p
위와 같은 나온다면 정상으로 설치가 완료되었습니다.
아래 my.cnf 내역은 필자의 내용이니 참고 부탁드립니다.
# vi /etc/my.cnf
[client]
default-character-set=utf8
socket = /usr/local/mysql/tmp/mysql.sock
[mysqld]
datadir=/usr/local/mysql/data
socket = /usr/local/mysql/tmp/mysql.sock
tmpdir = /usr/local/mysql/tmp
character_set_server=utf8
collation_server=utf8_general_ci
init_connect=set collation_connection=utf8_general_ci
init_connect=set names utf8
character-set-server=utf8
skip-character-set-client-handshake = FALSE
skip-external-locking
innodb_buffer_pool_size = 2G
innodb_flush_log_at_trx_commit = 1
innodb_write_io_threads = 8
innodb_read_io_threads = 8
key_buffer_size = 384M
max_allowed_packet = 2M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
max_connections = 500000
max_connect_errors = 500000
table_open_cache = 5000
table_definition_cache = 5000
# Try number of CPU's*2 for thread_concurrency
innodb_thread_concurrency = 16
#log_slow_queries = /usr/local/mysql/mysql_slow.log
#long_query_time=2
[mysqldump]
quick
max_allowed_packet = 16M
default-character-set=utf8
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
default-character-set=utf8
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
'리눅스 > centos' 카테고리의 다른 글
[centos]APM 설치 5 - php 5.3.28 설치 (2) | 2014.03.11 |
---|---|
[centos]APM 설치 4 - apache 2.4.7 설치 (4) | 2014.03.11 |
[centos]APM 설치 2 - 설치하기전 필요 패키지 설치 (3) | 2014.03.11 |
[centos]APM 설치 1 -APM 이란 (0) | 2014.03.11 |
[centos]centos minimal 설치 후 추가 패키지 설치 (0) | 2014.03.06 |