Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
b0119479
Commit
b0119479
authored
Jan 28, 2016
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.3.x'
parents
df64a74e
93de0d7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
deployment.adoc
spring-boot-docs/src/main/asciidoc/deployment.adoc
+23
-6
No files found.
spring-boot-docs/src/main/asciidoc/deployment.adoc
View file @
b0119479
...
...
@@ -499,12 +499,13 @@ secured accordingly. Use `chmod` so that the file can only be read by the owner
[[deployment-systemd-service]]
==== Installation as a systemd service
Systemd is the successor
to `init.d` scripts, and now being used by many many modern Linux
distributions. Although you can continue to use `init.d` script with `systemd`, it is also
possible to launch Spring Boot applications using `systemd` '`service`' scripts.
Systemd is the successor
of the System V init system, and is now being used by many modern
Linux distributions. Although you can continue to use `init.d` scripts with `systemd`, it
is also
possible to launch Spring Boot applications using `systemd` '`service`' scripts.
For example, to run a Spring Boot application installed in `var/myapp` as user `myapp` you
can add the following script in `/etc/systemd/system/myapp.service`:
Assuming that you have a Spring Boot application installed in `/var/myapp`, to install a
Spring Boot application as a `systemd` service create a script named `myapp.service` using
the following example and place it in `/etc/systemd/system` directory:
[indent=0]
----
...
...
@@ -521,7 +522,23 @@ can add the following script in `/etc/systemd/system/myapp.service`:
WantedBy=multi-user.target
----
TIP: Remember to change the `Description` and `ExecStart` fields for your application.
TIP: Remember to change the `Description`, `User` and `ExecStart` fields for your
application.
Note that unlike when running as an `init.d` service, user that runs the application, PID
file and console log file behave differently under `systemd` and must be configured using
appropriate fields in '`service`' script. Consult the
http://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit
configuration man page] for more details.
To flag the application to start automatically on system boot use the following command:
[indent=0,subs="verbatim,quotes,attributes"]
----
$ systemctl enable myapp.service
----
Refer to `man systemctl` for more details.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment