mariaDB 소스를 설치하려면 CMake 가 필요
yum install gcc* make libtool-ltdl-devel openssl-devel pcre-devel ncurses-devel libxml* bzip2-devel curl-devel gdbm-devel libjpeg-devel libpng-devel freetype-devel imap-devel libc-client-devel krb5-devel libmcrypt libmcrypt-devel libmhash-devel flex icu libicu libicu-devel gd gd-devel wget gzip libxslt-devel cmake ncurses ncurses-devel bison gnutls-devel
mariadb 홈페이지(https://mariadb.org/)
mariadb-10.2.8.tar.gz 다운 (https://downloads.mariadb.org/interstitial/mariadb-10.2.8/source/mariadb-10.2.8.tar.gz/from/http%3A//ftp.kaist.ac.kr/mariadb/?serve)
cd /usr/local/src
wget https://downloads.mariadb.org/interstitial/mariadb-10.2.8/source/mariadb-10.2.8.tar.gz
tar -zxvf mariadb-10.2.8.tar.gz
(z : gz압축풀기 / x : 푼다 / v : 화면에 출력 / f : tar 파일 지정)
cd mariadb-10.2.8
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mariadb10 \
-DMYSQL_DATADIR=/db/mariadb10 \
-DSYSCONFDIR=/usr/local/mariadb10/conf \
-DMYSQL_TCP_PORT=3306 \
-DMYSQL_UNIX_ADDR=/tmp/mariadb.sock \
-DWITH_READLINE=1 \
-DWITH_SSL=bundled \
-DWITH_ZLIB=system \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_EXTRA_CHARSETS=all \
-DWITH_ARIA_STORAGE_ENGINE=1 \
-DWITH_XTRADB_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_FEDERATEDX_STORAGE_ENGINE=1 \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-DCURSES_LIBRARY=/usr/lib64/libncurses.so \
-DCURSES_INCLUDE_PATH=/usr/include
make && make install
재 컴파일 해야할 경우
rm -f CMakeCache.txt
make 과정에서 c++: internal compiler error: Killed (program cc1plus) 에러가 발생한다면
http://arima18.tistory.com/6 글을 참고.
mkdir /db
mkdir /db/mariadb10
cd /usr/local/mariadb10/scripts/
./mysql_install_db --user=root --basedir=/usr/local/mariadb10 --datadir=/db/mariadb10
vi /etc/ld.so.conf
/usr/local/lib => 추가 => wq
ldconfig
cp /usr/local/mariadb10/support-files/mysql.server /etc/init.d/mysqld
chkconfig mysqld on
cd /usr/local
ln -s /usr/local/mariadb10 mysql
vi /etc/init.d/mysqld
basedir=/usr/local/mariadb10
datadir=/db/mariadb10
cp /usr/local/mariadb10/support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
계정 생성 및 설치
cp /usr/local/mariadb10/support-files/my-huge.cnf /etc/my.cnf
메모리에 따라 my-small.cnf / my-medium.cnf / my-large.cnf / my-huge.cnf / my-innodb-heavy-4G.cnf 로 변경가능
useradd mysql
cd /usr/local/mariadb10/scripts
./mysql_install_db --user=root --basedir=/usr/local/mariadb10 --datadir=/db/mariadb10
vi /etc/my.cnf
다른 블로그
mkdir /log
mkdir /log/mariadb10
실행스크립트 복사 및 소유권 변경
cd /usr/local/mariadb10
cp -a support-files/mysql.server /etc/rc.d/init.d/mysqld
chown -R mysql:mysql /db/mariadb10chown -R mysql:mysql /usr/local/mariadb10/
vi /root/.bash_profilePATH=$PATH:$HOME/bin:/usr/local/mariadb/bin 변경
source /root/.bash_profile
**여기서부터 다른 블로그를 참고해주세요
'DEV > Linux' 카테고리의 다른 글
[CentOS 7] Tomcat8 컴파일 (0) | 2017.08.23 |
---|---|
[CentOS 7] PHP 컴파일 (0) | 2017.08.22 |
[CentOS 7] Apache 컴파일 (0) | 2017.08.22 |
Linux vi편집기 줄번호 보이게 하기 (0) | 2017.08.21 |
Linux 명령어 (0) | 2017.08.12 |