728x90

출처

nfs 패키지 설치

bluesanta@bluesanta-A520M-ITX-ac:~$ sudo apt install nfs-common

NFS 를 통해 공유 폴더 마운트

bluesanta@bluesanta-A520M-ITX-ac:~$ sudo mkdir /share_disk
bluesanta@bluesanta-A520M-ITX-ac:~$ sudo mount -t nfs 192.168.0.58:/volumeUSB2/usbshare /share_disk
728x90
728x90

가상환경 만들기

bluesanta@bluesanta-A520M-ITX-ac:~$ mkdir Application
bluesanta@bluesanta-A520M-ITX-ac:~$ cd Application/
bluesanta@bluesanta-A520M-ITX-ac:~/Application$ mkdir stable_diffusion
bluesanta@bluesanta-A520M-ITX-ac:~/Application$ cd stable_diffusion
bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ sudo apt install python3-venv
bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ python3 -m venv .venv
bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ source .venv/bin/activate
(.venv) bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$

PyTorch 설치 (CUDA 12.x 기반 호환)

현재 PyTorch 공식 빌드는 CUDA 12.4~12.6까지 지원

(.venv) bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

Transformer 및 최적화 라이브러리 설치

(.venv) bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ pip install transformers datasets accelerate

8-bit/4-bit 양자화용

(.venv) bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ pip install bitsandbytes

LoRA 등 효율적 파인튜닝용

(.venv) bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ pip install peft

ONNX, OpenVINO 등 하드웨어 가속용

(.venv) bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ pip install optimum

Flash Attention 설치

RTX 4060은 Ada Lovelace 아키텍처를 사용하므로, Transformer 연산 속도를 획기적으로 높여주는 Flash Attention을 설치

(.venv) bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ pip install flash-attn --no-build-isolation

CUDA 12.4 설치

cuda_version_check.py

import torch
import torch.backends.cudnn as cudnn

print(f"PyTorch version: {torch.__version__}")
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU Name: {torch.cuda.get_device_name(0)}")
print(f"cuDNN version: {torch.backends.cudnn.version()}")

# 현재 연결된 GPU 장치 수
print(f"Device Count: {torch.cuda.device_count()}")

# 간단한 텐서 연산 테스트
x = torch.randn(3, 3).cuda()
print("Tensor operation success!")

if cudnn.is_acceptable(torch.randn(1, device='cuda')):
    print(f"cuDNN version: {cudnn.version()}")
    print("cuDNN is working perfectly!")

실행

(.venv) bluesanta@bluesanta-A520M-ITX-ac:~/Application/stable_diffusion$ python cuda_version_check.py 
PyTorch version: 2.6.0+cu124
CUDA available: True
GPU Name: NVIDIA GeForce RTX 4060
cuDNN version: 90100
Device Count: 1
Tensor operation success!
cuDNN version: 90100
cuDNN is working perfectly!
728x90
728x90

리눅스 버전 확인

bluesanta@bluesanta-A520M-ITX-ac:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.3 LTS
Release:        24.04
Codename:       noble

NVIDIA 드라이버 버전 확인

bluesanta@bluesanta-A520M-ITX-ac:~$ nvidia-smi
Fri Jan  2 21:13:47 2026       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.95.05              Driver Version: 580.95.05      CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 4060        Off |   00000000:01:00.0 Off |                  N/A |
|  0%   41C    P8            N/A  /  115W |     378MiB /   8188MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
 
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            2210      G   /usr/lib/xorg/Xorg                      183MiB |
|    0   N/A  N/A            2428      G   /usr/bin/gnome-shell                    143MiB |
+-----------------------------------------------------------------------------------------+

CUDA 12.4 설치

NVIDIA 저장소 키 및 리스트 등록

bluesanta@bluesanta-A520M-ITX-ac:~$ sudo apt update
bluesanta@bluesanta-A520M-ITX-ac:~$ sudo apt install build-essential dkms wget
bluesanta@bluesanta-A520M-ITX-ac:~$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin
bluesanta@bluesanta-A520M-ITX-ac:~$ sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600
bluesanta@bluesanta-A520M-ITX-ac:~$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
bluesanta@bluesanta-A520M-ITX-ac:~$ sudo dpkg -i cuda-keyring_1.1-1_all.deb
bluesanta@bluesanta-A520M-ITX-ac:~$ sudo apt update

CUDA 12.4 Toolkit 설치

