728x90
반응형

samba (삼바)란?

삼바(samba)는 Windows 운영체제를 사용하는 PC에서 Linux 또는 UNIX 서버에 접속하여 파일이나 프린터를 공유하여 사용할 수 있도록 해 주는 소프트웨어입니다. 

 

윈도우는 파일 시스템은 NTFS 이고 리눅스는 ext 입니다.

파일 시스템이 서로 다르다 보니 서로의 하드 디스크를 읽거나 쓰지 못합니다. 이러한 이유로 서로다른 파일 시스템의 자료를 공유 할수 있도록 하기 위한 소프트웨어로 삼바를 사용하게 됩니다.

 

설치를 진행하게될 리눅스 서버는 CentOS Linux release 7.9.2009 (Core) 입니다. 

samba 설치 

 yum install samba

samba 버전확인 

$ rpm -qa samba
samba-4.10.16-18.el7_9.x86_64

공유 데릭토리 생성

//삼바 접속 계정생성
adduser -d /data1/mydata mydata

//삼바 passwd 설정 
passwd mydata

//공유 디렉토리 생성
mkdir sharedisk

samba user 등록

 smbpasswd -a mydata

samba 환경설정

  • 변경 및 추가 부분은 색깔로 표시 했습니다.
vi /etc/samba/smb.conf

[global]
        workgroup = WORKGROUP // 작업그룹 설정
        security = user

        passdb backend = tdbsam

        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw
        hosts allow = 192.168.17. // 접속 허용 IP 설정

[homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes

[printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @printadmin root
        force group = @printadmin
        create mask = 0664
        directory mask = 0775

[mydata] // 윈도우 네트워크 드라이브상에  출력될 이름
        path = /data1/mydata/sharedisk // 리눅스 공유 디렉토리 생성 
        public = yes // 공유 
        writable = yes //쓰기가능 
        write list = smbuser // 접속 허용 유저 ,삼바 유저로 등록 한 계정 , 여러 계정일 경우 씌워쓰기로 설정 
        create mask = 0777 // 생성 권한
        directory mask = 0777 // 디렉토리 권한 설정 

 

방화벽 해제

// 방화벽 해제
firewall-cmd --permanent --add-port=139/tcp 

firewall-cmd --permanent --add-port=445/tcp

firewall-cmd --permanent --zone=public --add-service=samba

firewall-cmd --reload

//삼바 재시작
systemctl restart smb

Samba 상태 확인 

[root@minsvr:/root]$ smbstatus                

Samba version 4.10.16
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing              
----------------------------------------------------------------------------------------------------------------------------------------
11114   mydata       mydata       192.168.xx.xx (ipv4:192.168.xx.xx:62083)  SMB3_11           -                    partial(AES-128-CMAC)

Service      pid     Machine       Connected at                     Encryption   Signing     
---------------------------------------------------------------------------------------------
mydata       11114   192.168.xx.xx 월  3월 21 18시 48분 52초 2022 KST -            -           

Locked files:
Pid          User(ID)   DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
11114        1033       DENY_NONE  0x100081    RDONLY     NONE             /data1/mydata/sharedisk   .   Mon Mar 21 18:50:33 2022
11114        1033       DENY_NONE  0x100081    RDONLY     NONE             /data1/mydata/sharedisk   .   Mon Mar 21 18:50:33 2022
11114        1033       DENY_NONE  0x100081    RDONLY     NONE             /data1/mydata/sharedisk   .   Mon Mar 21 18:50:33 2022

 

윈도우 Samba 접속 

Window + R 키 입력후 삼바 서버 접속 

 

윈도우 삼바 접속

728x90
반응형
728x90
반응형

리눅스에서 OpenJdk 설치하는 방법에 대해 소개 하고 설치된 버전을 손쉽게 변경하는 방법에대해 알아보겠습니다. 

java 설치 (JDK: Java Development Kit: javac)

jdk 설치 리스트 확인 

yum list java*jdk-devel

yum install java-1.8.0-openjdk-devel.x86_64

 

JRE 설치( Java Runtime Environment:java)

 

yum list java*jdk 

yum install java-1.8.0-openjdk.x86_64

 

java version 변경

  • alternatives --config [java/javac] 명령어 수행 후  변경하고자 하는 번호를 선택 하면 됩니다.

 

$ alternatives --config java

2 개의 프로그램이 'java'를 제공합니다.

  선택    명령
-----------------------------------------------
   1           java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64/jre/bin/java)
*+ 2           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7_9.x86_64/jre/bin/java)


 

