Install LAMP architecture on Google cloud server on Centos


This tutorial explains how to install LAMP on Google cloud server on Centos Linux version of OS.

  1. Install Apache and PHP:sudo yum check-update
    sudo yum -y install httpd php
  2. Start the Apache service:sudo service httpd start
  3. Optional: Set the Apache service to start automatically:sudo chkconfig httpd on

Install latest version of PHP

sudo yum install epel-release
sudo yum install

Install yum-utils packages too:

$ sudo yum install yum-utils

Enable remi repo, run:

$ sudo yum-config-manager --enable remi-php72
$ sudo yum update

Finally install php 7.2 on CentOS 7.2:

$ sudo yum install php72

Steps to install MySQL on Centos 7

Install MariaDB and related components:

sudo yum -y install httpd mariadb-server php php-mysql

Start the MariaDB service:

sudo systemctl start mariadb

Optional: Set the MariaDB service to start automatically:

sudo systemctl enable mariadb

Configure MySQL

sudo mysql_secure_installation
sudo yum install phpMyAdmin
sudo systemctl restart httpd


Please enter your comment!
Please enter your name here