Since the last ceasefire collapsed in April 2007, about 600 Palestinians and 18 Israelis have been killed in fighting between the two sides.
A senior Hamas figure in Gaza, Ismail Haniya, said the truce would "bring stability to Israel if they commit themselves to it".
Israelis in the south of the country will appreciate the relief from daily missile fire, says our Jerusalem correspondent, but many fear that a ceasefire could give Hamas the chance to rearm and strengthen itself further.
Hamas seized control of Gaza in June 2007, driving out forces loyal to Fatah, the political faction led by Palestinian Authority President Mahmoud Abbas.
Israel then tightened its blockade on Gaza, allowing through only humanitarian supplies.
Under the terms of the new agreement, Israel will ease restrictions on the trade of certain goods between Gaza and Israel on Friday morning, and open up the crossings for all commercial goods next week.
Footage of militants dismantling their rockets and weapons
After two weeks, talks will start involving Israel, Hamas, the Palestinian Authority and the EU on reopening the Rafah crossing into Egypt.
And negotiations on the return of Israeli soldier Gilad Shalit, captured by militants in Gaza in June 2006, are supposed to resume within a few days, Israeli sources say.
Separately, Mr Olmert told the BBC that peace talks with the Palestinian Authority were going well.
He said serious progress had been made on issues including the borders of a future Palestinian state. He said Israel could make dramatic compromises on territorial issues but that the Palestinians would have to make compromises as well.
Mr Olmert and Mr Abbas pledged last year to works towards concluding a peace agreement by the end of 2008.
Just hours before the truce came into effect, a barrage of rockets and mortars were fired into Israel and the Israeli army killed a Palestinian militant in an air strike.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.