728x90

출처

Docker 패키지 다운로드

X
user@localhost:~

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

Docker 패키지 파일 복사

X
user@localhost:~

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

Docker 패키지 설치

X
user@localhost:~

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

공유할 디렉토리 생성

X
user@localhost:~

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

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

X
user@localhost:~

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

Docker 이미지 복원

X
user@localhost:~

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
X
user@localhost:~

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 컨테이너 목록 확인

X
user@localhost:~

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 접속

X
user@localhost:~

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

Docker 컨테이너 shell 실행

X
user@localhost:~

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

 

728x90
728x90

출처

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

마운트 전 확인

X
user@localhost:~

[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 패키지 설치

X
user@localhost:~

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

NAS 정보 확인

X
user@localhost:~

[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 마운트

X
user@localhost:~

[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

출처

키 다운로드

X
user@localhost:~

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 소스 추가

X
user@localhost:~

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 설치

X
user@localhost:~

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

mariadb 서비스 등록 확인

X
user@localhost:~

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

mariadb 서비스 실행 상태 확인

X
user@localhost:~

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 패스워드 변경

X
user@localhost:~

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 접속

X
user@localhost:~

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 사용자 생성

X
user@localhost:~

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 포트 개발

X
user@localhost:~

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 로컬에서 접속하도록 설정 되어 있는 것을 확인 할 수 있음

X
user@localhost:~

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 환경 변수 수정

X
user@localhost:~

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 포트 확인

X
user@localhost:~

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 설치

X
user@localhost:~

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

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

X
user@localhost:~

[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 방화벽 개방

X
user@localhost:~

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

728x90
728x90

출처

리눅스 버전 확인

X
user@localhost:~

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

도커 설치

X
user@localhost:~

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/
 
================================================================================

도커 버전 확인

X
user@localhost:~

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)

X
user@localhost:~

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

도커 이미지 조회

X
user@localhost:~

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)

X
user@localhost:~

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 도커 처음 실행시 보안상 포트를 가지고 초기화 되지 않으므로, 포트없이 실행했다가 포트를 추가해야됨

오류 메시지 확인

X
user@localhost:~

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 도커 실행

X
user@localhost:~

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

root 암호 변경

X
user@localhost:~

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 외부 접속 가능 하도록 포트 추가

도커 중지

X
user@localhost:~

orangepi@orangepi3b:~$ docker stop mysql_container
mysql_container

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

X
user@localhost:~

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)로 실행

X
user@localhost:~

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

포트 확인

X
user@localhost:~

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 외부 접속 계정 생성

X
user@localhost:~

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 실행로그

X
user@localhost:~

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 실행로그

X
user@localhost:~

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
728x90

출처

jdk 설치

~/.profile 에 JAVA_HOME, PATH 추가

export JAVA_HOME=/Server/java/jdk1.8.0_131
export PATH=$PATH:$JAVA_HOME/bin

java 버전 확인

X
user@localhost:~

bluesanta@bluesanta-desktop:~$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Wowza 설치 파일 실행 권한 부여

X
user@localhost:~

bluesanta@bluesanta-desktop:~$ chmod u+x WowzaStreamingEngine-4.8.23+2-linux-x64-installer.run

Wowza 설치

Wowza 설치 파일 실행

X
user@localhost:~

bluesanta@bluesanta-desktop:~$ sudo ./WowzaStreamingEngine-4.8.23+2-linux-x64-installer.run
----------------------------------------------------------------------------
Welcome to the Wowza Streaming Engine Setup Wizard.
 
----------------------------------------------------------------------------
Please read the following License Agreement. You must accept the terms of this 
agreement before continuing with the installation.
 
Press [Enter] to continue:

Wowza 라이센스 확인

[Enter] 키를 계속 눌러서 라이센스 내용 전부 조회

X
user@localhost:~

Wowza(tm) Media Systems, LLC
END USER LICENSE AGREEMENT
for
Wowza Streaming Engine(tm) 4 Software
And Related Software Products and Services
 
       Thank you for choosing software from Wowza Media Systems, LLC.  This End 
User License Agreement (this "EULA") is a legally binding license agreement between 
you and Wowza Media Systems, LLC that describes your rights to use software and 
services provided by Wowza, including Wowza Streaming Engine software and technical 
support and maintenance for that software.  
       
       This EULA is divided into various sections, including the following License 
Overview that provides a summary of the EULA.  Please read this EULA carefully and in 
its entirety before clicking "I AGREE", installing, or using Wowza Streaming Engine 
software or other software provided to you by Wowza.   
       
       BY SELECTING "I AGREE" DURING INSTALLATION OF THE SOFTWARE, 
Press [Enter] to continue:

Wowza 라이센스 동의

X
user@localhost:~

 
   13.2 U.S. Government Licensing of Wowza Software.  You agree that when 
licensing the Software for acquisition by the U.S. Government, or any contractor 
 
therefore, you will license consistent with the policies set forth in 48 C.F.R. 
Section 
12.212 (for civilian agencies) and 48 C.F.R. Sections 227-7202-1 and 227-7202-4 
(for 
the Department of Defense). For U.S. Government End Users, Wowza agrees to 
comply 
with all applicable equal opportunity laws including, if appropriate, the 
Press [Enter] to continue:
provisions of 
Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans 
Readjustment Assistance Act of 1974 (38 USC 4212), and Section 503 of the 
Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 
 
through 60-60, 60-250, and 60-741. The affirmative action clause and regulations 
 
contained in the preceding sentence shall be incorporated by reference in this Agreement. 
 
 
 
 
 
Wowza Streaming Engine 4 EULA (20201204)
 
Press [Enter] to continue:
 
Do you accept this agreement? [y/n]: y

라이센스 번호 입력

X
user@localhost:~

----------------------------------------------------------------------------
Enter License Key
 
Please enter your Wowza Streaming Engine License Key.
 
            Format: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX[-XXXXXXXXXXXX]
 
 
 
   
 
License Key: []: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

관리자 계정생성

X
user@localhost:~

----------------------------------------------------------------------------
Create Administrator Account
 
Enter a user name and password that will be used to manage Wowza Streaming 
Engine.
 
User Name: []: admin
 
Password: :1q@w3e4r
Confirm Password: :1q@w3e4r
Note: User Name and Password are case-sensitive.
 
----------------------------------------------------------------------------
Startup Configuration
 
  
 
 
 
Start Wowza Streaming Engine automatically [Y/n]: Y

Wowza 설치

X
user@localhost:~

----------------------------------------------------------------------------
Startup Configuration
 
  
 
 
 
Start Wowza Streaming Engine automatically [Y/n]: Y
 
 
 Clear the check box to start Wowza Streaming Engine manually.
 
 
----------------------------------------------------------------------------
Setup is now ready to begin installing Wowza Streaming Engine on your computer.
 
Do you want to continue? [Y/n]: Y
 
----------------------------------------------------------------------------
Please wait while Setup installs Wowza Streaming Engine on your computer.
 
 Installing
 0% ______________ 50% ______________ 100%
 #########################################
 
----------------------------------------------------------------------------
Setup has finished installing Wowza Streaming Engine on your computer.

Wowza 관리 페이지 접속 허용 설정

설정파일 Server.xml에 IPWhiteList에 IP를 추가하거나 모두 허용( * )으로 설정

X
user@localhost:~

bluesanta@bluesanta-desktop:~$ sudo vi /usr/local/WowzaStreamingEngine/conf/Server.xml

                        <!--
                        <IPWhiteList>127.0.0.1</IPWhiteList>^M
                        -->
                        <IPWhiteList>*</IPWhiteList>

Wowza 서비스 재시작

X
user@localhost:~

bluesanta@bluesanta-desktop:~$ sudo systemctl restart WowzaStreamingEngine.service
bluesanta@bluesanta-desktop:~$ sudo systemctl restart WowzaStreamingEngineManager.service

728x90
728x90

출처

openssl.cnf 내용 추가

X
user@localhost:~

sudo vi /usr/lib/ssl/openssl.cnf

# openssl_conf = openssl_init
openssl_conf = default_conf

[default_conf]
ssl_conf = ssl_sect

[ssl_sect]
system_default = ssl_default_sect

[ssl_default_sect]
MinProtocol = TLSv1
CipherString = DEFAULT:@SECLEVEL=1

MySQL 환경파일 수정

X
user@localhost:~

[user@localhost]$ sudo vi /Server/MySQL/mysql57/my.cnf

[mysqld]
# tls_version=TLSv1.2
ssl_cipher=DEFAULT:@SECLEVEL=1
bind-address=0.0.0.0

MySQL 재시작

X
user@localhost:~

[user@localhost]$ sudo service mysqld57 restart

728x90
728x90

출처

리눅스 정보 조회

출처 : 리눅스 종류 확인, 리눅스 버전 확인 - 제타위키

X
user@localhost:~

[user@localhost]$ cat /etc/*-release | uniq
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

리눅스 비트 확인

출처 : 리눅스 32비트 64비트 확인 - 제타위키

X
user@localhost:~

[user@localhost]$ getconf LONG_BIT
64

관련패키지 설치

X
user@localhost:~

[user@localhost]$ sudo apt install gcc g++ libncurses5-dev libxml2-dev openssl libssl-dev curl libcurl4-openssl-dev libjpeg-dev libpng-dev libfreetype6-dev libsasl2-dev autoconf libncurses5-dev

MySQL 계정 만들기

X
user@localhost:~

[user@localhost]$ sudo groupadd mysql
[user@localhost]$ sudo useradd -g mysql -s /bin/bash -m mysql

cmake 설치

X
user@localhost:~

[user@localhost]$ sudo apt install cmake pkg-config

MySQL 소스 다운로드, 압축해제, 컴파일, 설치

X
user@localhost:~

[user@localhost]$ wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.44.tar.gz
[user@localhost]$ tar xvf mysql-boost-5.7.44.tar.gz
[user@localhost]$ cd mysql-5.7.44
[user@localhost]$ cmake \
-DCMAKE_INSTALL_PREFIX=/Server/MySQL/mysql57 \
-DMYSQL_DATADIR=/Server/MySQL/mysql57/data \
-DMYSQL_UNIX_ADDR=/Server/MySQL/mysql57/mysql.sock \
-DSYSCONFDIR=/Server/MySQL/mysql57 \
-DMYSQL_TCP_PORT=3306 \
-DMYSQL_USER=mysql \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DDOWNLOAD_BOOST=0 -DWITH_BOOST=./boost
[user@localhost]$ make
[user@localhost]$ make install

환경설정

X
user@localhost:~

[user@localhost]$ vi /Server/MySQL/mysql57/my.cnf

my.cnf

[mysqld]
port=3306
event_scheduler = ON
basedir=/Server/MySQL/mysql57
datadir=/Server/MySQL/mysql57/data
# pid-file=/Server/MySQL/mysql57/mysqld.pid
# log_error=/Server/MySQL/mysql57/mysql_error.log
# lc-messages-dir=/Server/MySQL/mysql57/share

init_connect=SET collation_connection = utf8_general_ci
init_connect=SET NAMES utf8
character-set-server=utf8
collation-server=utf8_general_ci
# table_cache=1024
max_connections=2048
max_user_connections=500
max_connect_errors=10000
wait_timeout=300
query_cache_type = 1
query_cache_size = 128M
query_cache_limit = 5M
slow_query_log
long_query_time=3
max_allowed_packet=16M
sort_buffer_size = 2M
# skip-innodb
skip-name-resolve
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
lower_case_table_names = 1

[mysql]
default-character-set=utf8

[client]
default-character-set=utf8

MySQL 설치 디렉토리 mysql 계정으로 권한 수정

X
user@localhost:~

[user@localhost]$ sudo chown -R mysql:mysql /Server/MySQL/mysql57

MySQL 데이터베이스 초기화 (mysql 계정으로 실행)

X
user@localhost:~

[user@localhost]$ su mysql
mysql@bluexmas:~$ cd /Server/MySQL/mysql57
mysql@bluexmas:/Server/MySQL/mysql57$ bin/mysql_install_db --no-defaults --user=mysql --datadir=/Server/MySQL/mysql57/data --basedir=/Server/MySQL/mysql57 -v
2023-12-23 19:54:33 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2023-12-23 19:54:33 [NOTE]    Creating data directory /Server/MySQL/mysql57/data
2023-12-23 19:54:33 [NOTE]    Generating random password to /home/mysql/.mysql_secret...done.
2023-12-23 19:54:33 [NOTE]    Executing /Server/MySQL/mysql57/bin/mysqld --no-defaults --bootstrap --datadir=/Server/MySQL/mysql57/data --lc-messages-dir=/Server/MySQL/mysql57/share --lc-messages=en_US --basedir=/Server/MySQL/mysql57
2023-12-23 19:54:37 [NOTE]    Creating system tables...done.
2023-12-23 19:54:37 [NOTE]    Filling system tables with data...done.
2023-12-23 19:54:37 [NOTE]    Filling help table with data...done.
2023-12-23 19:54:37 [NOTE]    Creating user for internal session service...done.
2023-12-23 19:54:37 [NOTE]    Creating default user root@localhost
2023-12-23 19:54:37 [NOTE]    Creating default proxy root@localhost
2023-12-23 19:54:37 [NOTE]    Creating sys schema
2023-12-23 19:54:38 [NOTE]    done.
2023-12-23 19:54:39 [WARNING] The bootstrap log isn't empty:
2023-12-23 19:54:39 [WARNING] 2023-12-23T10:54:33.906900Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead

MySQL 서비스 등록

서비스 mysqld 파일 복사

X
user@localhost:~

[user@localhost]$ sudo cp /Server/MySQL/mysql57/support-files/mysql.server /etc/init.d/mysqld57

mysqld 수정

X
user@localhost:~

[user@localhost]$ sudo vi /etc/init.d/mysqld57

mysqld파일을 열어서 basedir에 mysql이 설치된 디렉토리와 데이터 디렉토리(datadir)를 설정한다.

basedir=/Server/MySQL/mysql57
datadir=/Server/MySQL/mysql57/data

mysqld 서비스 등록

X
user@localhost:~

[user@localhost]$ sudo update-rc.d mysqld57 defaults

mysqld 서비스 실행

X
user@localhost:~

[user@localhost]$ sudo service mysqld57 start
[user@localhost]$ sudo service mysqld57 status
● mysqld57.service - LSB: start and stop MySQL
     Loaded: loaded (/etc/init.d/mysqld57; generated)
     Active: active (running) since Sat 2023-12-23 19:57:54 KST; 15s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 61861 ExecStart=/etc/init.d/mysqld57 start (code=exited, status=0/SUCCESS)
      Tasks: 29 (limit: 18671)
     Memory: 175.0M
        CPU: 772ms
     CGroup: /system.slice/mysqld57.service
             ├─61881 /bin/sh /Server/MySQL/mysql57/bin/mysqld_safe --datadir=/Server/MySQL/mysql57/data --pid-file=/Ser>
             └─62295 /Server/MySQL/mysql57/bin/mysqld --basedir=/Server/MySQL/mysql57 --datadir=/Server/MySQL/mysql57/d>
 
12월 23 19:57:53 bluesanta-desktop systemd[1]: Starting LSB: start and stop MySQL...
12월 23 19:57:53 bluesanta-desktop mysqld57[61861]: Starting MySQL
12월 23 19:57:53 bluesanta-desktop mysqld57[61861]: .
12월 23 19:57:53 bluesanta-desktop mysqld57[61881]: Logging to '/Server/MySQL/mysql57/data/bluesanta-desktop.err'.
12월 23 19:57:54 bluesanta-desktop mysqld57[61861]:  *
12월 23 19:57:54 bluesanta-desktop systemd[1]: Started LSB: start and stop MySQL.

root 암호 초기화

권한을 무시하고 mysql 서버 실행

X
user@localhost:~

mysql@bluexmas:/Server/MySQL/mysql57$ bin/mysqld_safe --skip-grant-tables &
[1] 62790
mysql@bluesanta-desktop:/Server/MySQL/mysql57$ 2023-12-23T11:06:36.242790Z mysqld_safe Logging to '/Server/MySQL/mysql57/data/bluesanta-desktop.err'.
2023-12-23T11:06:36.272476Z mysqld_safe Starting mysqld daemon with databases from /Server/MySQL/mysql57/data

root 암호 설정

X
user@localhost:~

mysql@bluexmas:/Server/MySQL/mysql57$ bin/mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.44-log Source distribution
 
Copyright (c) 2000, 2023, 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> update user set authentication_string = password('sqldba') where user = 'root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1
 
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
 
mysql> quit
Bye

ERROR 1820 (HY000) 오류 해결

X
user@localhost:~

mysql@bluexmas:/Server/MySQL/mysql57$ bin/mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.44-log
 
Copyright (c) 2000, 2023, 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
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> SET PASSWORD = PASSWORD('sqldba');
Query OK, 0 rows affected, 1 warning (0.00 sec)
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>

사용자 추가

X
user@localhost:~

mysql> create user 'user1'@'%' identified by 'userpw';
mysql> grant all privileges on *.* to 'user1'@'%' with grant option;
mysql> flush privileges;

사용자 추가

X
user@localhost:~

mysql> create user 'terecal'@'%' identified by '****';
mysql> GRANT ALL privileges ON terecal_db.* TO 'terecal'@'%';
mysql> flush privileges;

728x90

+ Recent posts