转自http://code.google.com/p/webiopi/wiki/INSTALL
WebIOPi 0.5.1 install instructions
Please check upgrade instructions if you are upgrading from a previous WebIOPi version.
You will need Python development headers. On Raspbian, open a terminal. If you plan to use Python 2.X :
$ sudo aptitude install python-dev
or/and if you plan to use Python 3.X
$ sudo aptitude install python3-dev
Now download, then extract and install WebIOPi :
$ wget http://webiopi.googlecode.com/files/WebIOPi-0.5.1.tar.gz $ tar xvzf WebIOPi-0.5.1.tar.gz $ cd WebIOPi-0.5.1 $ sudo ./setup.sh
Finally, run Python using webiopi module :
$ sudo python -m webiopi [port]
where port is the port to bind the HTTP server, default is 8000.
You're done, and ready to enjoy WebIOPi ! But the server and GPIO state will be lost when you'll stop the script (CTRL-C) or close the terminal session.
You can also start/stop the background service :
$ sudo /etc/init.d/webiopi start and $ sudo /etc/init.d/webiopi stop
You can even setup your system to start webiopi at startup :
$ sudo update-rc.d webiopi defaults
Go to README for usage instructions.
文章评论(0条评论)
登录后参与讨论