how to put the spectator mode in Minecraft Minecraft Servers

how to put the spectator mode in Minecraft