If you are looking for a quick way to install a LAMP (Linux, Apache, MySQL, PHP) stack on an Ubuntu server, this should take care of you:
sudo tasksel install lamp-server
First command installs tasksel… which is a really handy program. From the mouth of the Ubuntu community:
“Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated “task” onto your system.”
In other words, it is really handy…
The next command uses tasksel to launch the installation of the LAMP stack. That’s the “one command” bit. I will assume you are familiar with the installation process for MySQL and Apache. However, I will remind you that you will need to create a mysql root account password and you need to NOT FORGET that password and keep it safe.
The very last command is a little program/script that comes with MySQL and when run it does a few things to help you lock down your fresh install of MySQL. If you set a root account password above you can skip that but you need to probably answer “yes” to everything else the script prompts you for.
Once you are done installing the LAMP stack I would strongly suggest you look into getting your host firewall running with UFW (Uncomplicated FireWall), especially if this is a public server.
Short and sweet! I really just wanted to note the use of TaskSel for myself as I find it the quickest way to get a webserver up and running.