javac 버전 변경

 alternatives --config javac

2 개의 프로그램이 'javac'를 제공합니다.

  선택    명령
-----------------------------------------------
*+ 1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7_9.x86_64/bin/javac)
   2           java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64/bin/javac)
728x90
반응형

'03.Program > 02.java' 카테고리의 다른 글

[Java] JDBC 프로그래밍  (0) 2022.04.20
[Java basic-Utility] 파일 비교  (0) 2022.03.27
[Java basic-Utility] 디렉토리 파일 리스트 조회  (0) 2022.03.26
728x90
반응형

docker-compose install

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

 

docker-compose 권한 부여

sudo chmod +x /usr/local/bin/docker-compose

 

docker-compose 버전 확인

docker-compose --version

 

실행 

 

docker compose V1 , V2

  • docker-compose 는 2023 년 7월 이후 더이상 업데이트 되지 않습니다. 

  • 지금까지 사용했던 compose 버전은 V1 이 였습니다. 
  • 앞으로 더이상 지원 하지 않는 버전이라고 하니 V1 삭제후 V2 로 재설치 하는 방법에 대해 알아봅니다. 
  • 다시말하면 docker-compose 은 v1 이고  docker compose(하이픈 - 없는것) 은 V2 버전으로 알고 있으면 되겠네요.

https://docs.docker.com/compose/migrate/#what-are-the-differences-between-compose-v1-and-compose-v2

 

Migrate to Compose V2

How to migrate from Compose V1 to V2

docs.docker.com

 

 

docker compose  V2 Install 

  • 설치된 v1 을 삭제 하고 v2 를 설치 합니다. 

docker-compose  v1 uninstall 

sudo yum remove docker-compose-plugin

 

docker-compose  v2 install 

sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

 

설치 버전 확인 

[root@centos7:/root]$ docker --version
Docker version 26.1.4, build 5650f9b
[root@centos7:/root]$ docker compose version
Docker Compose version v2.27.1
728x90
반응형
728x90
반응형

Ubuntu Repository update

sudo apt-get update

sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
    
    
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg    

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Docker Engine 설치

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
#  sudo apt-get install docker-ce docker-ce-cli containerd.io
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  docker-ce-rootless-extras docker-scan-plugin git git-man liberror-perl pigz slirp4netns
Suggested packages:
  aufs-tools cgroupfs-mount | cgroup-lite git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
  containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras docker-scan-plugin git git-man liberror-perl pigz slirp4netns
0 upgraded, 10 newly installed, 0 to remove and 23 not upgraded.
Need to get 104 MB of archives.
After this operation, 448 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://download.docker.com/linux/ubuntu focal/stable amd64 containerd.io amd64 1.5.10-1 [24.9 MB]
..... 중략
Setting up git (1:2.25.1-1ubuntu3.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.15) ...

Docker Version 선택 설치 

도커는 버전별로 선택해서 설치를 진행 할수 있습니다. 

설치 가능 버전 확인후 선택해서 설치를 진행하면 됩니다. 

설치 버전 확인 

apt-cache madison docker-ce
 docker-ce | 5:20.10.13~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.12~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.11~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.10~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.9~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.8~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.7~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.6~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.5~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.4~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.3~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.2~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.1~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.0~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.15~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.14~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.13~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.12~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.11~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.10~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.9~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages

Docker 버전 선택 설치 

#sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
sudo apt-get install docker-ce=5:19.03.15~3-0~ubuntu-focal docker-ce-cli=5:19.03.15~3-0~ubuntu-focal containerd.io

