How to Install Apache, PHP and MySQL (LAMP) on CentOS 7


How to Install Apache, PHP and MySQL (LAMP) on CentOS 7 – This tutorial shows how to install Apache on CentOS 4.3 server with PHP5 support (mod_php) and MySQL support. LAMP stands for Linux, Apache, MySQL, PHP (LAMP).

LAMP server is a set of Open Source software to create a web Server that consists of: 1. Linux: the operating system 2. Apache: Server 3. MySQL: Database 4. Programming language: PHP Linux Linux operating system provides a platform for safe and reliable operation of the web server. Access to the system files is governed by the access rights of files and is enforced by the operating system. The operating system also provides interfaces to the network and implement security and user processes.

Simple steps How to Install Apache, PHP and MySQL (LAMP) on VPS Linux Centos 7 (32/64 bit):

  1. First, we here will add the EPEL-7 repo to install latest phpMyAdmin with the command as follows:

# rpm -ivh

2. Installing MySQL 5, to install MySQL, MariaDB installations we do like this:

# yum -y install mariadb-server mariadb

Set a password for the MySQL root account:

# mysql_secure_installation

3. Installing Apache2. Directly available as apache2 package CentOS 4.3, therefore we can directly install it like this:

# yum -y install httpd

4. The installation of PHP5, we can install PHP5 and Apache PHP5 module as follows:

# yum -y install php

and restart Apache:

# systemctl restart httpd.service

5. Get MySQL Support In PHP5. To get MySQL support in PHP, we can install the php-mysql package. This is a good idea to install some other PHP5 modules as well as you might need it for your application. You can search for modules available such as PHP5:

# yum search php

# yum -y install php-mysql

# yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel

# systemctl restart httpd.service

6. Installation of phpMyAdmin. phpMyAdmin is a web interface where you can manage your MySQL database. phpMyAdmin can now be installed as follows:

# yum install phpMyAdmin

7. Done….



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