I installed an Ubuntu Server 14.04 LTS Virtual MAchine on Azure.
I want to set it up as a WebServer with email capabilities, too.
How can I install software packages through the command line? Is there a list of available packages?
Thanks, Yiannis
In this case the apt-get
and apt-cache
commands will be your friends.
First of all, to be sure to have an up-to-date list of software available in the Ubuntu repositories configured on your server, you will to run the sudo apt-get update
command.
If you don't know the exact name of a package, you will have to search for it. For instance, searching for all instance of apache in the list of software, you will do apt-cache search apache
.
When you have identified the name of the package(s) you need, you will do sudo apt-get install <package name>
.
The apt-get
command retrieve the name of all the dependent packages and will install them along with the package you have requested.
There are alternative to apt-get
.
The one I like, is tasksel
. Install it by typing sudo apt-get tasksel
.
tasksel
can be used to install all the packages related to a given functionality. Not only the dependencies, but also nice-to-have tools to create for instance a LAMP server and so on.
sudo tasksel install lamp-server
sudo tasksel install mail-server
will install all the required packages that will create a full-featured mail and LAMP server.