Install LAMP on centOS

What is LAMP?

LAMP stands for Linux, Apache, MySQL and PHP.

Once installed you will be able to host your website on the sever you have installed LAMP on.

Step 1: Start by going to your terminal and type the below command.

sudo yum install httpd

You should see the download processing before it asks you if you want to install:

Type “y” and hit Enter.

Step 2: Start your Apache server by typing:

sudo service httpd start

Apache should be installed properly now. To check it, navigate to your IP address in the address bar of your browser. You should see some form of a test page letting you know that Apache has installed properly.

Step 3: Installing MySQL

MySQL is an open source database management system often used to store user data on a web server.

With your terminal still open, type in the following command:

sudo yum install mysql-server

If you are running CentOS 7+, then you’ll need to install MySQL using the following commands:

yum install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server

Once MySQL is installed, start the service using:

sudo service mysqld start

Next you’ll need to set up a root password:

sudo /usr/bin/mysql_secure_installation

When asked for your current root password, leave the field blank and hit Enter. Type “y” and hit Enter again when it asks if you would like to set the root password.

Set the password and be sure to store the password somewhere safe.

Next you will be asked a series of questions. Read through them and determine what you want your answers to be.

Step 4: Installing PHP

PHP is a server-side scripting language designed for web development.

Type the command below to install PHP

sudo yum install php php-mysql

Then follow the prompts to install PHP.

You have now installed LAMP

  • Install LAMP on centOS
  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

Setting up a Name Server for IPv6 rDNS in CentOS

Managing your own IPv6 rDNS is a fairly simple task. After setting up the name server, please...

Reset the Root Password in CentOS

If you have forgotten the root password it is possible to set a new one by interrupting the boot...

How to Install and Configure vsftpd on CentOS 7

FTP (File Transfer Protocol) is one of the most popular methods to upload files to a server....

How to enable EPEL repository?

The EPEL repository is an additional package repository that provides easy access to install...

Find (View) Default Zone for Firewall on CentOS 7

Pre-Flight Check These instructions are intended for finding (viewing) the default zone in...