• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install LAMP on oracle Linux

  • 00:36 lsb_release -a
  • 00:58 yum install httpd httpd-tools
  • 01:43 systemctl start httpd
  • 02:04 systemctl enable httpd
  • 02:23 systemctl status httpd
  • 02:32 httpd -v
  • 02:53 yum install mariadb-server mariadb
  • 03:23 systemctl start mariadb
  • 03:55 systemctl enable mariadb
  • 04:07 systemctl status mariadb
  • 04:28 mysql_secure_installation
  • 05:29 yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
  • 05:42 yum install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
  • 05:56 yum module list php
  • 06:45 yum module enable php:remi-7.4
  • 07:56 yum install php php-opcache php-gd php-curl php-mysqlnd
  • 09:26 php -v
  • 09:42 systemctl start php-fpm
  • 10:01 systemctl enable php-fpm
  • 10:23 systemctl status php-fpm
  • 10:43 vi /var/www/html/info.php
  • 11:31 systemctl restart httpd
{{postValue.id}}

To Install LAMP On Oracle Linux

Introduction:

LAMP is a set of open source software, used to build web servers and web application development.

• L = Linux Operating System

• A = Apache HTTP Server

• M = MySQL database management system

• P = Php programming language

Installation Steps:

Step 1: check the OS version by using the below command

[root@linuxhelp ~]# cat /etc/os-release 
NAME="Oracle Linux Server"
VERSION="8.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.4"

Step 2: Install http web server by using the below command

[root@linuxhelp ~]# yum install httpd httpd-tools
Package                       Architecture      Version                                                 Repository                    Size
Installing:
 httpd                         x86_64            2.4.37-43.0.1.module+el8.5.0+20426+404a9eb9             ol8_appstream                1.4 M
 httpd-tools                   x86_64            2.4.37-43.0.1.module+el8.5.0+20426+404a9eb9             ol8_appstream                107 k
 oracle-logos-httpd            noarch            84.5-1.0.1.el8                                          ol8_baseos_latest             29 k
Enabling module streams:
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.

  Installing       : httpd-tools-2.4.37- 
  Installing       : httpd-2.4.37-43.0.1.module+el8.5.0+20426+404a9eb9.x86_64                                                           7/7 
  Verifying        : httpd-tools-2.4.37-43.0.1.module+el8.5.0+20426+404a9eb9.x86_64                                                     
Complete!

Step 3: Start the http server by using the below command

[root@linuxhelp ~]# systemctl start httpd

Step 4: Enable the Http service by using the below command

