Configure daemon on redhat

How to put the following services on Redhat such that it can start when it first bootup ? Tks

./mysql-proxy --proxy-address=:3306 --proxy-backend-addresses=xxxxxx:3306 --daemon
AXISHKAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
You should always use full paths, add the line into /etc/rc2.d/rc.local
0
AXISHKAuthor Commented:
What file name and extension should I use ? Simply put the whole path and file into that file and that's all ??

Tks
0
arnoldCommented:
Yes.
Rc.local is executed last and terminated first.

It does not include controls as a service would which you can use any of the ones in /etc/init.d as an example.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

AXISHKAuthor Commented:
"It does not include controls as a service would which you can use any of the ones in /etc/init.d as an example."

What does you mean ? It is better to code it in a script similar to another one under /etc/init.d ?

Tks
0
arnoldCommented:
To have control meaning if something is not working do you want the option to be able stop/start (restart).

Yes, a script similar to the ones
Chkonfig settings will control when this one starts and stops such that it will start before any other service/daemon/component that relies on it, and will terminate after those have exited as well.

You can similarly create the functions/parameters for this service that will be loaded during processing.

Not sure why you see a need to proxy MySQL requests when whatever needs access might be better to actual make the direct connections.

The proxy setup presumably is an attempt to code script to always presume the connection and local with the proxy setup directing the requests to the actual MySQL server or servers.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AXISHKAuthor Commented:
Tks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.