Notes/Hints: Setup Raspberry Pi 4 (Server/Development Platform)

Table Of Contents

1. Update / upgrade

sudo apt-get update
sudo apt-get upgrade

2. Add temperature monitor

1. right click on the top panel
2. select "Add / Remove Panel items"
3. click "Add"
4. scroll down the list and select "Temperature Monitor"
5. click "Add"
6. use the "Up" button to position the monitor above the "Digital Clock"

3. Change displayed time to 12 hour am/pm format

1. right click on displayed time (upper right corner of screen)
2. select "Digital Clock Settings"
3. change "Clock Format" to "%I:%M%P"

4. Add the following to the end of the .bashrc file

PS1='Tom> '

alias clr='clear'
alias untar='tar -xvf'
alias untargz='tar -xvzf'

5. Install vim

sudo apt-get install vim
Edit ~/.vimrc file; add for Python programming
syntax enable
set tabstop=4
set shiftwidth=4
set expandtab
" set number             - turn off line numbers
filetype indent on
set autoindent
linuxhint.com/vim-python-development/

6. Install dos2unix/unix2dos

sudo apt install dos2unix
Note: Both dos2unix and unix2dos are now installed

7. Install firefox web browser

sudo apt install firefox-esr

8. Install Apache2 and PHP

sudo apt-get install apache2
sudo apt-get install libapache2-mod-php -y

cd /var/www/html/
sudo vim phpinfo.php
<?php echo phpinfo(); ?>
cd

URL: localhost:phpinfo.php
www.raspberrypi.org/documentation/remote-access/web-server/apache.md
www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04

9. Find your Server's Public IP Address

ip addr show wlan0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'

10. Install uncomplicated firewall (ufw)

sudo apt-get install ufw
sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 80
sudo ufw allow 443             <-- necessary?
sudo systemctl restart ssh     <-- necessary?
sudo ufw status
www.raspberrypi.org/documentation/configuration/security.md

11. Install MQTT broker (mosquitto)

sudo apt-get install mosquitto
sudo apt-get install mosquitto-clients

pip3 install paho-mqtt

sudo systemctl stop mosquitto.service
sudo systemctl start mosquitto.service
sudo systemctl restart mosquitto.service
stevessmarthomeguide.com/install-mosquitto-raspberry-pi/

12. Install node-red-start

sudo node-red-start

URL: localhost:1880
nodered.org/docs/getting-started/raspberrypi

13. install/setup maria db server and client

sudo apt install mariadb-server
sudo apt-get install mariadb-client

14. Install SQLite

sudo apt-get install sqlite