[root@linuxhelp ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
Step 5 : check the status of httpd service
 [root@linuxhelp ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2021-11-26 08:36:27 IST; 30s ago
     Docs: man:httpd.service(8)
 Main PID: 14474 (httpd)
   Status: "Running, listening on: port 80"
    Tasks: 213 (limit: 10509)

Step 5: Check the version of http by using the below command

[root@linuxhelp ~]# httpd -v
Server version: Apache/2.4.37 (Oracle Linux)
Server built:   Nov 17 2021 13:40:38

Step 6: Install the database by using the below command

[root@linuxhelp ~]# yum install mariadb-server mariadb
Last metadata expiration check: 0:06:35 ago on Friday 26 November 2021 08:31:22 AM IST.
Dependencies resolved.
Package                              Architecture     Version                                                Repository               Size
============================================================================================================================================


Installing:
 mariadb                              x86_64           3:10.3.28-1.module+el8.3.0+20131+15c9d707              ol8_appstream           6.0 M
 mariadb-server                       x86_64           3:10.3.28-1.module+el8.3.0+20131+15c9d707              ol8_appstream            16 M
Running transaction test
Transaction test succeeded.
  Installing       : mariadb-server-3:10.3.28-
1/6 
Installed:
  mariadb-3:10.3.28-1.module+el8.3.0+20131+15c9d707.x86_64             mariadb-common-3:10.3.28-1.module+el8.3.0+20131+15c9d707.x86_64     
Complete!

Step 7: Start the database service by using the below command

[root@linuxhelp ~]# systemctl start mariadb 

Step 8: Enable the database service by using the below command

[root@linuxhelp ~]# systemctl enable mariadb
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.

Step 9: Check the status of MariaDB service by using the below command

[root@linuxhelp ~]# systemctl status mariadb
● mariadb.service - MariaDB 10.3 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2021-11-26 08:38:55 IST; 30s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 33951 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 30 (limit: 10509)
   Memory: 195.9M
   CGroup: /system.slice/mariadb.service
           └─33951 /usr/libexec/mysqld --basedir=/usr

Step 10: configure the database by using the below command

[root@linuxhelp ~]# mysql_secure_installation 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): 
OK, successfully used password, moving on...
Thanks for using MariaDB!

Step 11: Install epel repository by using the below command

[root@linuxhelp ~]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Last metadata expiration check: 0:59:35 ago on Friday 26 November 2021 08:31:22 AM IST.
epel-release-latest-8.noarch.rpm                                                                             17 
 Package                            Architecture                 Version                           Repository                          Size
===============================================================================================================================
Installing:
 epel-release                       noarch                       8-13.el8                          @commandline                        23 k
Running transaction

Step 12: Install remi repository by using the below command

[root@linuxhelp ~]# yum install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                      655 kB/s | 958 kB     00:01    
Dependencies resolved.
Installing:
 remi-release                             noarch                 8.5-1.el8.remi                     @commandline                       26 k
 yum-utils                                noarch                 4.0.21-3.0.1.el8                   ol8_baseos_latest                  72 k

Step 13 : Check the available php modules by using the below command

[root@linuxhelp ~]# yum module list php
Remi's Modular repository for Enterprise Linux 8 - x86_64                                                   585  B/s | 858  B     00:01    
Remi's Modular repository for Enterprise Linux 8 - x86_64                                                   3.0 MB/s | 3.1 kB     00:00    
Last metadata expiration check: 0:00:01 ago on Friday 26 November 2021 09:35:06 AM IST.
Oracle Linux 8 Application Stream (x86_64)
Name                     Stream                      Profiles                                      Summary                                  
php                      7.2 [d]                     common [d], devel, minimal                    PHP scripting language                   
php                      7.3                         common [d], devel, minimal                    PHP scripting language                   
php                      7.4                         common [d], devel, minimal                    PHP scripting language                   

Remi's Modular repository for Enterprise Linux 8 - x86_64

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Step 14 : Enable the particular php module by using the below command

[root@linuxhelp ~]# yum module enable php:remi-8.0
Last metadata expiration check: 0:37:22 ago on Friday 26 November 2021 09:35:06 AM IST.
Dependencies resolved.
Enabling module streams:
 php                                                              remi-8.0                                                                 

Is this ok [y/N]: y
Complete!

Step 15: Install PHP by using the below command

[root@linuxhelp ~]# yum install php php-opcache php-gd php-curl php-mysqlnd
Last metadata expiration check: 0:40:10 ago on Friday 26 November 2021 09:35:06 AM IST.
Package                      Architecture       Version                                                    Repository                 Size



Installing:
 php                          x86_64             8.0.13-1.el8.remi                                          remi-modular              1.6 M
 php-common                   x86_64             8.0.13-1.el8.remi                                          remi-modular              1.2 M
 php-gd                       x86_64             8.0.13-1.el8.remi                                          remi-modular              102 k
 php-mysqlnd                  x86_64             8.0.13-1.el8.remi                                          remi-modular              262 k
php-xml                      x86_64             8.0.13-1.el8.remi                                          remi-modular              239 k
Enabling module streams:
 nginx                                           1.14                                                                                      
Install  14 Packages
Is this ok [y/N]: y
Downloading Packages.

Step 16: Check the PHP version by using the below command

[root@linuxhelp ~]# php -v
PHP 8.0.13 (cli) (built: Nov 16 2021 18:07:21) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.13, Copyright (c), by Zend Technologies

Step 17: Start the PHP service by using the below command

[root@linuxhelp ~]# systemctl start php-fpm

Step 18: Enable the PHP service by using the below command

[root@linuxhelp ~]# systemctl enable php-fpm
Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service.

Step 19 : Check the status of PHP by using the below command

[root@linuxhelp ~]# systemctl status php-fpm
● php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2021-11-26 10:16:48 IST; 36s ago
 Main PID: 38458 (php-fpm)
   Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec"
    Tasks: 6 (limit: 10509)

   Memory: 12.0M
   CGroup: /system.slice/php-fpm.service
           ├─38458 php-fpm: master process (/etc/php-fpm.conf)
           ├─38459 php-fpm: pool www
           ├─38460 php-fpm: pool www
           ├─38461 php-fpm: pool www
           ├─38462 php-fpm: pool www
           └─38463 php-fpm: pool www

Step 20: Edit the info.php file by using the below command

[root@linuxhelp ~]# vim /var/www/html/info.php
<?
Phpinfo ();
?>

Step 21: Restart the httpd service by using the below command

[root@linuxhelp ~]# systemctl restart httpd

Step 22: Switch to your browser and enter your domain name the apache test page as shown in the below image snap 1

Step 23: This is the PHP and its information page snap 2

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to install LAMP on Oracle Linux. Your feedback is much welcome.

Tags:
yousuf
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

LAMP is open source or paid?

A

LAMP is completely open source.

Q

In the word LAMP letter p denotes?

A

PHP/Perl/Python

Q

What is the role of apache in LAMP?

A

The role of LAMP's web server has been traditionally supplied by Apache and has since included other web servers such as Nginx.

Q

What are the frameworks supported by LAMP?

A

with sufficient capabilities to host a variety of web frameworks, such as Joomla, WordPress and Drupal.

Q

Difference Between WAMP VS XAMP?

A

The only difference between these two is that WAMP is used for Windows, while LAMP – is for Linux-based operating systems

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Isaac ?
How to run windows application in linux

I need to run the windows application in my Linux machine, instead of installing from yum repo or any other repos. How to do that..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.