Or you can try this. It actually works pretty well.
1) leave the axleshaft nut tight so the bearing won't come apart.
2) remove the 4 hub-to-knuckle bolts from behind.
3) purchase a bolt with the same threading as the hub bolts, but an inch or 2 longer
4) thread that bolt into one of the hub holes several threads.
5) use a heavy metal spacer, such as an impact socket to fill the gap between the bolt head and the end-yoke of the axle tube.
6) start the truck and use the power steering to break loose the hub. Only turn the wheel VERY SLIGHTLY
or you will bend/break the bolt.
7) repeat on the other side of the hub.
They can be hard to get off...especially if they have a lot of miles on them...or if they've been driven in road salt. Remember to put some anti-seize on the surfaces when you put it back together.
The rotor is part of the hub. It's a single unit.