Last active
July 3, 2019 16:50
-
-
Save bigga/182bce9bced4ee67780b2905591f45c8 to your computer and use it in GitHub Desktop.
Geoserver service file to run as a service in CentOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This snippet is copied from: http://supadit.com/article/%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87-geoserver-%E0%B8%9A%E0%B8%99-centos | |
# The site is already down. So I keep the code as reference here. | |
# To run Geoserver as a service in CentOS, first install Geoserver, obviously | |
# Then, put this script into /etc/systemd/system/ | |
# You can also run this command and copy and paste the content below. | |
# vi /etc/systemd/system/geoserver.service | |
# After creating the script, you can run the following commands to start and check the service | |
# systemctl daemon-reload | |
# systemctl enable geoserver | |
# systemctl start geoserver | |
# systemctl status geoserver | |
[Unit] | |
Description=GeoServer | |
After=network.target | |
[Service] | |
Type=simple | |
Environment=GEOSERVER_HOME=/var/www/geoserver | |
ExecStart=/var/www/geoserver/bin/startup.sh | |
ExecStop=/var/www/geoserver/bin/shutdown.sh | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment