A western Pennsylvania pastor will serve up to two years in prison after pleading guilty to charges of possession of child pornography and related offenses.