To install and run mjpg_streamer on a BeagleBone with a Logitech C270 webcam:
git clone https://gist.github.com/jadonk/51a4d83c8180e259bcb5661002712166
bash 51a4d83c8180e259bcb5661002712166/install_mjpg_streamer.sh
Browse to your BeagleBone from a web browser specifying port 8090: http://beaglebone.local:8090
If you are looking for a quick python script to listen to the stream, try https://gist.github.com/jadonk/2a045611c134e2307a772a721b66ff5d.
I've merged this into the boot script repo:
and cleaned up a few things..
https://github.com/RobertCNelson/boot-scripts/tree/master/tools/software/mjpg-streamer
(internet access wont be required on the iot/lxqt images)
Regards,