Component deployment directly affects the performances of component-based distributed applications, such as response time, throughput, reliability, and security. It also affects resources utility of runtime environment. In order to reduce the cost of resources used by applications and improve the resources utility, this paper defined component graph to represent component-based distributed applications, and used tree network topology to describe the runtime environment of distributed applications. We defined the resource cost objective function and formulated component deployment optimization problem as mathematical programming problem. Example analysis demonstrated our approach was effective.