MariaDB 10.1 버전 소스 설치로 CentOS 7.5에서 진행했습니다.
0) 필수 라이브러리 설치
# yum -y install cmake gcc* curses-devel bison libxml* libtool* openssl* crypto-utils ncurses-devel
1) 계정 추가
# groupadd -g 400 mysql
# useradd -u400 -g400 -d /usr/local/mysql -s /bin/false mysql
2) 설치
# cd /usr/local/src
# wget http://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-10.1.28/source/mariadb-10.1.28.tar.gz
# tar xvfz mariadb-10.1.28
# cd mariadb-10.1.28
# cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mariadb \
-DMYSQL_DATADIR=/usr/local/mariadb/data \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_READLINE=1 \
-DWITH_SSH=bundled \
-DWITH_ZLIB=system \
-DWITH_EXTRA_CHARSETS=all \
-DWITH_ARIA_STORAGE_ENGINE=1 \
-DWITH_XTRADB_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_FEDERATEDX_STORAGE_ENGINE=1 \
-DWITH_PREFSCHEMA_STORAGE_ENGINE=1
# make && make install
3) 설정
# cp /usr/local/mariadb/support-files/mysql.server /etc/init.d/mysqld
# chmod 700 /etc/init.d/mysqld
# chkconfig –add mysqld
# vi /etc/init.d/mysqld
# basedir=/usr/local/mariadb
# datadir=/usr/local/mariadb/data
# cp /usr/local/mariadb/support-files/my-huge.cnf /etc/my.cnf
# chown -R mysql.mysql /usr/local/mariadb/
# chmod 711 /usr/local/mariadb/
# chmod 700 /usr/local/mariadb/data
# chmod 751 /usr/local/mariadb/bin
# chmod 750 /usr/local/mariadb/bin/*
# chmod 755 /usr/local/mariadb/bin/mysql
# chmod 755 /usr/local/mariadb/bin/mysqldump
# /usr/local/mariadb/scripts/mysql_install_db –user=mysql \
–basedir=/usr/local/mariadb/ –datadir=/usr/local/mariadb/data
4) 시작 및 확인
# /etc/init.d/mysqld start
mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 10.1.28-MariaDB Source distribution
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]>
# netstat -nltp | grep mysqld
tcp 0 0 :::3306 :::* LISTEN 51273/mysqld
# mysql –version
mysql Ver 15.1 Distrib 10.1.28-MariaDB, for Linux (x86_64) using readline 5.1
'LINUX > DB' 카테고리의 다른 글
MySQLTuner 설치 (0) | 2019.05.28 |
---|---|
MYSQL 복구 설정 (0) | 2019.05.27 |
MYSQL 설정 - 사용자 생성 및 권한 설정 (0) | 2019.05.27 |
Mysql 8.0 소스설치 (0) | 2019.05.27 |
Mysql 5.7 소스설치 (0) | 2019.05.27 |