bluesanta@bluesanta-A520M-ITX-ac:~$ sudo apt install cuda-toolkit-12-4

CUDA Toolkit 설치 여부 확인

bluesanta@bluesanta-A520M-ITX-ac:~$ whereis cuda
cuda: /usr/lib/cuda /usr/include/cuda /usr/local/cuda
bluesanta@bluesanta-A520M-ITX-ac:~$ ls -l /usr/local | grep cuda
lrwxrwxrwx  1 root root   22  1월  2 22:32 cuda -> /etc/alternatives/cuda
lrwxrwxrwx  1 root root   25  1월  2 22:32 cuda-12 -> /etc/alternatives/cuda-12
drwxr-xr-x 15 root root 4096  1월  2 22:32 cuda-12.4

환경 변수 등록

설치가 완료되면 /usr/local/cuda-12.4 폴더가 생성됩니다. 이제 시스템이 이 폴더를 인식하도록 설정

bluesanta@bluesanta-A520M-ITX-ac:~$ vi ~/.bashrc

~/.bashrc 내용 추가

# 파일 맨 아래에 다음 세 줄 추가
export PATH=/usr/local/cuda-12.4/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda-12.4

CUDA Toolkit 설치 (Ubuntu 24.04 기준) - 위에 설치 된것 같지만 다시 확인 필요

bluesanta@bluesanta-A520M-ITX-ac:~$ sudo apt update
bluesanta@bluesanta-A520M-ITX-ac:~$ sudo apt install build-essential dkms
bluesanta@bluesanta-A520M-ITX-ac:~$ sudo apt install nvidia-cuda-toolkit

cuDNN 9 (CUDA 12용) 설치

bluesanta@bluesanta-A520M-ITX-ac:~$ sudo apt install libcudnn9-cuda-12

설치 확인

bluesanta@bluesanta-A520M-ITX-ac:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0
728x90
728x90

출처

Docker 패키지 다운로드

user01@css:/usr/local$ sudo apt-get reinstall --download-only -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

Docker 패키지 파일 복사

