I had the exact same reaction as rolf when I read this as well. And while the command line he gave you isn't technically incorrect, I strongly suggest you read some documentation before copy/pasting commands off the internet.
Especially, when they start with a sudo.
The Ubuntu community has a great documentation for you to read:
Notes
In order to understand the docs I'm linking to, here's something you should know.
The very large majority of Unix systems available use a model called
init to define how to run services at boot time. This method is sometimes referred to as "System V init" because it was introduced with a very old (and very successful) version of Unix called
System V.
There are a lot of efforts made to up modernize this system, especially in the Linux world. Most notable efforts:
- Upstart: developed by Canonical and in use in Ubuntu since version 6.10
- systemd: developed by a Red Hat employee and enabled by default in Fedora since version 15. It's gaining a lot of momentum now, especially in the Arch Linux community.
Very important
If you installed Apache normally via the package manager (apt) then it should take care automatically of the upstart scripts, and it should be launched at bootup by default. If it doesn't it means that something went wrong during the installation process.
I
strongly suggest you read the doc and diagnose correctly what the problem is and what went wrong. Always understand what the problem is, before copy/pasting commands and hoping they'll magically fix it.
This is the best piece of advice you'll ever get.