Is there a way to run a jar at startup on CentOS 6.5 but only after MySQL is running?
Asked
Active
Viewed 380 times
1
-
Yes there is a way. Make sure Java is installed and make a startup script that starts after MySQL. You should at least provide some more info about the version of CentOS you are running because it makes a difference how things are started. – Anthon Jun 18 '15 at 10:13
-
@Anthon Thanks for you reply. I have CentOS 6.5 , I already have Java installed, but I don't know how to write the script. – Doua Beri Jun 18 '15 at 11:10
-
Don't you know how to write the script, or don't you know how to invoke a script after MySQL is running, or both? – Anthon Jun 18 '15 at 11:31
-
don't know how to invoke the script after MySQL is running. – Doua Beri Jun 18 '15 at 12:48
1 Answers
1
The quick and dirty way is to add a command that starts your application at the bottom of the file /etc/rc.local
. This file is executed last of the rc
files during the startup process, and normally the MySQL server should be running by then.

Marios Zindilis
- 216