入れたやつ
- Raspberry pi 2(いまさらですか?)
Raspberry Pi OS Lite (Legacy)
Release date: September 22nd 2022
System: 32-bit
Kernel version: 5.10
Debian version: 10 (buster)
OSバージョン確認方法
cat /etc/debian_version
cat /etc/issue
uname -a
cat /proc/version
など
python バージョン確認方法
motioneyeは2系
python –version
3なら2へ変更
cd /usr/bin
sudo unlink python
sudo ln -s python2 python
ネタ元(英語)
https://github.com/motioneye-project/motioneye/wiki/Install-On-Raspbian
こちらを参考に、Raspberry Pi OS Lite (Legacy)に入れてもエラーにならないやり方(赤色文字)に変更し、インストールした。
1.ffmpeg とその他の依存関係をインストール:
- sudo apt-get install ffmpeg libmariadb3 libpq5 libmicrohttpd12 -y
2.motion4.3.2-1インストール:
- wget https://github.com/Motion-Project/motion/releases/download/release-4.3.2/pi_buster_motion_4.3.2-1_armhf.deb
- sudo dpkg -i pi_buster_motion_4.3.2-1_armhf.deb
違うバージョンにするなよ。カメラ画像の回転とフォントサイズの変更ができなくなるかも!raspberry pi 2みたいな古いやつ。
3.依存関係をインストール:
- sudo apt install python-pip python-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libz-dev -y
4.Python の依存関係 (tornado,jinja2,pillow,pycurl) を自動的にプルしてmotioneye をインストール:
- sudo apt-get install python-pil -y
- sudo pip –no-cache-dir install motioneye
5.ディレクトリを作る:
- sudo mkdir -p /etc/motioneye
- sudo cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
6.メディア ディレクトリを作る:
- sudo mkdir -p /var/lib/motioneye
7.motionEyeのinit スクリプトを追加し、ラズパイ起動時に自動起動するようにして、motionEyeサービスを起動:
- sudo cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
- sudo systemctl daemon-reload
- sudo systemctl enable motioneye
- sudo systemctl start motioneye
サービスの状態を確認
- sudo systemctl status motioneye
8.motionEye の最新バージョンへのアップグレードとリスタート:
- sudo pip install motioneye –upgrade
- sudo systemctl restart motioneye
raspberry pi 2みたいな古いやつの最新です。

9.motionEyeカメラ設定




参考まで
以上
