1, rename jar file  
mv facetool-0.0.1-SNAPSHOT.jar  facetoolserver.jar
2, Add run permission  
sudo chmod 777 facetoolserver.jar
3, Add to service connection  
sudo ln -s /home/user/servers/facetoolserver.jar /etc/init.d/facetoolserver
(facetoolserver It's your service name , What we should pay attention to here is to write it down jar The full path of the package , Otherwise, adding service link fails )

4, add to java Environment links to sbin
sudo ln -s /usr/java/jdk1.8.0_162/bin/java /sbin/java
( Otherwise, it will report when the operation service starts Unable to find Java)

5, Start service
service facetoolserver start
6, Check whether it runs successfully lsof -i :8080

7, Add auto boot
chkconfig --add  facetoolserver
8,  Verification self start :service facetoolserver stop , Reset computer :reboot

Technology