They make a general spray adhesive that will work.
Protect the areas that you do not want any glue on.
Make sure that your carpet is flexible and you can roll it back on the hull.
Spray a nice even coat on the exposed area of the hull.
Do the same on the back side of the carpet.
Let it set for a minute or so until both are tacky.
Then start evenly, rolling the carpet up from the bottom, using about a 6 in piece of 2x4, applying pressure as you go.
This is the way that I have done it.
Larger area, larger block of wood.