This paper deals with the collapse and rebound of two bubbles with different initial radii and those of a bubble near a plane or curved rigid wall using the boundary element method. The dynamics of a toroidal bubble, which is formed after a liquid microjet passes through a bubble, is taken into consideration. It is shown that the maximum internal pressure of interacting bubbles can be higher than that of an isolated bubble due to the difference of the phase between the motion of two bubbles. It is also shown that the bubble motion is affected by the shape of a rigid wall. Although the maximum internal pressure of a bubble near a convex wall is higher than that near a concave wall, the pressure on the concave wall induced by the bubble collapse is higher than that on the convex wall. The wall pressure is dependent on the translational motion of a bubble toward the wall and the formation of a high pressure region due to the penetration of the microjet.