Docker 중지/시작 명령어 

#도커 재시작 
service docker restart

#도커 중지 
service docker stop


#도커 시작 
service docker start

Docker 상태 확인

docker ps -a
728x90
반응형
728x90
반응형

우분투 서버에 다른 PC에서 SSH로 접속하는 방법에 대해 알아보겠습니다. 

제가 설치한 우분투 버전은 Ubuntu 20.04.4 LTS 입니다. 

지금부터 설치와 접속 방법에 대해 소개하겠습니다. 

 

Open ssh Server Install 

sudo apt update

sudo apt install openssh-server

 

min@min-server:~/바탕화면$ su - root
암호: 
root@min-server:~# apt update
기존:1 https://dl.google.com/linux/chrome/deb stable InRelease
받기:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                                  
기존:3 http://kr.archive.ubuntu.com/ubuntu focal InRelease                                            
받기:4 http://kr.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                           
받기:5 http://kr.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
받기:6 http://kr.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [616 kB]
받기:7 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,642 kB]
받기:8 http://kr.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [23.8 kB]
받기:9 http://kr.archive.ubuntu.com/ubuntu focal-updates/multiverse i386 Packages [8,460 B]
내려받기 2,627 k바이트, 소요시간 3초 (800 k바이트/초)           
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
패키지 23이(가) 업그레이드되었습니다. 'apt list --upgradable'를 실행하여 확인해 보십시오.
root@min-server:~# sudo apt install openssh-server
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음의 추가 패키지가 설치될 것입니다 :
  ncurses-term openssh-sftp-server ssh-import-id
제안하는 패키지:
  molly-guard monkeysphere ssh-askpass
다음 새 패키지를 설치할 것입니다:
  ncurses-term openssh-server openssh-sftp-server ssh-import-id
