LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-03-2015, 02:48 PM   #1
apss_evaluator
Member
 
Registered: Mar 2012
Posts: 115

Rep: Reputation: Disabled
automate start script everytime linux turns on


Hi Linux Guru's

I would like to ask on what might be the best move to have our jboss and applications run automatically every time our centos will be turned on.

I'm not yet fully knowledgeable the on how to put the start scripts on chkconfig feature
 
Old 06-03-2015, 02:57 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,029

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
for the system to run it upon reboot as root you would add it to /etc/rc.local.

most newer distros support an @reboot line in the users crontab.

you can append those lines (or call the script) in ~/.profile (mite be ~/.bash_profile depending on distro/shell) but it will only run when that specific user logs in.

edit:
[schneidz@hyper may]$ ll /etc/rc.local
lrwxrwxrwx. 1 root root 13 Jul 23 2011 /etc/rc.local -> rc.d/rc.local
[schneidz@hyper may]$ ll /etc/rc.d/rc.local
-rwxr-xr-x. 1 root root 345 Jul 7 2014 /etc/rc.d/rc.local


in the past i had to create /etc/rc.d/rc.local with the proper permissions.

Last edited by schneidz; 06-03-2015 at 03:37 PM.
 
1 members found this post helpful.
Old 06-03-2015, 03:07 PM   #3
apss_evaluator
Member
 
Registered: Mar 2012
Posts: 115

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by schneidz View Post
for the system to run it upon reboot as root you would add it to /etc/rc.local.

most newer distros support an @reboot line in the users crontab.

you can append those lines (or call the script) in ~/.profile (mite be ~/.bash_profile depending on distro/shell) but it will only run when that specific user logs in.
thanks, I will try it
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Speaking Unix, Part 6: Automate, automate, automate! LXer Syndicated Linux News 0 01-04-2007 10:54 AM
Making some commands run everytime I start Linux (Slack 9.1) Agna Linux - Newbie 7 08-26-2005 10:38 PM
Why does Linux do a DNS lookup everytime I start an application? Bandhel Linux - Networking 2 02-23-2004 08:08 AM


All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration