Enough said, let's head on:
First of all your Orange Pi Zero needs an operating system. I use armbian (headless). Just follow the link an then follow the quick start description.
After that the sd card shall be mounted into the Pi. You can reach it via the PuTTY tool. On the armbian-page you are told to login as root the first time, to do that, enter the following address into the Host Name field: email@example.com (please use the ip address of your pi in your network).
That description ends with the part, where you have to create a user account. Choose one you like, mine is named pi.
Good thing: It's easy!
nmtui is a very simple, half-graphical user interface. With that you shouldn't have any problem when configuring your network adapter.
I recommend using a static IP address. You will have less troubles while logging into your board with your browser ot the PuTTY tool.
sudo apt-get update sudo apt-get upgrade
OctoPrint needs a handfull modules in order to work. You can install them with just one line:
sudo apt-get install python-pip python-dev git virtualenv python-setuptools psmisc
To use OctoPrint you need a new user. That user must be created and then join some groups with some rights:
sudo adduser octoprint sudo usermod -a -G tty octoprint sudo usermod -a -G dialout octoprint sudo adduser octoprint sudo
Then you got to edit the file visudo.
Just add the following line at the file's end:
octoprint ALL=(ALL) NOPASSWD:ALL
Now you can remove the password of the user 'octoprint'. After that switch from your current user to 'octoprint'.
sudo passwd octoprint -d sudo su octoprint
Now we navigate back to root and load PySerial.
cd ~ wget https://pypi.python.org/packages/source/p/pyserial/pyserial-2.7.tar.gz tar -zxf pyserial-2.7.tar.gz cd pyserial-2.7 sudo python setup.py install
Finally we are able to install OctoPrint. That happens inside a virtual environment.
cd ~ git clone https://github.com/foosel/OctoPrint.git cd OctoPrint virtualenv venv ./venv/bin/python setup.py install
And that's it! But hold on, the server doesn't start when the Orange Pi has booted. That shall change!
To enable the autostart, you have to copy some scripts from the OctoPrint-diectory to the pi. As long as you are logged in as 'octoprint' you can do this by executing the follwowing lines:
sudo cp ~/OctoPrint/scripts/octoprint.init /etc/init.d/octoprint sudo chmod +x /etc/init.d/octoprint sudo cp ~/OctoPrint/scripts/octoprint.default /etc/default/octoprint
Now you have to edit the /etc/default/octoprint file.
sudo nano /etc/default/octoprint
Now it's important, that the following details are the same. Pay attention that there's no # sign at the beginning of the line. Otherwise it's commented out and useless.
After that save (CTRL+O) and exit (CTRL+X) the file. Then move the file into the autostart directory.
sudo update-rc.d octoprint defaults
Finally start the daemon:
sudo service octoprint start
And that's it (for real now). Now you have OctoPrint running on your Pi Zero. You can reach it by calling its IP address in your browser, followed by the port (5000). As an example: 192.168.0.100:5000. Another way is using octopi.local, but that requires bonjour.
For more configuration: GitHub.
Questions or comments? Wordpress!