0개 업그레이드, 4개 새로 설치, 0개 제거 및 23개 업그레이드 안 함.
688 k바이트 아카이브를 받아야 합니다.
이 작업 후 6,010 k바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] y
받기:1 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 ncurses-term all 6.2-0ubuntu2 [249 kB]
받기:2 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 openssh-sftp-server amd64 1:8.2p1-4ubuntu0.4 [51.5 kB]
받기:3 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 openssh-server amd64 1:8.2p1-4ubuntu0.4 [377 kB]
받기:4 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 ssh-import-id all 5.10-0ubuntu1 [10.0 kB]
내려받기 688 k바이트, 소요시간 2초 (284 k바이트/초)
패키지를 미리 설정하는 중입니다...
Selecting previously unselected package ncurses-term.
(데이터베이스 읽는중 ...현재 194432개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../ncurses-term_6.2-0ubuntu2_all.deb ...
Unpacking ncurses-term (6.2-0ubuntu2) ...
Selecting previously unselected package openssh-sftp-server.
Preparing to unpack .../openssh-sftp-server_1%3a8.2p1-4ubuntu0.4_amd64.deb ...
Unpacking openssh-sftp-server (1:8.2p1-4ubuntu0.4) ...
Selecting previously unselected package openssh-server.
Preparing to unpack .../openssh-server_1%3a8.2p1-4ubuntu0.4_amd64.deb ...
Unpacking openssh-server (1:8.2p1-4ubuntu0.4) ...
Selecting previously unselected package ssh-import-id.
Preparing to unpack .../ssh-import-id_5.10-0ubuntu1_all.deb ...
Unpacking ssh-import-id (5.10-0ubuntu1) ...
openssh-sftp-server (1:8.2p1-4ubuntu0.4) 설정하는 중입니다 ...
openssh-server (1:8.2p1-4ubuntu0.4) 설정하는 중입니다 ...
Creating config file /etc/ssh/sshd_config with new version
Creating SSH2 RSA key; this may take some time ...
3072 SHA256:oN/4NemlZx06om65/xj6en+ZfJL1vnNLEUpS85tluh4 root@min-server (RSA)
Creating SSH2 ECDSA key; this may take some time ...
256 SHA256:sIwnjEfSdu/Pqb0jQwVrigRwrJUtTizyGrqu3Fjgjqg root@min-server (ECDSA)
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:LS1OyULLQ0ZywTGiap8KJOW2NzL61r0L4+C7+uWz888 root@min-server (ED25519)
Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service → /lib/systemd/system/ssh.service.
rescue-ssh.target is a disabled or a static unit, not starting it.
ssh-import-id (5.10-0ubuntu1) 설정하는 중입니다 ...
Attempting to convert /etc/ssh/ssh_import_id
ncurses-term (6.2-0ubuntu2) 설정하는 중입니다 ...
Processing triggers for systemd (245.4-4ubuntu3.15) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ufw (0.36-6ubuntu1) ...
내용 작성

 

SSH 실행 상태 확인 및  활성화 (sudo systemctl status ssh)

sudo systemctl status ssh

sudo systemctl enable ssh

sudo systemctl start ssh 

sudo systemctl restart ssh 

sudo systemctl stop ssh

 

$ sudo systemctl status ssh 
[sudo] min의 암호: 
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-03-19 11:26:10 KST; 22min ago
       Docs: man:sshd(8)
             man:sshd_config(5)
   Main PID: 4744 (sshd)
      Tasks: 1 (limit: 13936)
     Memory: 1.0M
     CGroup: /system.slice/ssh.service
             └─4744 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

 3월 19 11:26:10 min-server systemd[1]: Starting OpenBSD Secure Shell server...
 3월 19 11:26:10 min-server sshd[4744]: Server listening on 0.0.0.0 port 22.
 3월 19 11:26:10 min-server sshd[4744]: Server listening on :: port 22.
 3월 19 11:26:10 min-server systemd[1]: Started OpenBSD Secure Shell server.

SSH 서버가 중지 상태일때  모습니다. 

 

root@min-server:~# sudo systemctl stop ssh 
root@min-server:~# sudo systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Sat 2022-03-19 11:53:01 KST; 3s ago
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 6437 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
    Process: 6438 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=0/SUCCESS)
   Main PID: 6438 (code=exited, status=0/SUCCESS)

 3월 19 11:52:33 min-server systemd[1]: Starting OpenBSD Secure Shell server...
 3월 19 11:52:33 min-server sshd[6438]: Server listening on 0.0.0.0 port 22.
 3월 19 11:52:33 min-server sshd[6438]: Server listening on :: port 22.
 3월 19 11:52:33 min-server systemd[1]: Started OpenBSD Secure Shell server.
 3월 19 11:53:01 min-server systemd[1]: Stopping OpenBSD Secure Shell server...
 3월 19 11:53:01 min-server sshd[6438]: Received signal 15; terminating.
 3월 19 11:53:01 min-server systemd[1]: ssh.service: Succeeded.
 3월 19 11:53:01 min-server systemd[1]: Stopped OpenBSD Secure Shell server.

 

방화벽 상태 확인 및 비 활성화(Firewall)

sudo ufw allow ssh

sudo ufw status

 

root@min-server:~# sudo ufw allow ssh
규칙이 업데이트됐습니다
규칙이 업데이트됐습니다(v6)
root@min-server:~# sudo ufw status
상태: 비활성
root@min-server:~# 

 

SSH 클라이언트 접속 

접속해볼 클라이언트 테스트 계정을 생성해 보겠습니다. 

저는 앞으로 Docker 를 공부해 볼 계획이라 docker-test 계정을 생성하겠습니다. 

테스트 절차는 아래 내용으로 진행 하겠습니다. 

 

1. 테스트 계정 생성 

2. 우분투 서버 IP 정보 확인 

3.리눅스 테스트 계정 접속 

4. 리모트 서버(윈도우 노트북 -> 우분투 테스트 계정 접속)

 

테스트 계정 생성 

