There is special carpet glue for carpet, it can be glued on the cement floor
Using 801 strong glue can be fixed, the early will be a little odorous. As long as it is soft gel, it is ok.
There are special hot strip for carpet, or use nail plate to fix, it's fixed on the back, beautiful and strong
Suggest that you hit a hole on the ground firstly, and then use nails to nail the carpet, if you use glue directly, it's not adhere to it.
Use mound layer, it's convenient for cleaning electric hammer, drilling for stairs, use copper bars (or similar material) to fasten screw, it's troublesome to clean PVC glue.