Javatpoint Logo
Javatpoint Logo

How to Install Laravel on CentOS

Laravel is a free and open source web framework written in PHP. It is created by Taylor Otwell. It follows MVC development approach. As of March, 2015, Laravel is regarded as one of the most popular PHP based framework. It provides advanced alternative to CodeIgniter which is not intended to built-in user authorization. In this tutorial, we will install Laravel on CentOS.

Introduction

Prerequisites

  • CentOS 7
  • Login as an administrator on terminal

Installation

Installation includes following steps.

1. Verify Composer

composer on the terminal to check whether composer is globally installed on the system or not.

CentOS How to Install Laravel on CentOS

2. Install Laravel

Execute the following command to install Laravel by using composer.

CentOS How to Install Laravel on CentOS 1

3. Edit bash profile

Open .bashrc in VI editor and add the following line to the file.

export PATH="/opt/lampp/php/composer/vendor/bin:$PATH"

Then execute the following command to source .bashrc file

4.Create new Application

Execute the following command to create new application named as mylaravel in my case.

CentOS How to Install Laravel on CentOS 2

Now, the Application is ready. We can now build something amazing.

CentOS How to Install Laravel on CentOS 3

5. Start Laravel server

Laravel uses its own development server which can be started by using a simple command. First, we have to change the current working directory by typing cd mylaravel on the terminal and then execute the following command.

CentOS How to Install Laravel on CentOS 4

6. Access on Browser

Just type localhost:8000 in the browser's search bar to access Laravel on browser.

CentOS How to Install Laravel on CentOS 5

Hence, we have installed and get started with Laravel.


Next TopicInstall CakePHP





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA