How-to Install LAMP with Apache, MariaDB & PHP 7 on CentOS 6+ Linux

March 20th, 2017 by thelinuxevangelist

LAMP WebServer with PHP 7 QuickStart for CentOS




Hello CentOS User! This Tutorial Shows You Step-by-Step How-to Install Apache, MariaDB and PHP 7 on CentOS 6+ 32/64bit GNU/Linux Desktop/Server.

LAMP has become a de facto Development Standard. Today, the products that make up the LAMP stack are included by default in nearly all Linux distributions, and together they make a powerful web application platform.

Thanks to the new Zend Engine 3.0, your apps see up to 2x Faster performance and 50% better Memory consumption than PHP 5.6, allowing you to serve more concurrent users without adding any hardware. Designed and refactored for today’s workloads, PHP 7 is the ultimate choice for web developers today.

Install LAMP Server with PHP 7 on CentOS Linux - Featured
  1. Open a Shell Terminal emulator window
    (Press “Enter” to Execute Commands)

    Install LAMP Server with PHP 7 on CentOS Linux - Open Terminal

    Or Login into Server Shell.

  2. How-to Install Remi’s Rpm Repos on Red-Hat Linux Based:

    Enabling Remi’s RPM Repos



  3. Installing Apache & PHP 7.1

    sudo yum --enablerepo=remi,remi-php71 install httpd php php-common
  4. Installing PHP Modules

    sudo yum --enablerepo=remi,remi-php71 install \
    php-pear php-mysqlnd php-gd php-mbstring php-mcrypt php-xml
    
  5. Starting & Eventually Enabling Apache
    On CentOS 7.x:

    sudo systemctl start httpd.service

    To Get it Started at boot:

    sudo systemctl enable httpd.service

    Instead for CentOS 6.x:

    sudo service httpd start

    To Get it Started at boot:

    sudo service httpd enable
  6. Testing LAMP Istallation
    Making the Php info File:

    sudo nano /var/www/html/test.php

    Append:

    <?php
       phpinfo();
    

    Ctrl+x to Save & Exit from nano editor :)
    Check on Browser at:
    http://localhost/test.php
    LAMP Installation on CentOS PHP Info

  7. (Optional) To Enable Remote Connections on Server

    sudo nano -w /etc/sysconfig/iptables

    Append:

    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
    

    Reload Firewall Rules with:

    sudo service iptables restart

Thanks to if-not-true-then-false.com

(Visited 8 times, 1 visits today)
Share on Tumblr

Tags: , , , , , , ,


Comments are disabled