From Latin 'civilis' (of citizens) — originally a civil law scholar; only meant 'non-military person' from the 1800s.
A person not in the armed services or the police force; relating to ordinary citizens and their concerns.
From Latin 'civilis' (of a citizen, relating to civil life, as opposed to military), extended with the English suffix '-an' (one who belongs to or is characterised by) — the full form 'civilianus' appearing in Medieval Latin meaning one belonging to the civil rather than the military sphere. The chain runs back to 'civis' (citizen, one who has a settled home in a community), from PIE *k̑ei- (to lie, to settle, to have a resting place). The civic family in Latin is: 'civis' → 'civitas' (community of citizens
The word 'civilian' originally had nothing to do with the military. In medieval universities, a 'civilian' was a scholar of civil (Roman) law, as opposed to a 'canonist' who studied church law. The modern sense of 'non-combatant' only emerged during the Napoleonic Wars, when the distinction between soldiers and ordinary citizens