The issue is due to the reading of the System requirements at https://golang.org/doc/install In particular: Debian GNU / kFreeBSD not supported CentOS / RHEL 5.x not supported Are the main operating systems for web servers listed here, are they all not supported? What then put?

And another question is needed if any related software? (for php, for example, put nginx or apache)

    4 answers 4

    Runs Go on all platforms.

    But it must first be compiled for the required platform. For example, you can compile code on Windows to work on UNIX systems. This is done using environment variables. In many cases, preferences give Ubuntu and CentOS always better to install fresh ones.

    If you write your server then Nginx is not needed. But if you want to use a router or a load balancer, then of course Nginx will help. But we must remember that Nginx has its charms.

    Database is a matter of requirements. It all depends on the tasks and speed requirements. Need the highest speed is Redis , if you need a web service - MongoDB or RethinkDB. Of course, no one has canceled wonderful MySQL and PostgreSQL if you need a relational database or, for example, you are in love with triggers and stored procedures.

      Install Ubuntu 16.04. As a gift, get GO 1.6 out of the box

      As for the additional software, it all depends on your wishes.

      • I see, thanks. Does Go Go on other OSs? Is this a significant part of the question really for me? And what else is desirable to set for a web server on Go? - StupidSkynet
      • For a web server, nginx does not interfere, and of course databases, if you plan to use them. - user3640719

      The table of your link should be understood as follows:

      Supported:

      • All releases of FreeBSD since version 8. Debian GNU / kFreeBSD Exception
      • GNU / Linux distributions with kernel 2.6.23 and higher. The CentOS 5th branch is probably already very ancient, and apparently is listed as one of the frequently used server distributions.
      • With MacOS and Windows, I think it's understandable.

      From companion software, you can also use Nginx as with PHP to distribute static.

        It works everywhere, you do not need to configure the environment for a web server, as on a working computer, you just need to ensure that you run compiled programs, for example through systemd.

        Put nginx as a web server (write proxy_pass in the settings), you can access your Go web applications not on different ports, but on one port (: 80) and different hosts.