CentOS Tutorial – This tutorial will guide you how to install LAMP Stack on CentOS 7.3 server. As you know LAMP is a collaboration between Linux, Apache, MySQL and PHP that provide a reliable web server to host your websites and also web applications. We also provide a video on each steps to make it easier for you.
- CentOS 7.3
- Kernel 3.10.0-514.16.1.el7.x86_64
- Dual core CPU
- 1 GHz RAM
Steps to install LAMP Stack on CentOS 7.3
Step 1. Update System
As always, make sure our system is up to date.
Step 2. Install Apache Web Server
Use this command to install Apache web server on CentOS 7.3.
yum install httpd
Next, run the httpd service
systemctl start httpd systemctl enable httpd
Now open a web browser and type the server IP address and make sure it show something like in the video below.
At this point, our Apache web server is ready.
Step 3. Install MySQL (Mariadb Server)
Now we will install MySQL or Mariadb server. This tutorial will install Mariadb instead of MySQL. MariaDB is a fork of MySQL and has the same functionality as MySQL Server. Use this command to install it
yum install mariadb mariadb-server
systemctl start mariadb systemctl enable mariadb
Step 4. Install PHP
Command to install PHP on CentOS 7.3
yum install php php-mysql
Check PHP Version
root@localhost ~]# php --version PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Done. Now we have all LAMP elements installed on CentOS 7.3 Server. We are now ready to deploy some web applications on our CentOS 7.3 Server.