Give them good bedrooms. If you have them carry food they tend not to use your dining rooms so they won't get happy thoughts from that. They'll take joy in slaughter if they fight/kill anything. Masterwork statues in the barracks may help, I haven't tried it personally. I usually wait until they become 'enraged by a long patrol duty' then give them 2-3 months off as it can take a little while for the thought to disappear, 1 month usually isn't enough. Once they become X-Lords/Master leave them on duty full time.
On embark I usually take:
Dwarf 1 - 3 Axe user, 3 Shield user, 2 teacher, 2 student
Dwarf 2 - 3 Fighter, 3 Armour User, 2 teacher, 2 organizer
Dwarf 3 - 3 Striking, 3 Dodging, 2 teacher, 2 student
That gives me a good starting military platform. I give each dwarf what I consider to be an offensive and defensive skill in case I run in to trouble really early. Taking a few copper/bronze shields and axes can get them some early experience versus wildlife and get you some easy meat. I try and get them at least copper armour and weapons by Autumn and have them training full time from the second wave of migrants onwards. Add spare migrants to the squad with them training three months on one month off or just full-time and in 3-5 years you'll have X-Lords/Masters with legendary fighting and level 7-12 in the other military skills. Picking migrants that aren't 'weak' or 'clumsy' helps but military training improves these attributes and within a few years they'll all be unimaginably strong, indefatigable, have an iron will etc.
Giving one squad wooden training weapons and having them beat on cavern creatures and wildlife can very helpful too, just don't have them face off against armed goblins or re-equip them first. So long as you get at least 6 dwarves in the military equipped in iron/bronze by the start of the second year you shouldn't have much trouble dealing with the first and maybe second cavern layer and any goblin ambushes. If you have trouble getting them to pick up equipment try either resetting the uniform or stationing them by your armour stockpile.