BeSide - day1

kyoungyeon·2024년 3월 20일
0

🥚Sunny -SIDE Project

목록 보기
11/17
post-thumbnail

Architecture

mongoDB -user data 정리용
db1 - img 처리용
db2 - 영상 contents 용
db3 - (아마도) 백업용
front- nextjs
back - nodejs
was - ???
infra

  • ubuntu 22.04 OS
  • docker(대신 jib),
  • Openstack Cloud
    • nova : virtual server
    • cinder : nova block storage
    • etcd : key-value storage
    • swift : object- storage, api 기능제공 (etcd 와 둘중 비교중)
    • minikube : k8s 는 아마도 내컴퓨터에서 돌아가진 않을듯 함 (cluster 관리용)
    • keystone: authnetication
    • glance : vm images. (공부예정)
    • horizon :dashboard for openstack services
    • neutron : openstack network 설정 및 다양한 sw 플러그인 구현

Ubuntu 22.04 "LTS"

  • Spec: Openstack의 nova 를 테스트 하기 위해 현재 OracleBox에 provisioning 하는 ubuntu.

Err1

  • dhcp 설정하고 나서 static ip로 바꾸려 함

  • 주의

    참고한 글에는 ens라고 되어있는데 원래 eth0[ubuntu 16버전의 경우] 이렇게 시작했던것으로 기억한다.

  • 나의 경우 enp로 뜸. 이게 예전에 공부하기로 NIC 종류인데, 일방적으로 호스트 어뎁터 = ens 설정인데,
    나의 경우 초반에 NAT로 바로 잡아버려서 이런일이 발생함

  • 인터페이스명이고 해서 일단 그대로 두고 static ip설정진행. 다행히 ping은 나간다..휴

  • Ubuntu 18 LTS 부터는 Netplan이 적용되어 설정 방식이 변경됨.

    • network 설정 변경시 netplan apply 로 설정해야함
    • NetworkManager는 안먹힘
  1. Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)
  2. Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)
  3. Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
  4. Names incorporating the interfaces’s MAC address (example: enx78e7d1ea46da)
  5. Classic, unpredictable kernel-native ethX naming (example: eth0)

jin

howtoChange DHCP->STATIC

Err2

  • openssh 설치 (초기 설정에서 dpkg 설정 가능) 시 fail이 뜨길래 불안했건만 역시 ssh 연결이 안됨
    OpenBSD Secure Shell/SSH service is failing to start

  • 원인: /etc/ssh/sshd config파일내에 설정 오류가 발생해서 ssh 가 시작을 못함

  • /usr/sbin/sshd -T
    어떤 syntax error인지 말해준다고 함
    나의 경우 option 을 서버에서 인식을 못해서 무쓸모

  • /usr/sbin/sshd -ddd
    위 test 가 아무것도 error를 리턴하지 않을때 sshd를 debug모드로 돌리는 cmd
    위 cmd 도 당연히 먹히지 않았다..
    OpenBSD fail
    /etc/init.d를 활용한 sshd 스크립트 고치기

    Err 3

  • sshd내 fail 이 뜬 에러로그를 구글링함

unable to load host key

  • 원인 : ssh key 설정에서 이슈가 있었던 모양
    ubuntu ask - recreact ssh host keys

  • CMD:

    • systemctl enable --now ssh
      ssh 꺼져있을때 상시 쓸수있게 함
    • /usr/bin/ssh-keygen -A
      새로운 ssh 키를 발급받는다

성공(?)

Err4

성공인줄 알았으나 또 putty 접속은 안되서 찾기 시작함

  • /etc/ssh/sshd_config 설정변경
Port 22 
PasswordAuthentication yes
systemctl restart ssh
  • ufw 설정변경
ufw allow ssh
systectml ufw restart

ㅜ..여전히 connection timeout 에 빠져있음..

  • CMD:

dpkg --get-selections|grep ssh
설치된 패키지 확인

systemctl status ufw

netstat -ntlp | grep sshd
22번 ssh 포트 동작 상태 확인(tcp)

dpkg -l | grep openssh

아니 다 설치 되어있는데...?

profile
🏠TECH & GOSSIP

0개의 댓글