I used to have those on my boats. They were just held on with a U bracket similar to this.
They had some strips of rubber/plastic type material in between the bracket and posts I think to keep it from rotating.
As far as the rest goes, like building them, I haven't a clue.