mariadb package install

https://downloads.mariadb.org/mariadb/repositories/#mirror=kaist

  1. ubuntu 선택 -> 2. 릴리즈버전 선택 -> 3. 버전 10.1 선택(안정 버전)

sudo apt-get install software-properties-common

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db

sudo add-apt-repository ‘deb [arch=amd64,i386,ppc64el] http://ftp.kaist.ac.kr/mariadb/repo/10.1/ubuntu trusty main’

sudo apt-get update

sudo apt-get install mariadb-server

# RAM 16G cnf 설정

vim /etc/mysql/conf.d/mariadb.cnf

[mysqld]
collation-server = utf8_unicode_ci
init-connect=’SET NAMES utf8′
character-set-server = utf8
port = 3306
socket = /var/lib/mysql/mysql.sock
performance_schema = off

back_log = 50

max_connections = 2000
max_connect_errors = 1000000

max_allowed_packet = 64M # 환경에 맞게 사이즈 변경
binlog_cache_size = 1M

slow-query-log = 1
slow_query_log_file = /var/lib/mysql/slow_query_over_1sec.log

table_open_cache = 4096

skip-name-resolve

# HEAP TABLE[사용안할경우 축소 또는 삭제]
max_heap_table_size = 512M
tmp_table_size = 512M
# #
sort_buffer_size = 8M
join_buffer_size = 8M
# #
thread_cache_size = 8
thread_concurrency = 4

wait_timeout = 600

# InnoDB 설정

innodb_additional_mem_pool_size = 1024M
innodb_buffer_pool_size = 10G
innodb_file_per_table
innodb_file_io_threads = 4
innodb_thread_concurrency = 4
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 8M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 30
explicit_defaults_for_timestamp

open_files_limit=8192

Leave a Reply