Array

Linux Apache MySql PHP – LAMP Install Guide

Installing LAMP is very simple. If you are using putty to SSH into a server or VPS you can copy and paste the commands then right click in putty and the command will be put into terminal. The following code was used to install LAMP on CentOS but the commands should be the same for most Linux servers by simply replacing yum with.

Install Apache

In terminal type the following to install Apache.

yum install httpd

You will be asked to confirm the install, so enter y to confirm it. Once it’s finished installing you will need to start the server so enter the following to start up apache

service httpd start

Now check to see if apache has started up. Type in the ip or address of the vps and it should display a message. (Either “It WORKS” or some apache branded page.)

Install MYSQL

Same process as before. Install the service and confirm anything it asks.

yum install mysql-server service mysqld start

next you will need to set a root password for the SQL server. You will be asked 4 questions about removing default users, remote access etc. I suggst you answer y to all of them.

/usr/bin/mysql_secure_installation

Install PHP

The final step is to install php. Enter the following command in the terminal to install php.

yum install php php-mysql

Once installed you can check to see if it has installed correctly.

nano /var/www/html/test.php

Add the following lines of code into this file.

<?php
     phpinfo();
?>

Once you have the file saved restart apache so it can pick up everything you have just installed.

service httpd restart

Now open your browser and type in the IP / domain of your server and then the name of the file. eg. “123.123.123.123/test.php”.

Related Articles

Related Questions

Whirlpool Oven F6E6: Appliance Manager 1 Board Communication

I have a brand new Whirlpool oven W11I OM1 4MS2 H or (859991549450). I bought it alongside the microwave combi oven. I have had...

Whats the difference between the Tapo P100 and the P105?

There are a few different Tapo smart plugs. The P100 and P110 differ based on the smart power monitoring feature but where does the...

Time remaining keeps going up on Whirlpool dryer??

I have clothes in the dryer regularly and the time remaining shows on the display. There could be 10 mins remaining and if I...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Tools

Bitrate Converter

Below you will find a bitrate converter. This tool will allow you to enter a bitrate value, in one of many different formats and...

Aesthetic Text Generator

There are various ways to make your social media profile seem more unique, some of which are not as easy to implement as others....

Aspect Ratio Calculator For Images

Aspect ratio is the ratio between the height and width of an image. If you want to resize an image by 100 pixels, you...

Add Text To Image

Use this free tool to add text to an image. Simply select the image file that you want to overlay text onto and you...

JavaScript Multi-line String Builder

Javascript did not always support multi-line strings. If you attempted to create a string variable using quotes, putting a line break into the source...

GUID Generator

GUID generation is relatively simple. It is a system that is used to generate unique values without having to keep track of the IDs...

Latest Posts

Latest Questions