手动在armbian上安装octoPrint

手动在armbian上安装octoPrint

git 点

octoPrint 的加速链接

https://github.com.cnpmjs.org/OctoPrint/OctoPrint.git

https://hub.fastgit.org/OctoPrint/OctoPrint.git

https://github.91chi.fun//https://github.com/OctoPrint/OctoPrint.git

octoPrint docker git

https://hub.fastgit.org/OctoPrint/octoprint-docker.git

https://github.com.cnpmjs.org/OctoPrint/octoprint-docker.git

https://github.91chi.fun//https://github.com/OctoPrint/octoprint-docker.git 推荐

OctoPrint provides a snappy web interface for controlling consumer 3D printers. It is Free Software and released under the GNU Affero General Public License V3.

Its website can be found at octoprint.org.

The community forum is available at community.octoprint.org. It also serves as central knowledge base.

An invite to the Discord server can be found at discord.octoprint.org.

The FAQ can be accessed by following faq.octoprint.org.

The documentation is located at docs.octoprint.org.

The official plugin repository can be reached at plugins.octoprint.org.

Installation 安装

Installation instructions for installing from source for different operating systems can be found on the forum. 源代码安装或者其他不同操作系统上安装

If you want to run OctoPrint on a Raspberry Pi, you really should take a look at OctoPi which is a custom SD card image that includes OctoPrint plus dependencies. 为树莓派参考OctoPi这个项目即可

The generic steps that should basically be done regardless of operating system and runtime environment are the following (as regular user, please keep your hands off of the sudo command here!) – this assumes you already have Python 2.7, 3.6 or 3.7, pip and virtualenv and their dependencies set up on your system:

不考虑操作系统和运行环境,假设已经安装python2.7,3.6或者3.7的以及virtualenv这个包的情况下,安装步骤基本分为以下几步,

  1. Create a user-owned virtual environment therein: virtualenv venv. If you want to specify a specific python to use instead of whatever version your system defaults to, you can also explicitly require that via the --python parameter, e.g. virtualenv --python=python3 venv. 创建虚拟环境
  2. Install OctoPrint into that virtual environment: ./venv/bin/pip install OctoPrint 安装OctoPrint到此虚拟环境,此处可能需要提前配置好pip的源

You may then start the OctoPrint server via /path/to/OctoPrint/venv/bin/octoprint, see Usage for details. 启动OctoPrint 的方式参考Usage章节

After installation, please make sure you follow the first-run wizard and set up access control as necessary. 安装完成以后,确保你参考了第一次运行的指导和设置访问控制等

Dependencies

OctoPrint depends on a few python modules to do its job. Those are automatically installed when installing OctoPrint via pip.

OctoPrint currently supports Python 2.7, 3.6 and 3.7.

Usage

Running the pip install via 使用pip命令安装octoprint

pip install OctoPrint

installs the octoprint script in your Python installation’s scripts folder (which, depending on whether you installed OctoPrint globally or into a virtual env, will be in your PATH or not). The following usage examples assume that the octoprint script is on your PATH.

You can start the server via 启动服务器命令如下

octoprint serve

By default it binds to all interfaces on port 5000 (so pointing your browser to http://127.0.0.1:5000 will do the trick). 指向本机5000端口,而当你要访问这个机器时,应该先通过路由器查看机器被分配的地址,或者在机器上直接使用ip addr 查看ip地址,得到IP地址后,在其他局域网内的电脑浏览器上使用这个ip地址来访问,比如我的访问地址为
http://192.168.50.77:5000

If you want to change that, use the additional command line parameters host and port, which accept the host ip to bind to and the numeric port number respectively. If for example you want the server to only listen on the local interface on port 8080, the command line would be

octoprint serve --host=127.0.0.1 --port=8080

Alternatively, the host and port on which to bind can be defined via the config file.

If you want to run OctoPrint as a daemon (only supported on Linux), use 以上仅支持linux,armbian是基于linux 的,可以使用,但目前还没看到其必要性。

octoprint daemon {start|stop|restart} [--pid PIDFILE]

If you do not supply a custom pidfile location via --pid PIDFILE, it will be created at /tmp/octoprint.pid. 如果没有通过--pid PIDFILE 这个参数来提供自定义的pidfile路径的话,它会自动被创建在 /tmp/octoprint.pid

You can also specify the config file or the base directory (for basing off the uploads, timelapse and logs folders), e.g.: 你也可以指定配置文件或者(uploads,timelapse,logs)这些目录的起始目录,如下。

octoprint serve --config /path/to/another/config.yaml --basedir /path/to/my/basedir

To start OctoPrint in safe mode – which disables all third party plugins that do not come bundled with OctoPrint – use the --safe flag:
要安全启动Octoprint,加上--safe参数即可

octoprint serve --safe

See octoprint --help for more information on the available command line parameters. 更多内容可以用帮助命令

OctoPrint also ships with a run script in its source directory. You can invoke it to start the server. It takes the same command line arguments as the octoprint script. octoprint在源代码目录中也有启动脚本,但是

Configuration

If not specified via the command line, the config file config.yaml for OctoPrint is expected in the settings folder, which is located at ~/.octoprint on Linux, at %APPDATA%/OctoPrint on Windows and at ~/Library/Application Support/OctoPrint on MacOS. 如果没有通过命令行指定的话,配置文件 config.yaml 一般位于linux 下的 ~/.octoprint 或者 windows下的 %APPDATA%/OctoPrint 或者 macOS下的 ~/Library/Application Support/OctoPrint

A comprehensive overview of all available configuration settings can be found in the docs. Please note that the most commonly used configuration settings can also easily be edited from OctoPrint’s settings dialog. 详细配置文件参考链接。

发表回复