Ezra's recap of Israel's history has arrived at the accession of David, following the death of Saul.
20 Year Coronation
In verses 1-3 we leap over the time that David was King of Judah and fighting with Isbosheth for the throne of all of Israel. This scene opens with all of Israel rallying to David in Hebron- recognizing his role in their lives all along and pledging a covenant with him.
Samuel had actually anointed him king 20 years earlier; but he is now on the throne.
From Jebus to Jerusalem
Verses 4-9 briefly describe David's establishment of Jerusalem as the capital.
He was wise enough to know that he could not successfully lead a united nation if he ruled from his former Judah capital, Hebron. So he chose a city that was occupied by another people in a neutral area between Saul's Benjamin tribe and Judah. It was named Jebus.
As mentioned in previous posts, the city was uniquely defensible and well-provided for. It was perfect. Except others lived there. And they felt they were untouchable. David offered a reward of a high office for the first to strike down a Jebusite (the people). Of course, Joab rose to the challenge.
The city became know as the City of David, or as we know it, Jerusalem.
verse 9: "And David became greater and greater for the Lord of hosts was with him."