How to Install LAMP With Apache, MySQL & PHP 5 on Oracle Linux

March 21, 2017 | By the+gnu+linux+evangelist.

LAMP WebServer with PHP 5 Quick Start for OEL

Hello Oracle Linux User! The Tutorial shows you Step-by-Step How to Install Apache, MySQL/MariaDB and PHP 5 on Oracle Enterprise 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 GNU/Linux distributions, and together they make a powerful web application platform.

LAMP PHP 5.6 Installation in Ubuntu 22.04 – Step-by-step
  1. Open a Command Line Terminal Window
    (Press “Enter” to Execute Commands)

    Install LAMP Server with PHP 5 on Oracle Linux - Open Terminal

    In case first see: Terminal QuickStart Guide.

  2. Installing Apache & PHP.

    sudo yum install httpd php php-common
  3. Installing PHP Modules.

    sudo yum install php-pear php-mysqlnd php-gd php-mbstring php-mcrypt php-xml
    
  4. Starting & Possibly Enabling Apache
    On OEL 7.x:

    sudo systemctl start httpd.service

    To Get it Started at boot:

    sudo systemctl enable httpd.service

    Instead, for OEL 6.x:

    sudo service httpd start

    To Get it Started at boot:

    sudo service httpd enable
  5. 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 OEL PHP Info

  6. (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

QuickChic Theme • Powered by WordPress