You have to get more happy citizens than unhappy citizens. During despotism and monarchy military police in the city will reduce unhappiness. Luxuries will work in any government. Temples, cathedrals and colloseums make citizens happy. Many great wonders also influence the behaviour of citizens (sistine chapel, oracle, hanging gardens, bachs cathedral). Market places in combination with luxuries are excellent.
You can also move the luxury slider.
Rush building in despotism makes people unhappy.