How do you change gamemodes?

I want to change my servers’ gamemode to darkrp.

sv_gamemode DarkRP
sv_defaultgamemode DarkRP

I know that, but where

Server.cfg or the command line.

What I would do is mount it in ‘game.cfg’, so when ever the server starts it loads the gamemode, and map. Put the map name in it too. Putting it in server.cfg makes the server go to sandbox, then you need to restart it in order for RP to work.

Also can use changegamemode concommand in-game, if you want to switch it live.