LinuxQuestions.org
Help answer threads with 0 replies.
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 08-17-2003, 04:55 AM   #1
Cafrow
Member
 
Registered: Aug 2003
Location: Mesa, AZ
Distribution: Redhat 9
Posts: 45

Rep: Reputation: 15
Start Program Script


I have Apache and MySQL isntalled on my computer, i to write a small script that will let me start them, I know the bash commands, I just need to know what to write them in, what is the best way to do it, i just want to be able to click or execute a file and have that file start the 2 servers
 
Old 08-17-2003, 05:26 AM   #2
davee
Member
 
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 263

Rep: Reputation: 30
You've several ways of doing this.

The simplest is, as you say, create a small bash script. Create a file with a text editor. Line one should read:

#!/bin/bash

...then follow it with the two commands you need to run. (with absolute paths)

Save the file. Then:

chmod 755 <filename>

to make it executable. Save (or link) it somewhere in your path and run as necessary.

You may want to create another script to shut the services down.

There are, however, better ways to run apache, and presumably mysql. Check this site or the jakarta site for details/tutorials.

Dave
 
  


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
How do I automatically start a program at start up? victordh Linux - General 7 10-27-2013 07:02 AM
need a perl script to stop & start program cccc Programming 43 07-23-2005 08:27 PM
How to start a Tcl/Tk script by simply invoking the script file itself ? cyu021 Programming 2 10-10-2004 12:00 PM
Start program hylke Linux - Newbie 6 08-03-2004 12:45 PM
start program script when rebooting KaktusKnight Linux - General 4 05-22-2003 01:29 PM


All times are GMT -5. The time now is 04:30 AM.

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