This is so easy!
Preheat your oven to 250 degrees F.
Take whatever nuts you want to store. Shell them or just make sure there are no bits of shell or debris.
Place the nuts in whatever size jars you want and place new lids and rings on.
Place your jars on a baking tray (for stability), and bake for one hour. Remove and let cool.
As long as they are sealed, they will store almost forever.