user01@css:~$ cd ~/
user01@css:~$ mkdir docker
user01@css:~$ sudo mv /var/cache/apt/archives/*.deb ~/docker/

Docker 패키지 설치

user01@css:~$ cd docker/
user01@css:~/docker$ ls
bridge-utils_1.7.1-1ubuntu2_amd64.deb                                pigz_2.8-1_amd64.deb
containerd_1.7.24-0ubuntu1~24.04.2_amd64.deb                         python3-compose_1.29.2-6ubuntu1_all.deb
containerd.io_1.7.27-1_amd64.deb                                     python3-docker_5.0.3-1ubuntu1.1_all.deb
docker-buildx-plugin_0.23.0-1~ubuntu.24.04~noble_amd64.deb           python3-dockerpty_0.4.1-5_all.deb
docker-ce_5%3a28.1.1-1~ubuntu.24.04~noble_amd64.deb                  python3-docopt_0.6.2-6_all.deb
docker-ce-cli_5%3a28.1.1-1~ubuntu.24.04~noble_amd64.deb              python3-dotenv_1.0.1-1_all.deb
docker-ce-rootless-extras_5%3a28.1.1-1~ubuntu.24.04~noble_amd64.deb  python3-texttable_1.6.7-1_all.deb
docker-compose_1.29.2-6ubuntu1_all.deb                               python3-websocket_1.7.0-1_all.deb
docker-compose-plugin_2.35.1-1~ubuntu.24.04~noble_amd64.deb          runc_1.1.12-0ubuntu3.1_amd64.deb
docker.io_26.1.3-0ubuntu1~24.04.1_amd64.deb                          slirp4netns_1.2.1-1build2_amd64.deb
libltdl7_2.4.7-7build1_amd64.deb                                     ubuntu-fan_0.12.16_all.deb
libslirp0_4.7.0-1ubuntu3_amd64.deb
user01@css:~/docker$ sudo dpkg -i *.deb

공유할 디렉토리 생성

user01@css:~$ sudo mkdir /usr/local/bluexmas_home
user01@css:~$ sudo mkdir -p /usr/local/bluexmas/resources

공유할 디렉토리 소유자 변경

user01@css:~$ sudo chown user01:user01 -Rf /usr/local/cnssm_home/
user01@css:~$ sudo chown user01:user01 -Rf /usr/local/cnssm/

Docker 이미지 복원

user01@css:~$ sudo docker load -i bluexxmas-ubuntu_v8.1.tar
Loaded image: bluexxmas-ubuntu:v8.1

컨테이너 생성

sudo docker run --add-host=host.docker.internal:host-gateway -it \
-h 0.0.0.0 \
-p 80:80 -p 443:443 -p 8080:8080 \
--name bluexxmas-ubuntu \
--restart always \
-v /usr/local/bluexxmas_home:/usr/local/bluexxmas_home \
-v /usr/local/bluexxmas/resources:/usr/local/bluexxmas/resources \
bluexxmas-ubuntu:v8.1 \
/bin/startservice.sh
user01@css:~$ sudo docker run --add-host=host.docker.internal:host-gateway -it \
> -h 0.0.0.0 \
> -p 80:80 -p 443:443 -p 8080:8080 \
> --name bluexxmas-ubuntu \
> --restart always \
> -v /usr/local/bluexxmas_home:/usr/local/bluexxmas_home \
> -v /usr/local/bluexxmas/resources:/usr/local/bluexxmas/resources \
> bluexxmas-ubuntu:v8.1 \
> /bin/startservice.sh
 * Starting Nginx Server...                                                                                                                                             [ OK ] 
Starting Tomcat
Using CATALINA_BASE:   /usr/local/apache-tomcat-10.1.34
Using CATALINA_HOME:   /usr/local/apache-tomcat-10.1.34
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-10.1.34/temp
Using JRE_HOME:        /usr/lib/jvm/java-17-openjdk-amd64
Using CLASSPATH:       /usr/local/apache-tomcat-10.1.34/bin/bootstrap.jar:/usr/local/apache-tomcat-10.1.34/bin/tomcat-juli.jar
Using CATALINA_OPTS:   
Tomcat started.

Docker 컨테이너 목록 확인

user01@css:~$ sudo docker ps -a
CONTAINER ID   IMAGE               COMMAND                  CREATED          STATUS         PORTS                                                                                                                       NAMES
ec829951584a   cnssm-ubuntu:v8.1   "/bin/startservice.sh"   11 minutes ago   Up 9 minutes   0.0.0.0:80->80/tcp, [::]:80->80/tcp, 0.0.0.0:443->443/tcp, [::]:443->443/tcp, 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcp   cnssm-ubuntu

Docker 컨테이너 shell 접속

user01@css:~$ sudo docker exec -it ec829951584a /bin/bash

Docker 컨테이너 shell 실행

root@ 0:/# cat /bin/startservice.sh
#!/bin/sh
 
service nginx start
service tomcat start
/bin/bash
 
root@ 0:/# 

 

728x90
728x90

출처

리눅스에서 NAS 마운트 :: 다인엔시스

마운트 전 확인

[bluesanta@localhost ~]$ df -h
Filesystem           Size  Used Avail Use% Mounted on
devtmpfs             4.0M     0  4.0M   0% /dev
tmpfs                 63G     0   63G   0% /dev/shm
tmpfs                 26G   58M   25G   1% /run
efivarfs             128K   38K   86K  31% /sys/firmware/efi/efivars
/dev/mapper/rl-root   70G   24G   47G  34% /
/dev/mapper/rl-home  7.3T   84G  7.2T   2% /home
/dev/nvme0n1p2       960M  603M  358M  63% /boot
/dev/nvme0n1p1       599M  7.1M  592M   2% /boot/efi
tmpfs                 13G   56K   13G   1% /run/user/42
tmpfs                 13G  132K   13G   1% /run/user/1000

NFS 패키지 설치

[bluesanta@localhost ~]$ sudo dnf install -y nfs-utils
[bluesanta@localhost ~]$ sudo dnf install -y samba-client

NAS 정보 확인

[bluesanta@localhost ~]$ smbclient -L //192.168.0.58 -U bluesanta -d 3
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
added interface enp5s0 ip=192.168.0.202 bcast=192.168.0.255 netmask=255.255.255.0
Client started (version 4.20.2).
Connecting to 192.168.0.58 at port 445
Password for [SAMBA\bluesanta]:
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'ncalrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'http_negotiate' registered
Cannot do GSE to an IP address
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
 
        Sharename       Type      Comment
        ---------       ----      -------
        Disk1           Disk      
        Disk3           Disk      
        IPC$            IPC       IPC Service ()
SMB1 disabled -- no workgroup available

NAS 마운트

[bluesanta@localhost ~]$ sudo mkdir /mnt/Disk1
[bluesanta@localhost ~]$ sudo mount -t cifs -o username=bluesanta,password=passwd //192.168.0.58/Disk1 /mnt/Disk1

 

728x90
728x90

출처

키 다운로드

user01@css:~$ sudo apt-get install apt-transport-https curl
user01@css:~$ sudo mkdir -p /etc/apt/keyrings
user01@css:~$ sudo curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp'

mariadb 소스 추가

user01@css:~$ sudo vi /etc/apt/sources.list.d/mariadb.sources
# MariaDB 11.8 repository list - created 2025-04-14 00:00 UTC
# https://mariadb.org/download/
X-Repolib-Name: MariaDB
Types: deb
# deb.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# URIs: https://deb.mariadb.org/11.rc/ubuntu
URIs: https://tw1.mirror.blendbyte.net/mariadb/repo/11.8/ubuntu
Suites: noble
Components: main main/debug
Signed-By: /etc/apt/keyrings/mariadb-keyring.pgp

mariadb 설치

user01@css:~$ sudo apt-get update
user01@css:~$ sudo apt install mariadb-server

mariadb 서비스 등록 확인

user01@css:~$ sudo systemctl is-enabled mariadb
enabled

mariadb 서비스 실행 상태 확인

user01@css:~$ sudo systemctl status mysql
● mariadb.service - MariaDB 11.8.1 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
             └─migrated-from-my.cnf-settings.conf
     Active: active (running) since Thu 2025-04-24 12:33:14 UTC; 53min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 5020 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCE>
    Process: 5022 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`>
    Process: 5106 ExecStartPost=/bin/rm -f /run/mysqld/wsrep-start-position (code=exited, status=0/SUCCESS)
    Process: 5108 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
   Main PID: 5050 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 9 (limit: 29494)
     Memory: 174.1M (peak: 263.6M)
        CPU: 7.101s
     CGroup: /system.slice/mariadb.service
             └─5050 /usr/sbin/mariadbd
 
Apr 24 12:33:12 css mariadbd[5050]: 2025-04-24 12:33:12 0 [Note] InnoDB: log sequence number 47629; transaction id 14
Apr 24 12:33:12 css mariadbd[5050]: 2025-04-24 12:33:12 0 [Note] Plugin 'FEEDBACK' is disabled.
Apr 24 12:33:12 css mariadbd[5050]: 2025-04-24 12:33:12 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_>
Apr 24 12:33:12 css mariadbd[5050]: 2025-04-24 12:33:12 0 [Note] Plugin 'wsrep-provider' is disabled.
Apr 24 12:33:12 css mariadbd[5050]: 2025-04-24 12:33:12 0 [Note] InnoDB: Buffer pool(s) load completed at 250424 12:33:>
Apr 24 12:33:14 css mariadbd[5050]: 2025-04-24 12:33:14 0 [Note] Server socket created on IP: '127.0.0.1'.
Apr 24 12:33:14 css mariadbd[5050]: 2025-04-24 12:33:14 0 [Note] mariadbd: Event Scheduler: Loaded 0 events
Apr 24 12:33:14 css mariadbd[5050]: 2025-04-24 12:33:14 0 [Note] /usr/sbin/mariadbd: ready for connections.
Apr 24 12:33:14 css mariadbd[5050]: Version: '11.8.1-MariaDB-ubu2404'  socket: '/run/mysqld/mysqld.sock'  port: 3306  m>
Apr 24 12:33:14 css systemd[1]: Started mariadb.service - MariaDB 11.8.1 database server.

mariadb root 패스워드 변경

user01@css:~$ sudo /usr/bin/mysqladmin -u root password
/usr/bin/mysqladmin: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-admin' instead
New password: 
Confirm new password: 

mariadb 접속

user01@css:~$ mysql -u root -p
mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 34
Server version: 11.8.1-MariaDB-ubu2404 mariadb.org binary distribution
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.001 sec)
 
MariaDB [(none)]> 

mariadb DB 사용자 생성

user01@css:~$ mysql -u root -p 
mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 35
Server version: 11.8.1-MariaDB-ubu2404 mariadb.org binary distribution
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> CREATE DATABASE bluexmas_db CHARACTER SET utf8mb4 collate utf8mb4_general_ci;
Query OK, 1 row affected (0.000 sec)
 
MariaDB [(none)]> create user 'user01'@'localhost' identified by 'passwd';
Query OK, 0 rows affected (0.003 sec)
 
MariaDB [(none)]> grant all privileges on *.* to 'user01'@'localhost' with grant option;
Query OK, 0 rows affected (0.008 sec)
 
MariaDB [(none)]> create user 'user01'@'%' identified by 'passwd';
Query OK, 0 rows affected (0.003 sec)
 
MariaDB [(none)]> grant all privileges on bluexmas_db.* to 'user01'@'%' with grant option;
Query OK, 0 rows affected (0.003 sec)
 
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)
 
MariaDB [(none)]> exit
Bye

mariadb 포트 개발

user01@css:~$ sudo ufw status verbose
[sudo] password for user01: 
Status: inactive
user01@css:~$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
user01@css:~$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip
user01@css:~$ sudo ufw allow 22
Rule added
Rule added (v6)
user01@css:~$ sudo ufw allow 3306
Rule added
Rule added (v6)
user01@css:~$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip
 
To                         Action      From
--                         ------      ----
22                         ALLOW IN    Anywhere                  
3306                       ALLOW IN    Anywhere                  
22 (v6)                    ALLOW IN    Anywhere (v6)             
3306 (v6)                  ALLOW IN    Anywhere (v6)             
 
user01@css:~$ 

mariadb 외부 접속 허용

mariadb 포트 확인

mariadb 포트 확인 해보면 127.0.0.1:3306 로컬에서 접속하도록 설정 되어 있는 것을 확인 할 수 있음

user01@css:~$ netstat -nao | grep 3306
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      off (0.00/0/0)

mariadb 환경 변수 수정

user01@css:~$ sudo vi /etc/mysql/mariadb.conf.d/50-server.cnf 

bind-address 주석 처리

[mariadbd]

# bind-address            = 127.0.0.1
# skip-ssl        # (ERROR 2026 (HY000)) 해결

mariadb 서비스 재시작

user01@css:~$ sudo systemctl restart mysql

mariadb 포트 확인

user01@css:~$ netstat -nao | grep 3306
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp6       0      0 :::3306                 :::*                    LISTEN      off (0.00/0/0)
728x90
728x90

출처

xrdp 설치

[bluesanta@localhost ~]$ sudo dnf -y install epel-release.noarch
[bluesanta@localhost ~]$ sudo dnf -y install xrdp

xrdp 서비스 등록, 서비스 실행

[bluesanta@localhost ~]$ sudo systemctl enable xrdp
Created symlink /etc/systemd/system/multi-user.target.wants/xrdp.service → /usr/lib/systemd/system/xrdp.service.
[bluesanta@localhost ~]$ sudo systemctl restart xrdp

xrdp 방화벽 개방

[bluesanta@localhost ~]$ sudo firewall-cmd --add-port=3389/tcp --permanent 
success
[bluesanta@localhost ~]$ sudo firewall-cmd --reload
success
[bluesanta@localhost ~]$
728x90
728x90

출처

리눅스 버전 확인

orangepi@orangepi3b:~$ uname -a
Linux orangepi3b 5.10.160-rockchip-rk356x #1.0.4 SMP Tue Dec 26 10:41:53 CST 2023 aarch64 aarch64 aarch64 GNU/Linux

도커 설치

orangepi@orangepi3b:~$ curl -sSL https://get.docker.com | sh
## Executing docker install script, commit: e5543d473431b782227f8908005543bb4389b8de
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sudo -E sh -c install -m 0755 -d /etc/apt/keyrings
+ sudo -E sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
gpg: WARNING: unsafe ownership on homedir '/home/orangepi/.gnupg'
+ sudo -E sh -c chmod a+r /etc/apt/keyrings/docker.gpg
+ sudo -E sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu focal stable" > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null
+ sudo -E sh -c docker version
Client: Docker Engine - Community
 Version:           25.0.3
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        4debf41
 Built:             Tue Feb  6 21:13:09 2024
 OS/Arch:           linux/arm64
 Context:           default
 
Server: Docker Engine - Community
 Engine:
  Version:          25.0.3
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       f417435
  Built:            Tue Feb  6 21:13:09 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
 
================================================================================
 
To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:
 
    dockerd-rootless-setuptool.sh install
 
Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.
 
 
To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/
 
WARNING: Access to the remote API on a privileged Docker daemon is equivalent
         to root access on the host. Refer to the 'Docker daemon attack surface'
         documentation for details: https://docs.docker.com/go/attack-surface/
 
================================================================================

도커 버전 확인

orangepi@orangepi3b:~$ sudo docker version
Client: Docker Engine - Community
 Version:           25.0.3
 API version:       1.44

도커 이미지 다운로드, 이미지 목록 조회, 이미지 삭제

arm64 플랫폼 옵션을 주지 않으면 아래와 같은 오류가 발생하므로 --platform linux/arm64 옵션 추가 필요

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

mysql 이미지 받아오기 (pull)

orangepi@orangepi3b:~$ docker pull --platform linux/arm64 arm64v8/mysql
Using default tag: latest
latest: Pulling from arm64v8/mysql
ea4e27ae0b4c: Already exists 
837904302482: Pull complete 
3c574b61b241: Pull complete 
654fc4f3eb2d: Pull complete 
32da9c2187e3: Pull complete 
dc99c3c88bd6: Pull complete 
970181cc0aa6: Pull complete 
d77b716c39d5: Pull complete 
9e650d7f9f83: Pull complete 
acc21ff36b4b: Pull complete 
Digest: sha256:ac1b9d1c2098dfcb70e5115fe81e7bfb77caf2e60c4d761a52b645d3d14c830b
Status: Downloaded newer image for arm64v8/mysql:latest
docker.io/arm64v8/mysql:latest

도커 이미지 조회

orangepi@orangepi3b:~$ docker images
REPOSITORY           TAG          IMAGE ID       CREATED         SIZE
oracle/db            19.19-EE     d8e82978a278   27 hours ago    5.89GB
oraclelinux          8-slim-19c   9c84640d1e78   27 hours ago    711MB
arm64v8/mysql        latest       e68e2614955c   7 weeks ago     638MB
mysql/mysql-server   5.7          a4ad24fe52cd   13 months ago   432MB

도커 이미지 삭제 (rmi)

orangepi@orangepi3b:~$ docker rmi a4ad24fe52cd
Untagged: mysql/mysql-server:5.7
Untagged: mysql/mysql-server@sha256:1178cdd375f758968cd834ac4057bae41307e64b7c69a9e145896e7b11f48064
Deleted: sha256:a4ad24fe52cdf82a35c6f2dae7670cfebf39357de983cb909db07c8b56df4dd1
Deleted: sha256:522d4bd955d841c9d9ee13768c45758adebc763f6ade609bf067567ec1f9db42
Deleted: sha256:0d4e56a725cdabce1459fceacb4ae726f01a3b74da88ae163828011a17695775
Deleted: sha256:3c0e6f8ea73046976b06eeb8643db4203d80e97582b772e033f539b79641b81b
Deleted: sha256:abde8b2762b759ea13f432207e38bd5af0b7f7a5a49e780e79499194ecbcfa39
Deleted: sha256:5836d1e6c9d144340d78e71f394fb81003df2e58146882e4ed1ea8eedf9a9e06
Deleted: sha256:5245f05f9eacc04eb63abf72ffba361c1834ffa6df119e7de7275be38f933673
Deleted: sha256:812f16602ebb1f9018247ecd71457fc2c9bb261ed03dde61daa8c204397fdbca
Deleted: sha256:62d9c4cbe8f4b26952ebb533b5336bf7af791db2b4288df65c9a685e1f2530cd

MySQL 도커 실행

MySQL 도커 처음 실행시 보안상 포트를 가지고 초기화 되지 않으므로, 포트없이 실행했다가 포트를 추가해야됨

오류 메시지 확인

orangepi@orangepi3b:~$ docker run --name mysql_container8 --net host -e MYSQL_RANDOM_ROOT_PASSWORD=passwd -d arm64v8/mysql:latest -p 3306:3306
ff7ac589ec49d0decfa3263a181db3866aa3da321386d05ca71ab8e08f648480
orangepi@orangepi3b:~$ docker logs -f mysql_container8
2024-03-09 09:45:27+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.3.0-1.el8 started.
2024-03-09 09:45:27+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
        command was: mysqld -p 3306:3306 --verbose --help --log-bin-index=/tmp/tmp.srui3XQiY0
        Enter password: mysqld: Can not perform keyring migration : Invalid --keyring-migration-source option.
2024-03-09T09:45:27.723601Z 0 [ERROR] [MY-011084] [Server] Keyring migration failed.
2024-03-09T09:45:27.727540Z 0 [ERROR] [MY-010119] [Server] Aborting

포트없이 MySQL 도커 실행

orangepi@orangepi3b:~$ docker run --name mysql_container --net host -e MYSQL_ROOT_PASSWORD=passwd -d arm64v8/mysql:latest
43d8707d88e70fb90400777e2a18bf270e59ca12a0f62725709811de366f793b

root 암호 변경

orangepi@orangepi3b:~$ docker exec -it mysql_container bash
bash-4.4# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
bash-4.4# mysql -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.3.0 MySQL Community Server - GPL
 
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'sqldba';
Query OK, 0 rows affected (0.03 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
 
mysql> quit
Bye
bash-4.4# exit
exit
orangepi@orangepi3b:~$

MySQL 외부 접속 가능 하도록 포트 추가

도커 중지

orangepi@orangepi3b:~$ docker stop mysql_container
mysql_container

새로운 이미지(custom/mysql) 생성

orangepi@orangepi3b:~$ docker commit mysql_container custom/mysql
sha256:b5783eb91fbe61a7059352109b5ca5d76f57235cf76ea6aa210d90c7df7dd46b
orangepi@orangepi3b:~$ docker images
REPOSITORY         TAG          IMAGE ID       CREATED          SIZE
custom/mysql       latest       b5783eb91fbe   29 seconds ago   638MB
oracle/db          19.19-EE     d8e82978a278   28 hours ago     5.89GB
oraclelinux        8-slim-19c   9c84640d1e78   28 hours ago     711MB
arm64v8/mysql      latest       e68e2614955c   7 weeks ago      638MB

새로 생성된 이미지로 포트 개방(-p 옵션), 호스트 모드(--net host)로 실행

orangepi@orangepi3b:~$ docker run --name mysql_container3 --net host -p 3306:3306 -d custom/mysql
WARNING: Published ports are discarded when using host network mode
2e7d07a858cec931b2799a04fa0d87e13d781283b282e00cdfaae9b0011f6e39

포트 확인

orangepi@orangepi3b:~$ netstat -nao | grep  3306
tcp6       0      0 :::33060                :::*                    LISTEN      off (0.00/0/0)
tcp6       0      0 :::3306                 :::*                    LISTEN      off (0.00/0/0)

MySQL 외부 접속 계정 생성

orangepi@orangepi3b:~$ docker exec -it mysql_container3 bash
bash-4.4# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
bash-4.4# mysql -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.3.0 MySQL Community Server - GPL
 
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> create user 'system'@'%' identified by 'manager';
Query OK, 0 rows affected (0.08 sec)
 
mysql> grant all privileges on *.* to 'system'@'%' with grant option; 
Query OK, 0 rows affected (0.03 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.03 sec)
 
mysql> quit
Bye
bash-4.4# exit
exit
orangepi@orangepi3b:~$ 

 

 

 

mysql_container 실행로그

orangepi@orangepi3b:~$ docker logs -f mysql_container
2024-03-09 09:49:38+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.3.0-1.el8 started.
2024-03-09 09:49:39+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-03-09 09:49:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.3.0-1.el8 started.
2024-03-09 09:49:40+00:00 [Note] [Entrypoint]: Initializing database files
2024-03-09T09:49:40.303194Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2024-03-09T09:49:40.310443Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.3.0) initializing of server in progress as process 83
2024-03-09T09:49:40.335938Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-09T09:49:41.660928Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-09T09:49:46.003354Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2024-03-09T09:49:54.792667Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
2024-03-09 09:49:54+00:00 [Note] [Entrypoint]: Database files initialized
2024-03-09 09:49:54+00:00 [Note] [Entrypoint]: Starting temporary server
2024-03-09T09:49:54.935137Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-03-09T09:49:55.360061Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.3.0) starting as process 127
2024-03-09T09:49:55.425848Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-09T09:49:55.866191Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-09T09:49:56.852795Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-03-09T09:49:56.852979Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-03-09T09:49:56.858101Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-03-09T09:49:56.964591Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2024-03-09T09:49:56.965191Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.3.0'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
2024-03-09 09:49:57+00:00 [Note] [Entrypoint]: Temporary server started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
 
2024-03-09 09:50:12+00:00 [Note] [Entrypoint]: Stopping temporary server
2024-03-09T09:50:12.453181Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.3.0).
2024-03-09T09:50:14.164768Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.3.0)  MySQL Community Server - GPL.
2024-03-09T09:50:14.164882Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2024-03-09 09:50:14+00:00 [Note] [Entrypoint]: Temporary server stopped
 
2024-03-09 09:50:14+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
 
2024-03-09T09:50:14.518790Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-03-09T09:50:14.968538Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.3.0) starting as process 1
2024-03-09T09:50:14.999252Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-09T09:50:15.435084Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-09T09:50:16.292584Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-03-09T09:50:16.292755Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-03-09T09:50:16.297943Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-03-09T09:50:16.409360Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2024-03-09T09:50:16.410060Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.3.0'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
2024-03-09T09:55:18.406055Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user . Shutting down mysqld (Version: 8.3.0).
2024-03-09T09:55:19.636074Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.3.0)  MySQL Community Server - GPL.
2024-03-09T09:55:19.636203Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2024-03-09 09:55:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.3.0-1.el8 started.
2024-03-09 09:55:37+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-03-09 09:55:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.3.0-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2024-03-09T09:55:38.852935Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-03-09T09:55:39.283175Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.3.0) starting as process 1
2024-03-09T09:55:39.314261Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-09T09:55:39.738652Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-09T09:55:40.511370Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-03-09T09:55:40.511549Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-03-09T09:55:40.516103Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-03-09T09:55:40.631638Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2024-03-09T09:55:40.632233Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.3.0'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
2024-03-09T09:56:44.377487Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user . Shutting down mysqld (Version: 8.3.0).
2024-03-09T09:56:45.800653Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.3.0)  MySQL Community Server - GPL.
2024-03-09T09:56:45.800765Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2024-03-09 10:00:38+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.3.0-1.el8 started.
2024-03-09 10:00:39+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-03-09 10:00:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.3.0-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2024-03-09T10:00:40.385155Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-03-09T10:00:40.829162Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.3.0) starting as process 1
2024-03-09T10:00:40.860129Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-09T10:00:41.304886Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-09T10:00:42.032814Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-03-09T10:00:42.033052Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-03-09T10:00:42.037876Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-03-09T10:00:42.150425Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2024-03-09T10:00:42.151172Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.3.0'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
2024-03-09T10:04:30.861529Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user . Shutting down mysqld (Version: 8.3.0).
2024-03-09T10:04:32.161246Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.3.0)  MySQL Community Server - GPL.
2024-03-09T10:04:32.161362Z 0 [System] [MY-015016] [Server] MySQL Server - end.

mysql_container3 실행로그

orangepi@orangepi3b:~$ docker logs -f mysql_container3
2024-03-09 10:09:12+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.3.0-1.el8 started.
2024-03-09 10:09:12+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-03-09 10:09:12+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.3.0-1.el8 started.
2024-03-09 10:09:13+00:00 [Note] [Entrypoint]: Initializing database files
2024-03-09T10:09:13.803123Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2024-03-09T10:09:13.810328Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.3.0) initializing of server in progress as process 81
2024-03-09T10:09:13.835939Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-09T10:09:15.144494Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-09T10:09:19.134540Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2024-03-09T10:09:28.248727Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
2024-03-09 10:09:28+00:00 [Note] [Entrypoint]: Database files initialized
2024-03-09 10:09:28+00:00 [Note] [Entrypoint]: Starting temporary server
2024-03-09T10:09:28.392803Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-03-09T10:09:28.834410Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.3.0) starting as process 125
2024-03-09T10:09:28.897229Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-09T10:09:29.337702Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-09T10:09:30.318440Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-03-09T10:09:30.318621Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-03-09T10:09:30.323639Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-03-09T10:09:30.429794Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2024-03-09T10:09:30.430597Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.3.0'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
2024-03-09 10:09:30+00:00 [Note] [Entrypoint]: Temporary server started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
 
2024-03-09 10:09:45+00:00 [Note] [Entrypoint]: Stopping temporary server
2024-03-09T10:09:45.987307Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.3.0).
2024-03-09T10:09:47.650362Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.3.0)  MySQL Community Server - GPL.
2024-03-09T10:09:47.650472Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2024-03-09 10:09:47+00:00 [Note] [Entrypoint]: Temporary server stopped
 
2024-03-09 10:09:48+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
 
2024-03-09T10:09:48.052593Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-03-09T10:09:48.499846Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.3.0) starting as process 1
2024-03-09T10:09:48.530842Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-09T10:09:48.979003Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-09T10:09:49.756543Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-03-09T10:09:49.756714Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-03-09T10:09:49.761885Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-03-09T10:09:49.872098Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2024-03-09T10:09:49.872650Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.3.0'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
728x90

+ Recent posts