본문 바로가기

IT/Linux7

CentOS에서의 /etc/issue, /etc/motd 안녕하세요 헷갈리고 헷갈리는 Linux의 접근 메세지 출력에 대해서 알아보겠습니다. 테스트한 OS는 CentOS 7입니다. 어떻게 접근했을 때 어떤 파일 내용이 출력되는지 확인하기 위해 아래처럼 작업해놨습니다. 1. /etc/ssh/sshd_config 에서 Banner 옵션이 설정되어 있지 않을 경우 이 경우는 접근 시 default로 설정된 파일의 내용이 나오겠죠? 1-1. SSH 연결 SSH로 연결할 경우 로그인 완료 후 /etc/motd 파일의 내용이 출력되네요 1-2. console 연결 로그인 '전에' /etc/issue 멘트가 먼저 나옵니다 이후 로그인 이후 출력되는 motd가 출력되네요 그럼 이번엔 sshd_config에 banner옵션을 주면 어떻게 될까요? 2. sshd_config에 .. 2021. 12. 20.
Linux 백그라운드 실행 Linux 에서 백그라운드로 실행하는 방법을 알아보겠습니다. 1. 시작부터 백그라운드로 실행 명령어 실행부터 백그라운드로 실행하는 방법은 명령어 제일 뒤에 "&" 를 붙이는 방법입니다. 예시1 firefox https://bebhionn.tistory.com & 예시 2 firefox https://bebhionn.tistory.com (실행도중) ctrl + z [컨트롤 + z] 버튼으로 실행중인 프로세스를 백그라운드로 돌릴 수 있습니다! 2021. 10. 2.
Docker로 NginX 구동하기 Docker 이미지 다운로드 #docker pull nginx Using default tag: latest latest: Pulling from library/nginx e1acddbe380c: Pull complete e21006f71c6f: Pull complete f3341cc17e58: Pull complete 2a53fa598ee2: Pull complete 12455f71a9b5: Pull complete b86f2ba62d17: Pull complete Digest: sha256:4d4d96ac750af48c6a551d757c1cbfc071692309b491b70b2b8976e102dd3fef Status: Downloaded newer image for nginx:latest docker.. 2021. 8. 26.
Docker 명령어로 "Hello world" 출력하기 Ubuntu OS에서 Docker-ce까지 설치 했었는데요 Docker가 잘 작동하는지 확인하기 위해 docker container run 명령어를 입력해보도록 하겠습니다. #docker container run docker container run : 컨테이너를 작성 및 실행 : 바탕이 되는 Docker 이미지 : 컨테이너 안에서 실행할 명령 위 명령어를 바탕으로 Docker 컨테이너 안에서 "Hello World"를 표시하겠습니다. #docker container run ubuntu:latest /bin/echo 'Hello World!' Unable to find image 'ubuntu:latest' locally latest: Pulling from library/ubuntu 16ec32c213.. 2021. 8. 26.
Ubuntu 18.04에 Docker 설치 패키지 리스트 업데이트 #sudo apt-get update https를 경유하여 리포지토리를 사용할 수 있도록 패키지 설치 #sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common Docker의 공식 GPG 키를 등록. #curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - OK Repository 등록 #sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" Hit:1 h.. 2021. 8. 25.
Ubuntu 18.04 Network Address 수동 설정 네트워크 변경 파일 #vi /etc/netplan/50-cloud-init.yaml 변경 전 # This file is generated from information provided by # the datasource. Changes to it will not persist across an instance. # To disable cloud-init's network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: eth0: dhcp4: true versi.. 2021. 8. 25.
리눅스에 하마치 설치하기 일단 먼저 lsb 패키지를 설치해줍니다. ----------------------------------------------------------------- ※lsb란? : 리눅스 기본 규격(Linux Standard Base)의 약자, 파일 시스템 계층을 포함한 S/W 시스템 구조를 표준화 하는것이 목적(위키백과) #yum install lsb 그리고 다운로드를 하기위해 홈페이지에 들어갑니다 (https://secure.logmein.com/welcome/labs) 접속해서 3번째 탭인 Hamachi for Linux를 클릭하면 여기가 나오는데 여기서 운영체제 Bit에 맞춰서 다운해줍니다 클릭해서 해도되고 wget을 사용해서 해도됩니다. 저는 클릭해서 tgz를 다운받았어요. 그다음 tgz를 풀어주면 .. 2017. 4. 21.