Note: This article is using Ubuntu 14.04 but most will apply to other Linux versions.
So, we have learned how to install packages on Debian Linux and now want to configure mail and websites for this server.
Launch Terminal (Press Ctrl-Alt-T)
#sudo apt-get update
(This updates our local package list)
#sudo apt-get install lamp-server^
(This installs Apache, MySQL and PHP)
(Mind the caret (^) at the end.)
#sudo apt-get install mailutils
(This is for mailx)
#sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default
(This copies the default Apache config file to a new file that will be used by Apache)
By running those 4 commands you have Apache, MySQL, PHP and Mailx installed. To test apache you can open up your web browser and go to http://localhost to see this…
There are more things that go into setting up the mail server if you want to have it reside on the internet. However if you are on a small work network, you can start sending test email immediately by running.
#mail –s “Some Subject” SomeWorkingEmail@Example.com
If you try this above example on a home network, or if you aren’t setup to relay mail on your work network, this test won’t work. There’s a lot more to setting up email but this is the most basic of installs.