I want to manually install Apache server. I've compiled it into:
/server/apache
http.conf configured correctly. It works. I can open up a browser and navigate to localhost and I can see "It works message".
But how does one goes about adding apache into Ubuntu's startup so I won't have to do:
sudo /server/apache/bin/apachectl start
all the time?
Can somebody explain how does one goes into adding programs to Ubuntu startup (10.10 64 bit)?
RESOLUTION
I learned a lot. It looks like there are 2 ways of doing it:
1) Historical ways: most Unix/Linix distros historically followed System.V initialization patter. This way all u have to do is write a special start/stop/restart script, chmod +x it and put in under /etc/init.d directory. Then you run update-rc.d command which creates links under different runlevels. and that's how it works. la la la
2) New way. Many linux distros currently switching from old runlevel based system to event based initialization. In my case Ubuntu (also RHEL 6.0 and Fedora) uses system called Upstart which eventually will completely replace systemV version. it uses /etc/init folder. All you have to do is create a script, chmod +x it and put it under /etc/init dir. Upstart information
The easiest way would be to put:
into "/etc/rc.local". The better way to do it would be to create an /etc/init/apache.conf upstart script, I believe the correct values would be something along the lines of:
Then run "initctl start apache" to start it and "initctl stop apache" to stop it. For more information on upstart configuration files like the above, see "man 5 init".
This will use the default run levels that the script provides, which includes starting it up and shutting it down. update-rc.d is the standard for manipulating services on Debian-based systems. Good luck!
Andrew
Here is a link that contains an init script..
It will need to be modified to your custom compile..
but it should work :D
http://ubuntuforums.org/showthread.php?t=1499535