I've already downloaded the latest stable version of Ubuntu Server
So apparently what I do is to run Etcher, select the Ubuntu image, and point it at the SD
This makes the SD bootable, but I don't see how it completes the 'headless server' setup by itself (e.g. wifi & ssh?)
Answer is this method does not complete the headless server setup by itself
This will involve connecting up the Pi after this install and completing the setup on the device, rather than having an ideal installer config
Fair enough
Ok, so...
We go:
- Run Etcher
- Select Ubuntu Image
Then:
- Select SD Drive as Target
- Flash (ahaaa!)
(and wait)
Took a couple of minutes or so, and was done
Next will be to connect up the Pi board (it's not tucked up in its case, yet), and continue the config process (probably tomorrow)
Alright
Raspberry Pi kit out
However, I'm gonna try to get the whole headless server setup according to some instructions I've found, so that I won't need to plug this in to a monitor and keyboard to finish the setup
Idea is to set it up and then use it headlessly
Next:
Adding a simple file to the SD card called 'ssh'
Apparently when the Pi finds this file on first boot, it will enable ssh; if it's not there, ssh (a method of logging in remotely and securely via a terminal) will be disabled on first boot
Next, and unconfidently, the final step, is to create another file on the ssd card containing wifi settings
Apparently the Pi, when seeing this file on first boot, will create a permanent wifi profile, and so the theory is I should just be able to log in via ssh straight away
Ok, so now we learn something about the learning process...
That didn't work
And that's ok, 'cos this is learning
So here is a new vid with what seems the correct method of setting these wifi settings on the SD Card in headless Ubuntu on the Pi ๐
Then, there's one final setting which needs to be made: telling the Raspberry Pi to reboot after its initial boot-up and creation of the wifi profile
It'll then reboot, pick up the new wifi profile, and connect to the wifi router, which then makes it discoverable & we can log in
Next up is to insert the SD card into the Pi, and power it on
Then let it boot up, apply the wifi profile, reboot itself, and see if it appears on the network... ๐
So as per the above video, this latest (correct) approach to setting the wifi config worked, and the Pi booted up and was visible on my wifi router
That means I can ssh into the router and complete the basic setup
Bingo!
ssh into the Pi, of course...
next couple of days i'll be deciding what packages to install on the Pi for it to become an effective dev environment
will probably leave it there for now as i'd like to run rest of it through my creative process, which requires a cork wall...
andโฆ. returning to this thread
life had many (mostly unwelcome, some welcome) interruptions since i was last here
however, we resume, and development is, in small way, now underway
onto pi dev environment steps ๐
i'm wanting to move web development off my mac (sort of, apart from the code editor & previewing web sites etc.) and off my nas onto the pi
so the pi will run apache, serve dev sites, run python & other required packages etc
i become more conversant with linux as a result
and i will prob end up scripting the creation of new tech endeavours and putting together a slick dev process, and then can incrementally ship new & changed stuff pretty quickly
this helps me to flit between my creative endeavours and just go where the energy is, and do that
so ok, setup stuff:
next up was to get the pi to see my nas shares, where all my web stuff is, and where git files & python scripts will live
it makes sense to keep files stored on the nas in this way & have the pi serve sites from here, as the nas gets backed up
i can then figure out how to backup key files on the pi and have it re-built easily if necessary
first up then was installing the NFS Client on the pi, and then getting my regular pi user to be able to see & write to those shares
this wasn't easy
pulled my hair out
installing nfs client package easy
initially mounting an NFS share easy enough
but getting permissions right, using the right nfs version & options was the tricky bit for a noob
we did some root squashing and recursive chowning here, ok?
the idea here is to get apache to serve website hosted on my NAS, not on the Pi itself
this is achieved by the previous (slightly confounding) setup of NFS shares & permissions
meaning my requirement was easy to achieve, which was to simply point apache to that shared folder
this is done by setting up a virtual hosts file in the sites-available folder in apache's directory structure
so for each domain and subdomain, a new virtual hosts file is required
this is easyโฆ grab a template, change the server / host name & document locations & save file
in ubuntu land, that vhosts then needs activating, according to the ubuntu apache install doc instructions
- sudo a2ensite yournewvirtualhost.conf
effectively creates a symlink to the conf file in the sites-enabled folder, so apache will see the virtual host
then reload apache
one more step i had to make here, aside from pointing my apache via the vhosts to a network share location, was to change the ip address of the local domain for the site i'm developing to the pi's ip address, in order that apache will serve the website at that address
i do that on my NAS as that device is managing DNS addresses on my network
so the NAS receives DNS queries, directs certain requests for particular domains to the Pi, and the Pi serves the website request using files stored on the NASโฆ
in essence my little dev setup is done for now, in a slightly old-fashioned way (my code editor will push updated files around dev & test subdomains and onto the production server)
and so i'm ready to knock pages/sites up and to explore the numerous unfolding ways in codeโฆ
part of me questions the reason for doing the below when i read that back
2 reasons:
1. the NAS website management interface has become impossibly slow after the last couple of OS updates. whereas it takes me seconds to create a new vhosts file on the Pi
today, i shall be mostly an expression of my best understanding of the world
aka 'fucking weird'
and yes
weird world, ain't it?
anyway, what i meant to say was that everything i do on this account is an expression of my current best understanding of the world, of how we can maybe do a little better, or perhaps pivot to doing much better
however, i shall continue with learning basic linux & doing 'home projects' on a raspberry pi, and doing what look like very weird things with regards to this unfolding way thing
this is because you have to accept that to unfold the future, you must start right where you are at
i wish i started right where i was 25 yrs ago, and was v. close to doing so & achieving financial independence at the start of the internet age
i'd no idea how personally transformational that could have been
those lessons & convictions are inherent to how i choose to live now