MariaDB 10.1 Binary 설치
컴파일보다 비교적 간단한 Binary 설치에 대해 정리해보겠습니다.
Binary는 컴파일이 된 프로그램을 압축해놓은 상태로, 압축만 풀고 간단한 설정만으로도
자신이 원하는 설정대로 조절이 가능하다는 장점이 있습니다.
컴파일의 장점을 갖고 있으면서도 컴파일의 단점인 설치가 복잡하고 오래걸린다는 단점이 보완됩니다.
파일 다운로드
설치 및 링크 생성
[root@localhost ~]# useradd mysql
[root@localhost ~]# cd /data
[root@localhost ~]# cd /mdata
[root@localhost ~]# chown mysql:mysql /mdata
[root@localhost data]# tar zxvf mariadb-10.1.18-linux-x86_64.tar.gz
[root@localhost data]# mv mariadb-10.1.18-linux-x86_64 /usr/local/
[root@localhost data]# chown mysql:mysql mariadb-10.1.18-linux-x86_64
[root@localhost data]# chown mysql:mysql mariadb
[root@localhost data]# cd /usr/local/
[root@localhost local]# ln -s mariadb-10.1.18-linux-x86_64 mariadb
[root@localhost ~]# useradd mysql
[root@localhost ~]# cd /data
[root@localhost ~]# cd /mdata
[root@localhost ~]# chown mysql:mysql /mdata
[root@localhost data]# tar zxvf mariadb-10.1.18-linux-x86_64.tar.gz
[root@localhost data]# mv mariadb-10.1.18-linux-x86_64 /usr/local/
[root@localhost data]# chown mysql:mysql mariadb-10.1.18-linux-x86_64
[root@localhost data]# chown mysql:mysql mariadb
[root@localhost data]# cd /usr/local/
[root@localhost local]# ln -s mariadb-10.1.18-linux-x86_64 mariadb
기타 설정
[root@localhost local]# cp /usr/local/mariadb/support-files/my-huge.cnf /etc/my.cnf
[root@localhost local]# cp /usr/local/mariadb/support-files/mysql.server /etc/init.d/mysqld
[root@localhost local]# vi /etc/profile
...
PATH=$PATH:/usr/local/mariadb/bin
PATH=$PATH:/usr/local/mariadb/scripts
[root@localhost local]# source /etc/profile
[root@localhost local]# mysql_install_db --basedir=/usr/local/mariadb --datadir=/mdata --defaults-file=/etc/my.cnf
[root@localhost local]# cp /usr/local/mariadb/support-files/my-huge.cnf /etc/my.cnf
[root@localhost local]# cp /usr/local/mariadb/support-files/mysql.server /etc/init.d/mysqld
[root@localhost local]# vi /etc/profile
...
PATH=$PATH:/usr/local/mariadb/bin
PATH=$PATH:/usr/local/mariadb/scripts
[root@localhost local]# source /etc/profile
[root@localhost local]# mysql_install_db --basedir=/usr/local/mariadb --datadir=/mdata --defaults-file=/etc/my.cnf
[root@localhost local]# vi /etc/init.d/mysqld
...
46 basedir=/usr/local/mariadb
47 datadir=/mdata
...
[root@localhost local]# service mysqld start
Starting MySQL.161018 15:34:35 mysqld_safe Logging to '/mdata/localhost.localdomain.err'.
[ OK ]
...
46 basedir=/usr/local/mariadb
47 datadir=/mdata
...
[root@localhost local]# service mysqld start
Starting MySQL.161018 15:34:35 mysqld_safe Logging to '/mdata/localhost.localdomain.err'.
[ OK ]
비밀번호 변경 및 실행
[root@localhost bin]# mysqladmin -u root password 비밀번호
[root@localhost bin]# mysql -u root -p
Enter password:
[root@localhost bin]# mysqladmin -u root password 비밀번호
[root@localhost bin]# mysql -u root -p
Enter password:
출처: http://itgameworld.tistory.com/63 [IT와 Game이야기]
0 댓글