An optimal control problem is studied for a predator-prey system of PDE, with a logisticgrowth rate of the prey and a general functional response of the predator. The controlfunction has two components. The purpose is to maximize a mean density of the two speciesin their habitat. The existence of the optimal solution is analyzed and some necessaryoptimality conditions are established. The form of the optimal control is found in someparticular cases.