팝업레이어 알림

팝업레이어 알림이 없습니다.

Memory

HOME > 공지사항

Debian 라즈베리파이 4B ssl 설정

페이지 정보

profile_image
작성자 최고관리자
댓글 0건 조회 27,907회 작성일 22-02-24 14:27

본문

8137e0f25aff94b2377844ee80a8e47b_1645702408_8945.jpg



라즈베리 파이(영어: Raspberry Pi)는 영국 잉글랜드의 라즈베리 파이 재단이 학교와 개발도상국에서 기초 컴퓨터 과학의 교육을 증진시키기 위해 개발한 신용카드 크기의 싱글 보드 컴퓨터이다(위키백과) 


라즈베리4B 홈페이지 버추얼 호스트 설정


I. USB에  Debian GNU/Linux 11 만들기   -->  https://my7.co.kr/bbs/board.php?bo_table=tl_notice02&wr_id=12&page=2


II. 부팅 후 초기 라즈베리 비번 

   아이디 pi  비밀번호 raspberry


III. 접속 후 비밀번호를 변경한다.  --> passwd root


IV. 유저 추가  

    useradd 유저명   (-m 홈디렉토리 생성, -g 그룹지정, -d 디렉토리 생성, -s 쉘지정, -p 패스워드 암호지정)

    adduser 유저명


V. apt update 

   apt upgrade


VI. SSH 외부 접속 환경

    vi /etc/ssh/sshd_config  or nano /etc/ssh/sshd_config

    아래 2줄 수정

    Port 22   --> Port 11111   

    PermitRootLogin Yes  --> PermitRootLogin no 

    

    환경에 맞게 설치  

    apt install ufw (방화벽 설치)

    ufw enable

    ufw allow 80/tcp 3306/tpc 443/tcp ssh 포트번호  정지시키는 경우 allow --> deny로 사용하면 된다.

    systemctl status ssh

    systemctl start ssh

    ufw logging on   --> ufw 로그 기록

    ufw status numbered  


VII. Nginx 설치 

    apt install nginx -y


    php 설치 

    apt install php php-fpm php-curl php-gd php-intl php-mbstring php-mysql php-soap php-xml php-xmlrpc php-zip libapache2-mod-php

    

    mariadb 설치

    apt install mariadb-server


VIII. Hosts 도메인 추가

   nano /etc/hosts  or  vi /etc/hosts

   아비피번호 도메인명 추가


* ssl 설정

apt update

apt upgrade

apt-get install software-properties-common 

apt-get install certbot python3-certbot-apache

certbot --apache    --> nginx의 경우 certbot --nginx로 실행


인증서 갱신 확인

certbot renew --dry-run

아파치 재실행

service apache2 restart

인증서 갱신

certbot --renew


crontab 자동인증서 갱신

0 0 15 ** certbot renew --no-self-upgrade >> /var/log/certbot-renew.log   -->  0분 0시 매달 15일 실행

1 0 15 * * service apache2 restart >> /var/log/cron-apache.log  --> 1분 0시 매달 15일  

certbot renew --no-self-upgrade 


(왼쪽 분(0-59), 시(0-23), 일(1-31), 월(1-12), 요일(0-7) 0과 7은 일요일, 1은 월요일, 6은 토요일)


 

댓글목록

등록된 댓글이 없습니다.