LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Startup Programs (https://www.linuxquestions.org/questions/linux-newbie-8/startup-programs-757775/)

shmeezy 09-25-2009 01:58 PM

Startup Programs
 
Hi, I am new to Linux and I'm using a Linux/Suse OS. I have just installed MYSQL, Java JDK 1.5, and Tomcat 5, in order to run a Help Desk Program. Everything is working good but I need to set all of the programs to load on boot in this sequence. MySQL, Java, then Tomcat 5 Then the Help desk. How do I lookup the boot processes and setup this boot sequence?

Thank you in advance!

lutusp 09-26-2009 01:27 AM

Quote:

Originally Posted by shmeezy (Post 3697050)
Hi, I am new to Linux and I'm using a Linux/Suse OS. I have just installed MYSQL, Java JDK 1.5, and Tomcat 5, in order to run a Help Desk Program. Everything is working good but I need to set all of the programs to load on boot in this sequence. MySQL, Java, then Tomcat 5 Then the Help desk. How do I lookup the boot processes and setup this boot sequence?

Thank you in advance!

MySQL will start without any special effort -- just enable the service.

Java is not an application program and it doesn't need to be "started".

Tomcat is a service AFAIK, same as MySQL. Just enable the service to run at boot.

Help Desk sounds like an application -- put a reference to it in /etc/rc.local.

If any of this sounds mysterious and incomprehensible, maybe a bit of Web browsing on the topic of server management is in order.

saifkhan123 09-26-2009 01:31 AM

lookup init.d files
 
all you have to do is to lookup into the start/stop scripts of all the applications i.e. MySQL, Tomcat, which in my case(i use CentOS 5.3) are present in /etc/init.d, lets say you want to set boot priority for MySQL, then you have to edit the file

Code:

# vi /etc/init.d/mysqld
which is the start/stop file for MySQL, you have to find start/stop files for Java and Tomcat similarly in /etc/init.d directory, make sure that you backup the original file somewhere before you edit it,

Now The first few lines of mysqld will be like
Code:

#!/bin/bash
#
# mysqld        This shell script takes care of starting and stopping
#              the MySQL subsystem (mysqld).
#
# chkconfig: 345 64 36
# description:  MySQL database server.
# processname: mysqld
# config: /etc/my.cnf
# pidfile: /var/run/mysqld/mysqld.pid

Now the line
Code:

# chkconfig: 345 64 36
states that, MySQL will run on runlevels 3,4 and 5, and the boot priority for starting up is 64, and for stopping is 36. Now if you want Tomcat to start after the Mysql, you can set the line in Tomcat start/stop script as
Code:

# chkconfig: 345 65 35
this will start Tomcat immediately after MySQL and stop it just before stopping MySQL. Save and exit the files and then make sure they are started at boot time by typing the commands
Code:

# chkconfig --add mysqld
# chkconfig --add tomcat

hope that you have got the idea

ongte 09-26-2009 01:41 AM

If your helpdesk app is a GUI app. Then you'll need to start it from the session manager of your desktop. This is different from every desktop. U'll need to tell us what ur running.


All times are GMT -5. The time now is 09:01 AM.