NAIROBI (Reuters) - U.S. President Barack Obama told African entrepreneurs in Kenya on Saturday they could help counter violent ideologies and drive growth in Africa, and said governments had to help by ensuring the rule of law was upheld and by tackling corruption.

Obama was addressing a Global Entrepreneurship Summit at the start of the first presidential visit to Kenya, his father's homeland and the biggest economy in east Africa, which has been hit by a spate of attacks by Somali Islamist group al Shabaab.

Security was expected to top the agenda in talks later on Saturday with President Uhuru Kenyatta but Obama is also keen to increase business ties with Africa, where China overtook the United States as the continent's biggest trade partner in 2009.

"Africa is on the move. Africa is one of the fastest growing regions in the world," Obama told the conference, where he was greeted by applause when he began with the words "Jambo", the Swahili for "hello". "It is wonderful to be back in Kenya."

"Entrepreneurship offers a positive alternative to the ideologies of violence and division that can all too often fill the void when young people don't see a future for themselves."

He said government had a vital role on issues such as establishing the rule of law and curbing corruption, citing two issues often cited by businesses as major obstacles. He said more had to be done to help new firms secure capital.

An array of technology and other companies have started up in recent years in Africa in a bid to shift the continent away from a traditional focus of commodity exports, but entrepreneurs often complain they cannot find affordable capital.

"Africa is open for business," Kenyatta said in his opening in which he welcomed the U.S. president. "It is the time for a new generation of Africans to promote inclusive prosperity."

The annual U.S.-sponsored conference was being held for the first time in Sub-Saharan Africaat a U.N. compound in Nairobi.

Obama will later pay tribute to victims and survivors of the 1998 bombing by Islamist militants of the U.S. Embassy in Nairobi. After that attack the embassy was moved to a site next to the U.N. compound.

On Saturday evening, he will hold talks with Kenyatta before attending a state dinner. Discussions are expected to focus on security and counter-terrorism cooperation.

"Proud to be the first American president to visit Kenya. Happy to see family, and to talk with young Kenyans about the future," Obama wrote on his Twitter account after arriving on Friday and meeting members of his extended family for dinner.

Some Africans complain that Obama, whose father is buried in western Kenya, has not given paid enough attention to the continent during his presidency. Obama has sought to change that perception, in part by hosting African leaders in Washington last year.

(Additional reporting by George Obulutsa; Writing by Edmund Blair; Editing by Mark Heinrich)