BOSTON (AP) _ Two city employees, one former employee and six real estate developers and contractors have been indicted on charges including racketeering and bribery in connection with building inspections.

U.S. Attorney William Weld said the indictments, which were unsealed Wednesday, were the fruit of a 21/2 -year investigation by the FBI. He said there may be more indictments in the investigation of the Assessing and Inspectional Services departments.

Seven of the nine indicted were arraigned in U.S. District Court and pleaded innocent. Francis H. Kent, 54, of Dedham, a senior inspector in the Inspectional Services Department and a city employee for 22 years, was ordered held without bail. The other six were released.

Assistant U.S. Attorney Mark E. Robinson said there was a serious risk that Kent, if released before trial, would ''continue to influence witnesses to give false testimony and provide them with false documentation in an effort to conceal false payoffs and bribes.''

After the indictments were made public Wednesday, Boston Mayor Raymond L. Flynn fired Kent and Robert Petrillo, 53, of Stoneham, a senior official in the Assessing Department.

The former employee indicted, Charles Wright of Boston, resigned as a city building inspector in June.

The charges also include mail fraud, conspiracy, obstruction of justice and perjury.

The indictments accused the nine men of lying to the grand jury or scheming to get buildings illegally cleared for remodeling, for use as apartments or for other development. The document detailed 12 alleged acts of racketeering involving 17 cash bribes.

Kent pleaded innocent to charges of obstructing and conspiracy to obstruct the federal grand jury's investigation and with giving false testimony.

Wright, 54, and Petrillo pleaded innocent to racketeering.

Wright, a building inspector, allegedly took bribes from eight contractors, developers and building owners. The indictments also accused Wright of arranging bribes for other employees of the inspection department.