linux.rst 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .. _installation_linux:
  2. Linux binary
  3. ============
  4. .. note:: For installing on Linux with an existing application server such as Tomcat, please see the :ref:`installation_war` section.
  5. The platform-independent binary is a GeoServer web application bundled inside `Jetty <http://eclipse.org/jetty/>`__, a lightweight and portable application server. It has the advantages of working very similarly across all operating systems and is very simple to set up.
  6. Installation
  7. ------------
  8. #. Make sure you have a Java Runtime Environment (JRE) installed on your system. GeoServer requires a **Java 11** or **Java 17** environment, available from `OpenJDK <https://openjdk.java.net>`__, `Adoptium <https://adoptium.net>`__, or provided by your OS distribution.
  9. .. note:: For more information about Java and GeoServer compatibility, please see the section on :ref:`production_java`.
  10. #. Navigate to the :website:`GeoServer Download page <download>`.
  11. #. Select the version of GeoServer that you wish to download. If you're not sure, select :website:`Stable <release/stable>` release.
  12. .. only:: snapshot
  13. These instructions are for GeoServer |version|-SNAPSHOT which is provided as a :website:`Nightly <release/main>` release.
  14. Testing a Nightly release is a great way to try out new features, and test community modules. Nightly releases
  15. change on an ongoing basis and are not suitable for a production environment.
  16. .. only:: not snapshot
  17. These instructions are for GeoServer |release|.
  18. #. Select :guilabel:`Platform Independent Binary` on the download page: :download_release:`bin`
  19. #. Download the :file:`zip` archive and unpack to the directory where you would like the program to be located.
  20. .. note:: A suggested location would be :file:`/usr/share/geoserver`.
  21. #. Add an environment variable to save the location of GeoServer by typing the following command:
  22. .. code-block:: bash
  23. echo "export GEOSERVER_HOME=/usr/share/geoserver" >> ~/.profile
  24. . ~/.profile
  25. #. Make yourself the owner of the ``geoserver`` folder. Type the following command in the terminal window, replacing ``USER_NAME`` with your own username :
  26. .. code-block:: bash
  27. sudo chown -R USER_NAME /usr/share/geoserver/
  28. #. Start GeoServer by changing into the directory :file:`geoserver/bin` and executing the :file:`startup.sh` script:
  29. .. code-block:: bash
  30. cd geoserver/bin
  31. sh startup.sh
  32. #. In a web browser, navigate to ``http://localhost:8080/geoserver``.
  33. If you see the GeoServer Welcome page, then GeoServer is successfully installed.
  34. .. figure:: images/success.png
  35. GeoServer Welcome Page
  36. #. To shut down GeoServer, either close the persistent command-line window, or run the :file:`shutdown.sh` file inside the :file:`bin` directory.
  37. Uninstallation
  38. --------------
  39. #. Stop GeoServer (if it is running).
  40. #. Delete the directory where GeoServer is installed.