Linux Automatic Startup

Jim Wilson shared this question 3 years ago
Answered

Apologies if this has been asked and answered, but I cant locate anything.


What is the recommended way to have Yellowfin start up automatically on a Linux platform?

Best Answer
photo

Hello Jim,


Thanks for reaching out with your question. Essentially, the service will always be started by executing the <YellowfinInstall>/appserver/bin/startup.sh script, which then forks into the Apache Tomcat process. How you configure this will be somewhat dependent on your service manager, i.e. init or systemd.


Most distributions are moving towards systemd, and if you happen to be on one you can use this article to set up your service file. This article also covers best practice of having Yellowfin running under its own user context, etc. Definitely worth a read!


If you're using something such as System V, you'll have a bit of a different process. Generally, you'll want to start Yellowfin at run level 2, 3, or 4. The scripts to be run at startup reside within the /etc/init.d directory. Something like:

#!/bin/bash

sh /opt/Yellowfin/appserver/bin/startup.sh
would start the Yellowfin service. Make sure this script is executable and place it in the /etc/init.d directory. Next, go ahead and create a symlink to set the run level this service will start at:

ln -s /etc/init.d/yellowfinscript /etc/rc3.d
This will start the service during run level 3 on startup.


Note that there are other service managers available that may have a different process, although most Linux distributions are moving towards systemd! If you have an alternative service manager to systemd or the init system, please let me know and I can assist in the process.


Thanks,

Ryan

Comments (3)

photo
2

Hello Jim,


Thanks for reaching out with your question. Essentially, the service will always be started by executing the <YellowfinInstall>/appserver/bin/startup.sh script, which then forks into the Apache Tomcat process. How you configure this will be somewhat dependent on your service manager, i.e. init or systemd.


Most distributions are moving towards systemd, and if you happen to be on one you can use this article to set up your service file. This article also covers best practice of having Yellowfin running under its own user context, etc. Definitely worth a read!


If you're using something such as System V, you'll have a bit of a different process. Generally, you'll want to start Yellowfin at run level 2, 3, or 4. The scripts to be run at startup reside within the /etc/init.d directory. Something like:

#!/bin/bash

sh /opt/Yellowfin/appserver/bin/startup.sh
would start the Yellowfin service. Make sure this script is executable and place it in the /etc/init.d directory. Next, go ahead and create a symlink to set the run level this service will start at:

ln -s /etc/init.d/yellowfinscript /etc/rc3.d
This will start the service during run level 3 on startup.


Note that there are other service managers available that may have a different process, although most Linux distributions are moving towards systemd! If you have an alternative service manager to systemd or the init system, please let me know and I can assist in the process.


Thanks,

Ryan

photo
1

Hi Ryan,


Many thanks for your excellent response,. For the environment that we are using we had to go down the System V root, and I made the following adjustments to your instructions:


1. Added this line to yellowfin script

# chkconfig: 2345 99 5


2, Ran this command:

chkconfig --add yellowfin


Thanks again!!

Jim

photo
1

Hello Jim,


Thanks for including these additional steps. I'm glad you were able to successfully configure Yellowfin for automatic startup on your System V Linux device. I'll mark this as Answered. Don't hesitate to reach out with any further questions or issues.


Thanks,

Ryan