본문 바로가기

개발/시스템

(10)
Ubuntu 서버 전체 백업, 복원 tar 명령어를 통해 백업하며, 필요없는 폴더들을 제외한다. // 제외할 폴더를 추가하여 backup.tar.gz로 압축 sudo tar -cvpzf backup.tar.gz --exclude=/proc --exclude=/mnt --exclude=/dev --exclude=/sys --exclude=/run --exclude=/media --exclude=/tmp --exclude=/home / 복원 필요 시 다음 명령어를 통해 복원한다. // backup.tar.gz 압축을 푼다. sudo tar -xvpzf backup.tar.gz -C / # 참고자료 - tar 명령어 옵션 (https://www.ibm.com/docs/ko/aix/7.2?topic=t-tar-command) tar [OPTION..
CIDR 표기법 CIDR(Classless Inter-Doamain Routing) 표기법에 대해서 작성한다. 사이더(Classless Inter-Domain Routing, CIDR)는 클래스 없는 도메인 간 라우팅 기법으로 1993년 도입되기 시작한, 최신의 IP 주소 할당 방법이다. 사이더는 기존의 IP 주소 할당 방식이었던 네트워크 클래스를 대체하였다. 사이더는 IP 주소의 영역을 여러 네트워크 영역으로 나눌 때 기존 방식에 비해 유연성을 더해 준다. (출처: 위키백과) IPv4 를 표기할때 192.168.0.0/12 와 같은 방법으로 표기하는 경우가 있다. IP는 마침표로 구분되는 4개의 영역을 가지며 각각의 영역을 (Octect)옥텟이라고 한다. 1개의 옥텟은 1byte의 크기를 가지며 0~255까지 표현이 ..
python azure blob storage download import os, uuid from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient, __version__ try: print("Azure Blob storage v" + __version__ + " - Python quickstart sample") # Quick start code goes here # Retrieve the connection string for use with the application. The storage # connection string is stored in an environment variable on the machine # running the application called A..
도커(Docker) 컨테이너 내 php 설치 컨테이너 아이디를 입력해서 bash 에 접근합니다. $ docker exec -it 9531b /bin/bash 아래 작업은 root 권한으로 작업합니다. $ su $ apt install php # php 코어 $ apt install php7.3 php7.3-common php7.3-cli # 익스텐션 $ apt install php7.2-bcmath php7.2-bz2 php7.2-curl php7.2-gd php7.2-intl php7.2-json php7.2-mbstring php7.2-readline php7.2-xml php7.2-zip # 아파치 연동 모델 $ apt install libapache2-mod-php7.2 # 편집기 vim $ apt install vim # php 버전 확인..
도커(Docker) Ubuntu, Apache2 이미지 생성 및 실행 우분투 18.04 버전 이미지를 기반으로 아파치를 설치하는 도커 이미지를 빌드하고 실행합니다. Step1 도커 파일 만들기 # Dockerfile FROM ubuntu:18.04 RUN apt-get update RUN apt install apache2 -y ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV APACHE_PID_FILE /var/run/apache2/apache2.pid EXPOSE 80 CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"] FROM = 기반 이미지 설정 RUN = 명령어 실행 ENV = 환경 변수 Step2 도..
우분투(Ubuntu) 18.04 도커(Docker) 설치 우분투(Ubuntu) 18.04 버전에서 도커(Docker)를 설치합니다. Step 1 sudo apt update sudo apt install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" sudo apt update apt-cache policy docker-ce 명령어를 입력하게 되면 다음 메시지가 출력됩니다. St..
우분투(Ubuntu) 18.04 Docker Container docker run hello-world root@swlee-laptop:/home/petrucio# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 1b930d010525: Pull complete Digest: sha256:f9dfddf63636d84ef479d645ab5885156ae030f611a56f3a7ac7f2fdd86d7e4e Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appe..
CentOS7 Apache SSL인증서 적용 (Certbot, Let's encrypt) 환경 : CentOS7 / Apache EPEL 저장소 활성화 및 apache용 certbot 설치 yum install epel-release yum install certbot python2-certbot-apache certbot에서 apache를 기반으로 자동구성 certbot --apache certbot에서 apache를 수동으로 구성 certbot --apache certonly certbot을 설정하여 구성 완료 후 문제가 없을 경우 아래 메시지가 출력된다. - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/sengwoolee.dev/fullchain.pem Your key file ..

반응형