A Longview man has been sentenced to 30 years in prison after pleading guilty to possession of child pornography.