LAMP stands for:
• Linux
• Apache
• MySQL
• P (can mean PHP or PERL)
Looking for a powerful and reliable web server solution that is cheap (Free) as well?
LAMP servers are an outstanding choice for your web servers’ needs.
What it will take to get your
LAMP web server up and running will be less time and effort than you would think so lets get started!
Got a VM? Old PC or server lying around?
A
LAMP web server can be installed on virtually any lower-end hardware and still serve as a fairly powerful server.
Of course if you will need to gauge the hardware specs around your expected traffic.
Moreover, if you currently have a virtualization platform (
Vmware, Xen, Hyper-V, etc), this would be a great time to whip up a small and scalable virtual machine to suit the requirement!
If you are in a rush, like most of us in IT are, you can install a full
LAMP server on a Ubuntu server install with a single command:
sudo tasksel
You will need to select
LAMP from the list and you will be prompted for a "MySQL" password.
Pretty easy eh?
If you are one of those guys or gals who like to have more of a command and control feeling to their install, you can accomplish that with the following method. ~
There are two ways to install a
LAMP. One is from the command line and the other is using the
tasksel tool.
The “L”
Decide what flavor Linux distribution you prefer and install the OS.
I generally use Ubuntu server, and will be giving instruction based on that.
Once installed you are ready to install your Apache server.
The “A”
Apache is easy to install.
Log in to your console or open up a terminal window and enter the following command:
sudo apt-get install apache2
Enter your
sudo user password to complete the installation.
By pointing a web browser to that server IP address, you will be able to ensure your Apache server is up and running.
The “P”
We will choose
PHP for this installation.
To do this we will issue the following command(s) from a console or terminal session:
sudo apt-get install php5 libapache2-mod-php
Restart Apache with the command:
sudo /etc/init.d/apache2 restart
To test your PHP install, create a file in the Apache document root (/var/www) called
installtest.php. The contents of this file will be:
< ?php phpinfo(); ?>
Save that file and then point your browser to http:/
ip address of server/installtest.php
You should see “Test PHP Page” written on your browsers page.
The “M”
Last but not least we will install “
MySQL”.
Issue the command:
sudo apt-get install mysql-server
Set a password for "MySQL" with the command:
mysql -u root
This command will place you in the “MySQL” prompt (mysql> )
From the mysql> prompt type:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('
YOURPASSWORDOFCHOICEENTEREDHERE');
Crank up your “MySQL” server with the command:
/etc/init.d/mysql start
I know... I know LAMP is not spelled LAPM, but whatever...
Whether you chose the quick “one-liner” command or broke it down into the down and dirty component, that’s it, your LAMP server is up and running.
Enjoy!!!!