티스토리 뷰
728x90
출처
- Raspberry Pi Camera V2 Settings? - Get Help / Webcams - OctoPrint Community Forum
- 옥토프린터 수동 설치 방법과 옥토파이로 자동설치 하는법 모두 알아봅시다
- [3D프린터] 라즈베리파이 가상환경 생성 & Octoprint 실행(내부망ip접속) : 네이버 블로그
OS 업데이트
$ sudo apt-get update $ sudo apt-get upgrade
파이썬 설치
OctoPrint 는 파이썬 환경에서 실행되므로 파이썬을 설치합니다.
$ sudo apt-get install python-pip python-dev python-setuptools python-virtualenv git libyaml-dev build-essential
OctoPrint 설치
OctoPrint 작업 디렉토리 생성
$ mkdir OctoPrint
OctoPrint 가상환경 생성, pip 최신버전으로 업그레이드
pi@raspberrypi:~$ cd OctoPrint pi@raspberrypi:~/OctoPrint$ virtualenv venv Running virtualenv with interpreter /usr/bin/python2 New python executable in /home/pi/OctoPrint/venv/bin/python2 Also creating executable in /home/pi/OctoPrint/venv/bin/python Installing setuptools, pkg_resources, pip, wheel...done. pi@raspberrypi:~/OctoPrint$ source venv/bin/activate (venv) pi@raspberrypi:~/OctoPrint$ pip install pip --upgrade
OctoPrint 설치
(venv) pi@raspberrypi:~/OctoPrint$ pip install https://get.octoprint.org/latest <생략> Successfully built OctoPrint markupsafe tornado regex Flask-Babel Flask-Assets cachelib PyYAML watchdog sarge netifaces pylru psutil feedparser future wrapt emoji frozendict blinker scandir chainmap webassets pathtools Installing collected packages: OctoPrint-FirmwareCheck, OctoPrint-FileCheck, markupsafe, futures, six, singledispatch, backports-abc, tornado, markdown, pyasn1, rsa, regex, Click, werkzeug, itsdangerous, Jinja2, flask, Flask-Login, pytz, Babel, Flask-Babel, webassets, Flask-Assets, cachelib, PyYAML, pyserial, contextlib2, scandir, pathlib2, typing, zipp, importlib-resources, netaddr, pathtools, watchdog, sarge, netifaces, pylru, pkginfo, urllib3, certifi, chardet, idna, requests, semantic-version, psutil, feedparser, future, websocket-client, wrapt, emoji, frozendict, sentry-sdk, filetype, unidecode, blinker, monotonic, chainmap, OctoPrint Successfully installed Babel-2.8.0 Click-7.1.2 Flask-Assets-2.0 Flask-Babel-1.0.0 Flask-Login-0.5.0 Jinja2-2.11.2 OctoPrint-1.4.2 OctoPrint-FileCheck-2020.8.7 OctoPrint-FirmwareCheck-2020.9.23 PyYAML-5.3.1 backports-abc-0.5 blinker-1.4 cachelib-0.1.1 certifi-2020.6.20 chainmap-1.0.3 chardet-3.0.4 contextlib2-0.6.0.post1 emoji-0.6.0 feedparser-5.2.1 filetype-1.0.7 flask-1.1.2 frozendict-1.2 future-0.18.2 futures-3.3.0 idna-2.10 importlib-resources-3.0.0 itsdangerous-1.1.0 markdown-3.1.1 markupsafe-1.1.1 monotonic-1.5 netaddr-0.8.0 netifaces-0.10.9 pathlib2-2.3.5 pathtools-0.1.2 pkginfo-1.5.0.1 psutil-5.7.2 pyasn1-0.4.8 pylru-1.2.0 pyserial-3.4 pytz-2020.1 regex-2020.9.27 requests-2.24.0 rsa-4.0 sarge-0.1.5.post0 scandir-1.10.0 semantic-version-2.8.5 sentry-sdk-0.18.0 singledispatch-3.4.0.3 six-1.15.0 tornado-5.1.1 typing-3.7.4.3 unidecode-0.4.21 urllib3-1.25.10 watchdog-0.10.3 webassets-2.0 websocket-client-0.57.0 werkzeug-1.0.1 wrapt-1.12.1 zipp-1.2.0
pi 계정 권한 변경
pi 계정에 터미널과 시리얼 접근권한을 추가해서 옥토프린트가 3D 프린터를 컨트롤할 수 있도록 합니다.
pi@raspberrypi:~$ sudo usermod -a -G tty pi pi@raspberrypi:~$ sudo usermod -a -G dialout pi
OctoPrint 서버 수동실행
pi@raspberrypi:~$ ~/OctoPrint/venv/bin/octoprint serve 2020-10-07 01:47:15,436 - octoprint.startup - INFO - ****************************************************************************** 2020-10-07 01:47:15,438 - octoprint.startup - INFO - Starting OctoPrint 1.4.2 2020-10-07 01:47:15,438 - octoprint.startup - INFO - ****************************************************************************** 2020-10-07 01:47:15,444 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: online 2020-10-07 01:47:15,445 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 8.8.8.8:53 is working 2020-10-07 01:47:15,446 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is working <생략> 2020-10-07 01:47:17,481 - octoprint.environment - INFO - Detected environment is Python 2.7.16 under Linux (linux2). Details: | hardware: | cores: 4 | freq: 1500.0 | ram: 3960000512 | os: | id: linux | platform: linux2 | plugins: | pi_support: | model: Raspberry Pi 4 Model B Rev 1.1 | python: | pip: 20.2.3 | version: 2.7.16 | virtualenv: /home/pi/OctoPrint/venv <생략>
OctoPrint 접속
OctoPrint 서버 자동실행
pi@raspberrypi:~$ wget https://github.com/foosel/OctoPrint/raw/master/scripts/octoprint.init pi@raspberrypi:~$ sudo mv octoprint.init /etc/init.d/octoprint pi@raspberrypi:~$ wget https://github.com/foosel/OctoPrint/raw/master/scripts/octoprint.default pi@raspberrypi:~$ sudo mv octoprint.default /etc/default/octoprint pi@raspberrypi:~$ sudo chmod +x /etc/init.d/octoprint
OctoPrint 서비스 등록
$ sudo update-rc.d octoprint defaults
OctoPrint 서버 환경설정 (/etc/default/octoprint)
pi@raspberrypi:~$ vi /etc/default/octoprint
16번줄의 DAEMON 앞에 주석(#)를 제거, DAEMON 파일 경로도 정확한지 확인하고 저장합니다.
# Configuration for /etc/init.d/octoprint
# The init.d script will only run if this variable non-empty.
OCTOPRINT_USER=pi
# base directory to use
#BASEDIR=/home/pi/.octoprint
# configuration file to use
#CONFIGFILE=/home/pi/.octoprint/config.yaml
# On what port to run daemon, default is 5000
PORT=5000
# Path to the OctoPrint executable, you need to set this to match your installation!
DAEMON=/home/pi/OctoPrint/venv/bin/octoprint
# What arguments to pass to octoprint, usually no need to touch this
DAEMON_ARGS="--port=$PORT"
# Umask of files octoprint generates, Change this to 000 if running octoprint as its own, separate user
UMASK=022
# Process priority, 0 here will result in a priority 20 process.
# -2 ensures Octoprint has a slight priority over user processes.
NICELEVEL=-2
# Should we run at startup?
START=yes
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 지스타2007
- koba2010
- Delphi
- NDK
- 튜닝쇼 2008
- Java
- 송주경
- BPI-M4
- Spring
- 서울오토살롱
- MySQL
- JavaScript
- ble
- 전예희
- 동경
- Xcode
- oracle
- android
- Spring MVC
- SAS
- ffmpeg
- Delphi Tip
- sas2009
- ubuntu
- KOBA
- Linux
- Mac
- 일본여행
- 레이싱모델 익스트림 포토 페스티벌
- flex
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함