Upgrade influxdb to 2.x

We want to execute joins in Grafana. For the same we got to know that we need to upgrade the influxdb to 2.x version
How we can upgrade it?

Thanks