ROV Linux
See Github https://github.com/PhilipMcGaw/ROV
https://mdbootstrap.com/learn/mdb-foundations/bootstrap/hero-image/
username and password
- username pi
- password raspberry
(if these need to be changed sudo passwd pi)
sudo raspi-config
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZXuVXuc19rqZAfSH+CzeDTP+epLlpmMvryJeuXqVO9 skippy+thrudhr@mcgaw.eu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBRmcgaQE9nBGz9A2X+RawgOPSERKnru6nTxa3NNsw3N philip.mcgaw@chargepoint.com
Default stuff
if running on Debian Jammy, rather than Raspbian:
sudo apt install software-properties-common sudo add-apt-repository ppa:ondrej/php -y
this will allow you to have PHP 7.4
These packages need to be installed to make this work, see also. Setup new computer
sudo apt update sudo apt dist-upgrade -y sudo apt upgrade -y sudo apt autoremove -y # These are required to make it more like my normal enviroment. sudo apt install -y kitty nano zsh git neofetch htop dialog rcm # MQTT sudo apt install -y mosquitto mosquitto-clients # Webserver and video stream sudo apt install -y lighttpd php7.4 php7.4-{cli,common,cgi} gpac motion zip gstreamer1.0-tools # Ability to mount file system via the network on my mac sudo apt install -y netatalk
install ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
edit .zshrc and change ZSH_THEME=“robbyrussell” to ZSH_THEME=“clean” #CASE_SENSITIVE=“true” to CASE_SENSITIVE=“false”
get neofetch working, nano .zprofile and add the following two lines
clear neofetch
lazygit
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" tar xf lazygit.tar.gz lazygit sudo install lazygit /usr/local/bin
append alias lg=“lazygit” to the end of .zshrc
Python
sudo apt install python3-pip -y
pip install paho-mqtt
afp
this is for allowing access to the home folder from a mac
https://pimylifeup.com/raspberry-pi-afp/
sudo nano /etc/netatalk/afp.conf
; ; Netatalk 3.x configuration file ; [Global] ; Global server settings mimic model = AirPort4 [Homes] basedir regex = /home ; [My AFP Volume] ; path = /path/to/volume ; [My Time Machine Volume] ; path = /path/to/backup ; time machine = yes
sudo systemctl restart netatalk
mqtt
sudo systemctl enable mosquitto.service
test that it is working using
mosquitto -v
Mosquitto Configuration
sudo nano /etc/mosquitto/mosquitto.conf
add the following lines to the end of the configuration
listener 1883 allow_anonymous true
Restart Mosquitto for the changes to take effect.
sudo systemctl restart mosquito
Camera
Pi Cam
Enable legacy camera support
sudo raspi-config
Enter the following line to hand the camera to the modules. Ensure the camera is connected correctly before running this line otherwise, it will throw an error.
sudo modprobe bcm2835-v4l2
sudo reboot
git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git cd RPi_Cam_Web_Interface ./install.sh
change httpd to lighttpd
lighttpd config is /etc/lighttpd/lighttpd.conf
sudo systemctl reload lighttpd.service
Headless via VNC
sudo raspi-config
The VNC settings Interfacing Options » VNC
USB camera(s)
Lighttpd
sort out users etc
sudo usermod -a -G www-data pi sudo usermod -a -G pi www-data
Change the web folder
sudo nano /etc/lighttpd/lighttpd.conf
# server.document-root = “/var/www/html” server.document-root = “/home/pi/rov/html”
Enable CGI for both Bash and Python files
sudo lighttpd-enable-mod cgi
sudo nano /etc/lighttpd/conf-enabled/10-cgi.conf
# /usr/share/doc/lighttpd/cgi.txt server.modules += ( "mod_cgi" ) $HTTP["url"] =~ "^/cgi-bin/" { cgi.assign = ( ".py" => "/usr/bin/python3", ".sh" => "/bin/bash", ) }
sudo systemctl reload lighttpd.service
Enabling PHP
sudo lighty-enable-mod fastcgi sudo lighty-enable-mod fastcgi-php
sudo systemctl reload lighttpd.service
Enable directory listings
sudo lighty-enable-mod dir-listing
sudo systemctl reload lighttpd.service
Passwordless Sudo
run ```visudo```, and append the line ```%sudo ALL=(ALL) NOPASSWD: ALL``` to the end.
Backlinks: