居安思危 If you want peace, make ready for war.

居安思危 ju1 an1 si1 wei1 prepare for disaster in times of peace.
 

居 door on top 户hu4 of 10十shi2 mouths口kou3.
10 mouths = ancient generation.古 gu3
 

居 is the place where 10 generations have and will LIVE
 

安 Roof on top 宀mian2, woman below, 女nv3 a woman living at home in PEACE
 

思 brainbox田tian2 on top, heart心xin1 below. Brains+Heart=THINKING (field 田 is also used, but less frequently, to indicate the head of a person or, also less frequently, a sack or bag for carrying things)
 

危 image of a refugee person 人ren2 on a cliff who has fled royal power 卩 because of DANGER

The wei1 危 in this proverb refers to any danger, refugees also flee due to natural disasters. 危险wei1xian3 is a frequent colocation for this wei. E.g.: 这列很危险 it is very dangerous there.