Rocky 9 APM설치 Mariadb 설치 메뉴얼
1. 의존성 설치
dnf install wget tar -y
2. MariaDB 설치
wget https://archive.mariadb.org/mariadb-11.4.2/bintar-linux-systemd-x86_64/mariadb-11.4.2-linux-systemd-x86_64.tar.gz // 파일 다운로드
tar -xfz mariadb-11.4.2-linux-systemd-x86_64.tar.gz // 압축 풀기
mv mariadb-11.4.2-linux-systemd-x86_64 /usr/local/mysql // 파일 이동
3. 사용자 추가
groupadd mysql
useradd -g mysql mysql -d /usr/local/mysql -s /sbin/nologin
4. 파일 작성
vi /etc/my.cnf
[client]
default-character-set = utf8mb4
port = 3306
socket = /tmp/mysql.sock
default-character-set = utf8mb4
[mysqld]
socket=/tmp/mysql.sock
datadir=/usr/local/mysql/data
basedir = /usr/local/mysql
#user = mysql
#bind-address = 0.0.0.0
skip-external-locking
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
## dns query
skip-name-resolve
## connection
max_connections = 1000
max_connect_errors = 1000
wait_timeout= 60
## slow-queries
#slow_query_log = /var/log/slow-queries.log
#long_query_time = 3
#log-slow-queries = /var/log/mysql-slow-queries.log
## timestamp
explicit_defaults_for_timestamp
symbolic-links=0
## binlog
server-id = 1
log-bin = /usr/local/mysql/data/mysql-bin
binlog_cache_size = 2M
max_binlog_size = 100M
expire_logs_days = 7
## log
log_warnings = 2
log-error = /usr/local/mysql/data/mysqld.log
pid-file = /usr/local/mysql/data/mysqld.pid
## chracter
skip-character-set-client-handshake
init_connect = SET NAMES utf8mb4
character-set-server = utf8mb4
symbolic-links=0
## Password Policy
#plugin-load-add=validate_password.so
#validate_password_policy= 0 ## LOW
#validate_password_policy= 1 ## MEDIUM
#validate_password_policy= 2 ## STRONG
## MyISAM Spectific options
default-storage-engine = myisam
key_buffer_size = 32M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
## INNODB Spectific options
default-storage-engine = InnoDB
#skip-innodb
#innodb_additional_mem_pool_size = 16M
#innodb_buffer_pool_size = 1024MB
innodb_data_file_path = ibdata1:10M:autoextend
#innodb_write_io_threads = 8
#innodb_read_io_threads = 8
#innodb_thread_concurrency = 16
#innodb_flush_log_at_trx_commit = 1
#innodb_log_buffer_size = 8M
#innodb_log_file_size = 128M
#innodb_log_files_in_group = 3
#innodb_max_dirty_pages_pct = 90
#innodb_lock_wait_timeout = 120
[mysqldump]
default-character-set = utf8mb4
max_allowed_packet = 16M
[mysql]
no-auto-rehash
default-character-set = utf8mb4
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
5. 설치 및 권한 설정
scripts/mariadb-install-db // MariaDB 설치
chown -R mysql:mysql ./data/ // 권한 설정
6.System 등록
cp /usr/local/mysql/support-files/systemd/mariadb.service /etc/systemd/system/
cd /etc/systemd/system/
ln -s mariadb.service mysql.service // 링크 연결
ln -s mariadb.service mysqld.service // 링크 연결
7. 서비스 시작
systemctl daemon-reload
systemctl enable mariadb
systemctl start mariadb
8. 추가적 설정 및 명령어 link
# mysql logrotate
cp /usr/local/mysql/support-files/mariadb.logrotate /etc/logrotate.d/
ln -s /usr/local/mysql/bin/mysql /usr/bin/ // 명령어 링크 설정
ln -s /usr/local/mysql/bin/mysqldump /usr/bin/ // 명령어 링크 설정
Rocky 9 APM설치 Mariadb 설치 메뉴얼 과정 중 오류 발생
error while loading shared libraries: libncurses.so.5
dnf yum install -y ncurses* /필요 라이브러리 설치
or (실패시)
ln -s /usr/lib64/libtinfo.so.6 /usr/lib64/libtinfo.so.5
Rocky 9 APM설치 Mariadb 설치 메뉴얼 MariaDB 패스워드 복잡도
vi /etc/my.cnf [mysqld] 에 아래 내역 추가
## simple password check
simple_password_check = ON
simple_password_check_minimal_length = 8
simple_password_check_digits = 1
simple_password_check_letters_same_case = 1
simple_password_check_other_characters = 1
'SW > APM' 카테고리의 다른 글
Rocky 9 APM설치 (Apache Mariadb PHP) - Apache (1) | 2024.10.19 |
---|---|
Centos7 APM 소스 설치 (mysql 5.1.73, Apache 2.4.6, PHP 5.4.16) (0) | 2024.07.04 |
Centos7 mysql - php 연동 확인 소스 코드 (0) | 2024.06.13 |
우분투 (Ubuntu) 22.04 nginx yum 설치 및 virtual host 설정 (0) | 2023.08.22 |
웹로그분석 Tool 설치, web log 확인(AWStats) (0) | 2021.10.24 |
댓글