Regular reader will know about the script that Aidan Ruff and I originally developed to put Node-Red and several other packages onto the Raspberry Pi for our own home control purposes. This has been developed with help from several people and in particular my friend Antonio “Mr Shark”.
WELL – here is the script which is intended to help set up certain Raspbian, Debian or similarly-based SBCs which now includes logging and handling Raspbian Stretch (tested on Raspberry Pi 2 and 3, 3B+). As well as it's original purpose of setting up a Raspberry Pi, the script also runs well with several other boards. See right hand side of the above image for what the script does, given a basic operating system install.
January 2019 – while leaving “The Script” in place on BitBucket, I’ve uploaded a new version with mods for Raspbian and in particular Node-Red and Node v8 as currently used by the Node-Red guys. On new installs this may even fit Node 10. I’ve not tried that myself. Starting in your ROOT directory as user ROOT, initially, here’s how to get the script – 2019 version.
wget --no-check-certificate https://bitbucket.org/api/2.0/snippets/scargill/qexexb/master/files/script.sh