LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-17-2015, 04:32 AM   #1
Huamin
Member
 
Registered: May 2011
Posts: 562

Rep: Reputation: 12
Startup file


Hi,
Within Red hat, where is the startup file located at?
 
Old 10-17-2015, 05:08 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051
your post lacks crucial information.

if we know nothing about your setup, we cannot help you locate your startup file.
we also don't know what you want to do with "the startup file" once you find it.

blind guesses:

supposing red hat uses a desktop environment, it will have a menu entry where you can add/remove applications to start at login.

most linuxes execute some form of $HOME/.*profile* at login.

other options are via init system at boot.
e.g. systemd.

Last edited by ondoho; 10-17-2015 at 05:11 AM.
 
Old 10-17-2015, 07:52 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Huamin View Post
Hi,
Within Red hat, where is the startup file located at?
The system boots using a piece of software named grub. The grub configuration file is /boot/grub/grub.conf in Red Hat Enterprise Server 6.x, and /boot/grub2/grub.cfg in 7.x.

Grub itself consists of several components including the bootloader in the first 512 bytes of a disk, a disk area right after the partition table and various files under /boot/grub or /boot/grub2.

Grub then starts the Linux kernel named vmlinuz.... and located at /boot. After that, numerous configuration files and files with startup code are used.
 
Old 10-18-2015, 03:50 AM   #4
Huamin
Member
 
Registered: May 2011
Posts: 562

Original Poster
Rep: Reputation: 12
Many thanks all.

Bern,
I put these

cd /root/Downloads/wildfly-9.0.1.Final/wildfly-9.0.1.Final/bin
./standalone.sh

to the file

/boot/grub/grub.conf

and then have shut down the machine and have re-started but the commands are not executed as expected, during startup. Please advise.
 
Old 10-18-2015, 05:35 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Huamin View Post
Many thanks all.

Bern,
I put these

cd /root/Downloads/wildfly-9.0.1.Final/wildfly-9.0.1.Final/bin
./standalone.sh

to the file

/boot/grub/grub.conf

and then have shut down the machine and have re-started but the commands are not executed as expected, during startup. Please advise.
Grub doesn't execute shell scripts. It starts the operating system, in other words it runs before the OS runs.

If you need to run shell scripts at startup time, I suggest putting them in /etc/rc.local. This is the last file that gets executed after the OS initializes and all services are started up.
 
Old 10-18-2015, 08:04 AM   #6
Huamin
Member
 
Registered: May 2011
Posts: 562

Original Poster
Rep: Reputation: 12
Thanks.

I put these 2 lines

cd /root/Downloads/wildfly-9.0.1.Final/wildfly-9.0.1.Final/bin
./standalone.sh

to the file (/etc/rc.local). But it seems the OS cannot start as expected, and I now only have got such screen
https://dl.dropboxusercontent.com/u/40211031/tt356.png

and cannot access the GUI interface of t he OS. Any advice?

Last edited by Huamin; 10-18-2015 at 08:06 AM.
 
Old 10-18-2015, 10:13 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,145

Rep: Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856
Quote:
Originally Posted by Huamin View Post
Thanks.
I put these 2 lines

cd /root/Downloads/wildfly-9.0.1.Final/wildfly-9.0.1.Final/bin
./standalone.sh

to the file (/etc/rc.local). But it seems the OS cannot start as expected, and I now only have got such screen
and cannot access the GUI interface of t he OS. Any advice?
Aside from the VERY obvious advice of, "remove those two lines"? Not really.

Since you've been posting here for FOUR YEARS now, you should at this point, be able to execute simple commands. The two lines above are a good example of something you should have learned by now; WHY are you putting a "cd" command in, when you can just put the entire executable on one line??? Such as "/root/Downloads.../standalone.sh"

And AGAIN, as you have been asked MANY times over the years, you provide next to zero details, and STILL don't use the Red Hat support which you should be paying for. Since you don't say what version of RHEL, there is no way for us to guess. But a simple Google search for "run a script after system start in red hat linux" pulls up this:
https://access.redhat.com/documentat...-run-boot.html

