I have installed tomcat on Ubuntu system. I need to configure tomcat service such that it starts on Ubuntu machine is started.
1 Answer
Start the Tomcat service by executing:
sudo systemctl start tomcatCheck the service status with the following command:
sudo systemctl status tomcatOUTPUT:
⬤ tomcat.service - Tomcat 9 servlet container Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: enabled) Active: active (running) since Wed 2018-09-05 15:45:28 PDT; 20s ago Process: 1582 ExecStart=/opt/tomcat/latest/bin/startup.sh (code=exited, status=0/SUCCESS) Main PID: 1604 (java) Tasks: 47 (limit: 2319) CGroup: /
If there are no errors enable the Tomcat service to be automatically started at boot time:
sudo systemctl enable tomcatTo allow traffic on port 8080 type the following command:
sudo ufw allow 8080/tcp 1