To install selenium grid, here are the steps you need to follow:
Step 1: Go to this link. Download the Selenium server.

Step 2: Use the following command java -jar selenium-server-standalone-3.141.59.jar -role hub

Step 3: Open your browser and open the link: http://localhost:4444/grid/console

Hope this helps.