...as the VERY FIRST HIT. Please, try to show some effort of your own.
 
Old 10-18-2015, 10:59 AM   #8
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by TB0ne View Post
But a simple Google search for "run a script after system start in red hat linux" pulls up this:
https://access.redhat.com/documentat...-run-boot.html

...as the VERY FIRST HIT. Please, try to show some effort of your own.
Or even better google "run wildfly on boot". Wildfly seems to come with an init script which you need to copy to the right place and enable it to run on boot. Took me 2 seconds to find this

http://developer-should-know.tumblr....rvice-on-linux
 
1 members found this post helpful.
Old 10-18-2015, 09:17 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,612

Rep: Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649
/root/Downloads/wildfly-9.0.1.Final/wildfly-9.0.1.Final/bin

do not download things from the net as ROOT

a very big NO- NO !!!

on a DESKTOP gui boot
creat a launcher in the non root users home folder for what ever desktop you are using

for system wide on RHEL6
you do the NORMAL and place a script in /etc/profile.d folder
 
Old 10-18-2015, 10:28 PM   #10
Huamin
Member
 
Registered: May 2011
Posts: 562

Original Poster
Rep: Reputation: 12
John,
I copy the relevant sh file to

/etc/profile.d

but when starting the OS, I only get the following

https://dl.dropboxusercontent.com/u/40211031/tt357.png

Please advise.
 
Old 10-19-2015, 03:36 AM   #11
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by Huamin View Post
John,
I copy the relevant sh file to

/etc/profile.d

but when starting the OS, I only get the following

https://dl.dropboxusercontent.com/u/40211031/tt357.png

Please advise.
Please follow the instruction from the link I posted. It describes exactly what you want to do. It also describes how to run it as a different user, and NOT ROOT!
 
1 members found this post helpful.
Old 10-19-2015, 08:02 AM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,145

Rep: Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856Reputation: 7856
Quote:
Originally Posted by Huamin View Post
John,
I copy the relevant sh file to

/etc/profile.d

but when starting the OS, I only get the following
https://dl.dropboxusercontent.com/u/40211031/tt357.png Please advise.
You've been 'advised' several times now. Yet you haven't actually done anything with the advice you've been given. JohnVV told you that if you were using a GUI based system, to put that file in place, so WHEN YOU LOG IN it will run. You were also given advice on how to run commands at startup, and spoon-fed a link by hortageno that EXPLICITLY TELLS YOU how to start this at system boot...but you're ignoring it all, and seem confused as to why it's not working.
 
1 members found this post helpful.
Old 10-20-2015, 01:24 AM   #13
Huamin
Member
 
Registered: May 2011
Posts: 562

Original Poster
Rep: Reputation: 12
Many thanks hort.
it is fine to run the url steps. how to ensure the service is started everytime when starting the OS?
 
Old 10-20-2015, 02:24 AM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051
Quote:
You've been 'advised' several times now. Yet you haven't actually done anything with the advice you've been given.
or at least you haven't showed us anything.
do you really think i will retrace this thread to guess what you could have possibly meant by "url steps"?
show us everything.
in as much detail as possible.
 
Old 10-20-2015, 04:39 AM   #15
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by Huamin View Post
Many thanks hort.
it is fine to run the url steps. how to ensure the service is started everytime when starting the OS?
This part of the howto does it

Quote:
Add WildFly as a service

Code:
chkconfig --add wildfly
chkconfig wildfly on
 
  


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
Edit startup file findoctr Linux - Software 5 12-20-2009 05:10 PM
link file to startup ashley75 Linux - General 4 07-18-2005 03:51 PM
Startup File hongman Linux - Newbie 2 03-03-2005 10:32 AM
what is the file of startup on debian? help j.vilon Linux - General 3 09-19-2004 02:17 PM
Startup file Janaka General 2 02-19-2002 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:31 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
Open Source Consulting | Domain Registration