페이지 정보작성자 관리자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 (183.♡.22.251) 댓글 0건 조회 801회 작성일 19-10-06 23:51
OS : Centos 7.5
DBMS : Mariadb 10.4.7
Galera : 4.26-4.2.1
- galera rpm 설치
- (이슈사항 : Mariadb에 포함된 galera 플러그인 사용시 OPENSSL1.0.0이 없다는 에러메시지 발생
#> yum install -y libaio socat ./galera-4-26.4.2-1.rhel7.el7.centos.x86_642.rpm
- /etc/my.cnf에 아래내용 적용
user = mysql
key_buffer_size = 384M
max_allowed_packet = 1M
table_open_cache = 512
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
expire_logs_days = 30
wait_timeout = 60
max_heap_table_size = 190
tmp_table_size = 64M
join_buffer_size = 64M
innodb_buffer_pool_size = 950M
innodb_flush_log_at_timeout = 3
# Mandatory settings
- mysql_install_db 실행
Installing MariaDB/MySQL system tables in '/data/db_data' ...wsrep loader: [INFO] wsrep_load(): loading provider library 'none'
OKTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemTwo all-privilege accounts were created.
One is root@localhost, it has no password, but you need tobe system 'root' user to connect. Use, for example, sudo mysqlThe second is mysql@localhost, it has no password either,
butyou need to be the system 'mysql' user to connect.After connecting you can set the password, if you would need to beable to connect as any of these users with a
password and without sudoSee the MariaDB Knowledgebase at http://mariadb.com/kb or theMySQL manual for more instructions.
You can start the MariaDB daemon with:cd '/usr/local/mysql' ; /usr/local/mysql/bin/mysqld_safe --datadir='/data/db_data'You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/local/mysql/mysql-test' ; perl mysql-test-run.plPlease report any problems at http://mariadb.org/jiraThe latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:http://dev.mysql.comConsider joining MariaDB's strong and vibrant community:https://mariadb.org/get-involved/
- 클러스터 구성(최초로 구성하는 서버에서만 진행하면 됨
# /usr/local/mysql/support-files/mysql.server start --wsrep-new-cluster
Starting MariaDB SUCCESS!
190911 13:43:35 mysqld_safe Logging to '/data/db_data/localhost.err'.
190911 13:43:35 mysqld_safe Starting mysqld daemon with databases from /data/db_data
- 기본 보안설정 (root 패스워드 설정시 /etc/my.cnf에 wsrep_sst_auth 항목에 정의한 계정정보 설정
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE!PLEASE READ EACH STEP CAREFULLY!In order to log into
MariaDB to secure it, we'll need the currentpassword for the root user. If you've just installed MariaDB,
andhaven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none):
successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobodycan log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
Switch to unix_socket authentication [Y/n] n
... skipping.You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] y
Re-enter new password:
Password updated successfully!
Reloading privilege tables.....
By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created for
them.This is intended only for testing, and to make the installationgo a bit smoother.
You should remove them before moving into aproduction environment.
Remove anonymous users? [Y/n] y
Normally, root should only be allowed to connect from 'localhost'.Thisensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y...
MariaDB comes with a database named 'test' that anyone canaccess.This is also intended only for testing, and should be removedbefore moving into
a production environment.Remove test database and access to it? [Y/n] y
- Dropping test database...... Success!
- Removing privileges on test database...... Success!
Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload privilege tables now? [Y/n] y
Cleaning up...All done!If you've completed all of the above steps, your MariaDBinstallation should now be secure.Thanks for using MariaDB!
- 2번 서버에서 mysql 프로세스 실행
# /usr/local/mysql/support-files/mysql.server start
Starting MariaDB.190911 13:51:30 mysqld_safe Logging to '/data/db_data/localhost.err'.
190911 13:51:30 mysqld_safe Starting mysqld daemon with databases from /data/db_data................
등록된 댓글이 없습니다.