Just lay low, don't speak/be annoying but at the same time don't be a bitch and take insults from someone.
Stay clear from any of the sex and making it known you're gay. Don't get into drugs/smokes cause you'll owe someone because of that. Volunteer for activities if possible, read books/get buff. Don't piss off any of the guards but at the same time don't be their bitch. Never snitch. Don't try it in the showers. If you have a cell mate pray to god he's not the biggest guy in the prison.