Unmanned aerial vehicles (UAVs) have emerged as a promising solution to provide wireless data access for ground users (GUs) in various applications. In this paper, we study UAV deployment problem in an integrated access and backhaul network, where a number of UAVs are deployed as aerial base stations (ABSs) or aerial relays (ARs) to forward GUs' data packets to the remote gateway via multi-hop transmissions. Aiming at minimizing the system cost, which is defined as the weighted sum of UAV deployment cost and the energy consumption required for data transmission, a constrained system cost minimization problem is formulated, where UAV deployment, GU association and route selection problem are optimized. To solve the formulated non-convex problem, we propose a two-stage heuristic algorithm. In the first stage, we focus on the optimal design of the access links and propose a joint ABS deployment and resource allocation algorithm. Specifically, a modified K-means based clustering scheme is proposed to determine ABS deployment and GU association strategy.Given the obtained ABS deployment strategy, in the second stage, we then design a joint AR deployment, route selection scheme for the backhaul links and propose a minimum circle algorithm-based AR deployment and route selection strategy. Numerical results verify the effectiveness of the proposed algorithm.