# adduser docker-test
'docker-test' 사용자를 추가 중...
새 그룹 'docker-test' (1001) 추가 ...
새 사용자 'docker-test' (1001) 을(를) 그룹 'docker-test' (으)로 추가 ...
'/home/docker-test' 홈 디렉터리를 생성하는 중...
'/etc/skel'에서 파일들을 복사하는 중...
새  암호: 
새  암호 재입력: 
passwd: 암호를 성공적으로 업데이트했습니다
docker-test의 사용자의 정보를 바꿉니다
새로운 값을 넣거나, 기본값을 원하시면 엔터를 치세요
이름 []: 
방 번호 []: 
직장 전화번호 []: 
집 전화번호 []: 
기타 []: 
정보가 올바릅니까? [Y/n] 

 

우분투 서버 IP 정보 확인 

# ifconfig
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 180.64.82.103  netmask 255.255.255.192  broadcast 180.64.82.127
        inet6 fe80::8129:3259:2d4c:d494  prefixlen 64  scopeid 0x20<link>
        ether bc:5f:f4:38:74:e5  txqueuelen 1000  (Ethernet)
        RX packets 27950  bytes 27074047 (27.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 17481  bytes 3314029 (3.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 868  bytes 84762 (84.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 868  bytes 84762 (84.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

리눅스 테스트 계정 접속 

# ssh docker-test@180.64.82.103
The authenticity of host '180.64.82.103 (180.64.82.103)' can't be established.
ECDSA key fingerprint is SHA256:sIwnjEfSdu/Pqb0jQwVrigRwrJUtTizyGrqu3Fjgjqg.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added '180.64.82.103' (ECDSA) to the list of known hosts.
docker-test@180.64.82.103's password: 
Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.13.0-35-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

22 updates can be applied immediately.
추가 업데이트를 확인하려면 apt list --upgradable 을 실행하세요.

Your Hardware Enablement Stack (HWE) is supported until April 2025.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

 

리모트 서버(윈도우 노트북 -> 우분투 테스트 계정 접속)

윈도우 노트북 SecureCRT 에서 우분투 접속을 하려고 하니 아래와 같은 에러가 발생합니다. 

Key exchange failed.
No compatible key exchange method. The server supports these methods: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256

/etc/ssh/sshd_config 를 수정 해서 문제를 해결하겠습니다. 

 

vi /etc/ssh/sshd_config

KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +aes128-cbc

systemctl restart sshd

위 작업을 수행하니 이제 정상 접속이 되고 있네요 

 

728x90
반응형
728x90
반응형

우분투 버전 확인 기본 명령어 

lsb_release -a 명령어를 사용하면 현재 설치된 우분투 버전 정보가 확인 가능 합니다. 

 

 lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

현재 데스크탑에 설치된 우분투 버전은 Ubuntu 20.04.4 LTS 입니다.

 

기타 명령어 

cat /etc/issue

cat /etc/os-release

hostnamectl

 

 

min@min-server:~/바탕화면$ cat /etc/issue
Ubuntu 20.04.4 LTS \n \l


min@min-server:~/바탕화면$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
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"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

min@min-server:~/바탕화면$ hostnamectl
   Static hostname: min-server
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: e10702539e504a0fa045f0529579781f
           Boot ID: 85fa0694820a45b9af1cfe85be3ae16f
  Operating System: Ubuntu 20.04.4 LTS
            Kernel: Linux 5.13.0-35-generic
      Architecture: x86-64

728x90
반응형
728x90
반응형

자주사용하는 도커 명령어에 대해 정리해 보았습니다. 

 

Docker Volume 명령어

docker volume create test-volume 

docker volume ls

docker volume inspect test-volume

docker volume rm test-volume

 

docker volume 생성 

[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume create test-volume
test-volume

 

docker volume list 확인 

[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume ls
DRIVER    VOLUME NAME
local     compose_config_files
local     compose_db
local     compose_django
local     django-on-docker_media_volume
local     django-on-docker_postgres_data
local     django-on-docker_static_volume
local     oracle-docker_oradata
local     qms-on-docker_media_volume
local     qms-on-docker_postgres_data
local     qms-on-docker_static_volume
local     test-volume

 

docker volume 정보 확인 

[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume inspect test-volume
[
    {
        "CreatedAt": "2022-03-18T19:29:25+09:00",
        "Driver": "local",
        "Labels": {},
        "Mountpoint": "/data300G/docker-image/volumes/test-volume/_data",
        "Name": "test-volume",
        "Options": {},
        "Scope": "local"
    }
]

 

docker volume 삭제

[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume rm test-volume
test-volume
[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume ls
DRIVER    VOLUME NAME
local     compose_config_files
local     compose_db
local     compose_django
local     django-on-docker_media_volume
local     django-on-docker_postgres_data
local     django-on-docker_static_volume
local     oracle-docker_oradata
local     qms-on-docker_media_volume
local     qms-on-docker_postgres_data
local     qms-on-docker_static_volume

 

Docker 컨테이너 모두 중지 및 삭제

 docker stop $(docker ps -a -q)
 docker rm $(docker ps -a -q)

 

$ docker ps -a 
CONTAINER ID   IMAGE                       COMMAND                  CREATED        STATUS                    PORTS                                                                                  NAMES
9cffbff6ec74   oracle/database:19.3.0-ee   "/bin/sh -c 'exec $O   24 hours ago   Up 49 minutes (healthy)   0.0.0.0:1521->1521/tcp, :::1521->1521/tcp, 0.0.0.0:5500->5500/tcp, :::5500->5500/tcp   ora19c

$ docker ps -a -q
9cffbff6ec74

Docker Image 모두 삭제

docker rmi $(docker images -q)

Docker Image 리스트 확인

[oracle-docker@minsvr:/data1/oracle-docker]$ docker image ls 
REPOSITORY                           TAG                   IMAGE ID       CREATED          SIZE
192.168.17.83:5000/oracle/database   19.3.0-ee_v2          7a2299cca529   46 minutes ago   6.97GB
oracle/database                      19.3.0-ee             a5a30da1721d   3 weeks ago      6.54GB
oraclelinux                          7-slim                4133e87bc7fa   2 months ago     132MB
apache/ozone-runner                  20200625-1            f6874ac36a4c   21 months ago    1.07GB
tomcat                               8.5.46-jdk8-openjdk   8973f493aa0a   2 years ago      508MB
[oracle-docker@minsvr:/data1/oracle-docker]$ docker images -q
7a2299cca529
a5a30da1721d
4133e87bc7fa
f6874ac36a4c
8973f493aa0a
728x90
반응형
728x90
반응형

우분투 크롬 (Chrom) 설치

우부투(Ubuntu)설치시에 크롬은 기본 설치 되어 있지 않습니다.
기본 설치된 브라우저는 파이어 폭스가 설치 되어있습니다.
이번 포스팅에서는 Ubuntu 20.04.4 LTS 버전에서 크롬을 설치 하는 방법에 대해 알아 보겠습니다.
* 우분투 버전 정보 확인 방법
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

 

우분투 다운로드 (Ubuntu)

단축키(Ctrl+Alt+T) 또는 응용프로그램에서 터미널을  wget 명령을 이용해서 구글 크롬의 최신 .deb package 파일을다운로드 해야합니다.

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

Chrome Install (크롬 설치)

sudo apt install ./google-chrome-stable_current_amd64.deb

우분투 (Chrome) 크롬 실행

정상적으로 크롬이 설치 되었다면 우분투 프로그램 선택 하면 크롬 부라우저가 추가된것으로 확인 할수 있습니다.

이제부터 크롬 브라우져를 통해 웹 서칭을 할수 있겠네요 ^^

 

 

728x90
반응형
728x90
반응형

우분투에서는 기본적으로 윈도우 처럼 그림판 프로그램이 없어 캡쳐된 이미지를 편집 할 수 없습니다.

캡쳐된 이미지를 편집하기 위한 방법에 대해 이번 포스팅에서는 알아 보겠습니다.

우분투 이미지 캡쳐 방법

Ctrl +Shift + Print  단축 키로 그림을 캡쳐  할수 있고 Ctrl +v 로 캡쳐된 이미지를 붙여 넣기 할수 있습니다.

 

그림판 설치 (kolourpaint4)

sudo apt-get install kolourpaint4

그림판 팩키지 설치

그림판 실행 (kolourpaint4)

정상적으로 설치 되었다면 우분투 프로그램 매뉴 화면을 클릭해서 kolourpaint4 실행시켜서 캡쳐된 이미지를 편집 할수 있습니다.

실행화면

 

728x90
반응형

'06.OS > Linux' 카테고리의 다른 글

[Ubuntu] Vmware Ubuntu20.04 LTS 설치  (0) 2022.03.26
[Shell]trap 을 활용한 리눅스(Signal) 시그널 처리  (0) 2022.03.25
Ubuntu SSH 접속 방법  (0) 2022.03.20
Ubuntu 명령어  (0) 2022.03.19
우분투 Chrom(크롬)설치  (0) 2022.03.09
728x90
반응형

티스토리 글을 광고 글 없이 저장하는 방법

블러그 글을 쓰다 보면 작성된 글을 별도로 어떻게 저장할수 있을까에 대한 고민을 하게됩니다. 
브라우저에서 인쇄 버튼을 눌러서 PDF 문서로 저장 하게 되는데요 
이런 방법으로 글을 저장을 하면 불 필요한 광고 문구 까지 문서에 포함 되어 저장 되게 됩니다. 

이번 포스팅에 서는 이런 문제를 해결 하기 위한 방법을 소개하겠습니다. 

 

1.네이버 웨일 에서 PDF 저장 

네이버 웨일이나 구글 크롬 브라우저 에서  우측 상단에 인쇄버튼을 눌러서 PDF 로 글을 저장 할수 있습니다. 

하지만 이 방법을 사용하게 되면 블로그에 원치 않은 머릿글이나 광고글 댓글들이 포함되어 파일로 저장 되게 됩니다. 

확장 프로그램을 통한 PDF 문서 저장 (클린 모드)

웨일 스토어에서 클린모드 앱을 설치 합니다. 

웨일 확장앱 설치

웨일 스토어에서 클린 모드 검색후 확장앱 설치 후 PDF 인쇄 

클린 모드 확장앱 설치&amp;nbsp;

2.크롬 웹스토어  Print Friendly & PDF 확장 프로 그램 설치 

크롬 웹스토어 확장 프로그램 설치(Print Friendly &amp;amp; PDF)

 

마우스 우클릭 후 Print Friendly & PDF 를 클릭 후  문서 저장 

문서 중 삭제하고자 하는 문구가 있다면 마우스 오버시 휴지통 버튼을 클릭하면 내용을 삭제 할수 있습니다. 

하지만 원본 블로그 양식과 차이가 있습니다. 

블로그에서 스킨을 별도로 꾸몄다면 내가 작상한 스킨이 원본 글과 다르게 적용되어 출력 되게됩니다. 

조금 아쉽네요.. 

 

블로그 글  Print Friendly & PDF 적용

 

3.크롬 웹스토어 Print Edit WE 확장 프로 그램 설치 (추천) 

크롬 웹스토어에서 (https://chrome.google.com/webstore) Print Edit WE 검색후 확장 플러그인을 설치 합니다. 

Print Edit WE 플러그인이 정상 설치 되었다면 PDF 로 저장하고 싶은 블로그 글을 플러그인 창에서 클릭해서 실행 하면 됩니다.

해당 플로그인을 통해 PDF 로 저장 하고 싶은 글을 수정하고나 삭제 할수 있습니다. 

선택창 누른후 Delete 버튼 클릭하면 광고글을 삭제 할수 있고 , Undo 버튼을 누른면 이전 상태로 되될릴수 있습니다. 

 

위에서 설명 했던 다른 방법(웨일, 클린모드) 보다 Print Edit WE를 사용해서 PDF 문서를 편집해서 저장 하니 깔끔하네요 ... 강력 추천합니다. 

 

 

 

사용방법 

728x90
반응형

+ Recent posts