Install On Raspbian

Calin Crisan edited this page Apr 7, 2018 · 29 revisions

Before Proceeding

  • Read the general Installation page first.
  • These instructions apply only to an up-to-date Raspbian Stretch.
  • All commands require root; use sudo before each command or become root using sudo -i.
  • If you want to use the CSI camera module for the Raspberry PI, make sure you have enabled it in raspi-config.

Instructions

  1. Install ffmpeg and v4l-utils:

     apt-get install ffmpeg v4l-utils
    

    note: v4l-utils appears to be preinstalled on Raspbian systems

  2. Install libmariadbclient18 and libpq5 required by motion:

     apt-get install libmariadbclient18 libpq5
    
  3. Install motion:

     wget https://github.com/Motion-Project/motion/releases/download/release-4.1.1/pi_stretch_motion_4.1.1-1_armhf.deb
     dpkg -i pi_stretch_motion_4.1.1-1_armhf.deb
    

    note: Raspbian Stretch comes with motion version 4.0; it is however recommended that you install version 4.1

  4. Install the dependencies from the repositories:

     apt-get install python-pip python-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libz-dev
    
  5. Install motioneye, which will automatically pull Python dependencies (tornado, jinja2, pillow and pycurl):

     pip install motioneye
    
  6. Prepare the configuration directory:

     mkdir -p /etc/motioneye
     cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
    
  7. Prepare the media directory:

     mkdir -p /var/lib/motioneye
    
  8. Add an init script, configure it to run at startup and start the motionEye server:

     cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
     systemctl daemon-reload
     systemctl enable motioneye
     systemctl start motioneye
    
  9. To upgrade to the newest version of motionEye, just issue:

     pip install motioneye --upgrade
     systemctl restart motioneye