sudo apt-get update
sudo apt-get upgrade
Run above commands a few times
sudo raspi-config
Navigate to “camera” and select “enable”.
raspistill -o image.jpg
raspistill -o /home/pi/webcam2.jpg -q 75 -w 1024 -h 576
sudo apt-get install imagemagick
sudo apt-get update
sudo apt-get install python-picamera
sudo mkdir /var/tmp
sudo nano /etc/fstab
and add the line
tmpfs /var/tmp ramdrive nodev,nosuid,size=10M 0 0
sudo mount -a
df
sudo apt-get install lighttpd
sudo apt-get install fswebcam
sudo nano:q /etc/lighttpd/lighttpd.conf
Change this line
server.document-root = "/var/www"
to
server.document-root = "/var/tmp"
sudo /etc/init.d/lighttpd restart