The public must not rely on the government to prevent gang culture, but take more responsibility itself, David Cameron has said.
Mr Cameron praised the bravery of Rhys Jones' parents
The Tory leader also praised the bravery of the parents of 11-year-old Rhys Jones, who was shot dead.
He added: "It's not just what we expect from government but what we expect from ourselves and society that can stop this from happening."
Home Secretary Jacqui Smith said it was vital that people felt safe.
Speaking during a visit to Oxfordshire, Mr Cameron praised the young men and women fighting in places such as Afghanistan and Iraq.
He talked about the Military Covenant - which guarantees soldiers fair treatment in return for forgoing other rights - and suggested the idea of a "social covenant" to ensure civilians look out more for each other.
This should focus on parenting, schools and communities, Mr Cameron said.
He called for shops to stop selling alcohol to under-18s and for the media, music companies and computer game manufacturers to show "true social responsibility".
Mr Cameron said: "Just as the Military Covenant sets out what we - society - must do for our military, so today we should consider our obligations in tackling crime and building a stronger society.
"We need a social covenant. I'm not talking about a new set of words to express our national values. I'm talking about something more powerful than words.
"A national recognition that it is not just up to the government to take responsibility for the state of our nation, it is up to all of us.
"To me this is what social responsibility is all about."
Political leaders have united in condemnation of the murder of Rhys Jones in Croxteth, Liverpool, on Wednesday.
In his speech, Mr Cameron said: "It must not be allowed to become just another testimony of despair that shocks a nation one night and is then forgotten."
He added: "I don't know who killed Rhys Jones. But I do know this: no child in this country should be riding around on a BMX bike with a gun shooting other children."
Ms Smith said it was "the responsibility to all of us to make sure that where we have really serious violent crimes like this that involve guns we are doing everything we can do" to control guns.
"I want to get really serious about the supply of guns on our streets, working with the police and others to make sure that we are cutting off the supply of guns coming into this country," she told BBC News 24.
This involved ongoing work to stop the guns supplied through the internet, and working with the Association of Chief Police Officers, Ms Smith said.
The new border force would also make gun control a priority, she added.
Prime Minister Gordon Brown has promised "tougher enforcement" of the law in areas with a gang violence problem.
He said he wanted to get more police on the streets and to "crack down" on illegal sales of alcohol to under-18s.
Liberal Democrat leader Sir Menzies Campbell has warned that there will be "no simple solution" to deal with gang culture and knife and gun violence.
Former home secretary David Blunkett said more needed to be done to guarantee the protection of witnesses.
He told the BBC: "In some of these communities, particularly where there are gangs, there will be youngsters who know who did it.
"There will be parents whose youngsters look frightened and worried.
"If only we could get them to share their knowledge and be protected in circumstances where they know that their fellow teenagers are carrying guns then we might get them to be able to collaborate and come forward."