![]() ![]() Once reloaded, start the service: sudo systemctl start rvice The next thing to do is start the application service, but first, reload systemd so that it knows of the new application added. When done with the change, give the user and group ownership permissions for the Project Directory: sudo chown -R jvmapps:appmgr /opt/prod Step 3: Start Java Application service with systemd Xms128m and -Xmx256m are used to set the minimum and maximum memory that the application can use. ![]() Set User to the one created earlier, and WorkingDirectory to the directory with a jar file. sudo vim /etc/systemd/system/rviceĮxecStart=/bin/java -Xms128m -Xmx256m -jar myapp.jar You need to create this file as root user. We can now create a systemd service file to manage our application. Uid=992(jvmapps) gid=986(appmgr) groups=986(appmgr) Step 2: Create Systemd Service ![]() Next, we create a system user jvmapps with the default group: sudo useradd -r -s /bin/false -g appmgr jvmappsĬonfirm user created and if with the correct group: $ id jvmapps ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |