기본 콘텐츠로 건너뛰기

systemctl daemon-reload 안될때 [System has not been booted with systemd as init system (PID 1). Can't operate]

일반 Linux 에서 진행


$ sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig

$ sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target

$ exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

$ snap version

 https://gist.github.com/alyleite/ca8b10581dbecd722d9dcc35b50d9b2b



Docker Container 에서 진행


두가지 파라미터 필요
--privileged=true 
/sbin/init

$ sudo docker run -it -d --privileged=true --name {container_name} {image} /sbin/init


https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities

https://velog.io/@steveloper/Ubuntu-docker-container-%EC%97%90%EC%84%9C-systemctl-%EC%82%AC%EC%9A%A9%EC%8B%9C-%EB%B0%9C%EC%83%9D%ED%95%98%EB%8A%94-%EB%AC%B8%EC%A0%9CSystem-has-not-been-booted-with-systemd-as-init-system-PID-1.-Cant-operate.Failed-to-connect-to-bus-Host-is-down

댓글

이 블로그의 인기 게시물

블록체인 거래소 모니터링시스템 구축이야기(2/?) - 서버 아키텍처

  코인 거래소 모니터링시스템 구축이야기(2/?) 코인 거래소 모니터링 시스템 구축 (가칭 : 김프멈춰) 서버 구성 사용자가 확인할 서비스 페이지, 데이터 저장소에 대한 서버는 NAS 서버로 운영 일일 Data 크롤링 서버는 Cloud 서버 이용하여 운영 - 서비스페이지 및 데이터 저장소 (Nas 서버) : Docker container ubuntu 20.04 - 일일 크롤링 서버 (Cloud at Cost Cloud 서버) : CentOS 7 서버 아키텍처 서버 아키텍처 레퍼런스 빗썸 : https://apidocs.bithumb.com/ 업비트 : https://docs.upbit.com/ 홍콩 Bitfinex : https://docs.bitfinex.com/docs 몽고 DB 설치 : https://coterie.tistory.com/20 1. 개요 :  https://limdh3325.blogspot.com/2021/04/1.html 2. 서버 아키텍처 :  https://limdh3325.blogspot.com/2021/04/2.html 3. MongoDB 설치 :  https://limdh3325.blogspot.com/2021/04/3.html 4. 데이터 모델링 :  https://limdh3325.blogspot.com/2021/05/4.html 5. MongoDB 저장 :  https://limdh3325.blogspot.com/2021/06/5.html