First of all you need a raspberry compatible USB camera, I use Logitech (Logitech) C270 HD webcam, plug in. The software is very simple and requires only a software: motion.
Assuming your raspberry pie Raspbian system is already installed, you only need to:
sudo apt-get install motion
Then open the motion daemon daemon, so that he can run in the background:
sudo nano /etc/default/motion
#No changed to Yes:
Modify the motion configuration file:
sudo vim /etc/motion/motion.conf
#Deamon off to on
# Set the resolution
# Close the localhost restriction
Then run the motion:
Our cameras have now become a network camera. In the chrome browser to access http://[your.domain]:8081 to see a camera present to capture images.