• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to install Laravel on CentOS Web Panel

2170

To install Laravel on CentOS Web Panel

Laravel is a free and open source PHP framework used for building web content. It is designed for the fastest development of MVC (Model-View-Controller) web applications in PHP. After a great search for the best framework which I can work with, I found laravel to be the best. It is regarded as one of the most popular and secure PHP framework available today. In this article, you will learn about the method to install Laravel In order to install laravel you need to setup LAMP or LEMP stack with php version 7.0 and above.

Installing Laravel

In order to install Laravel, you need to have a composer. So, download the composer by running the following command.

[root@cwp ~]# curl -sS https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading...

Composer (version 1.5.2) successfully installed to: /root/composer.phar
Use it: php composer.phar

Once it is downloaded, you should activate the composer command, so you need to place it into the bin directory. Doing this can make the composer work.

[root@cwp ~]# mv composer.phar /usr/local/bin/composer

You should now move to your document root of your domian where you want to install laravel. Do that with the help of the following command.

[root@cwp ~]# cd /home/laravel/public_html/

Now you shall execute composer command as shown below with any project name. for example " lara"

root@cwp public_html]# composer create-project laravel/laravel lara dev-master --prefer-dist
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Installing laravel/laravel (dev-master 593963979a6b6a27966aef9723b8ff08fb480b87)
- Installing laravel/laravel (dev-master master): Downloading (100%)
Created project in lara
>  @php -r " file_exists(' .env' ) || copy(' .env.example' , ' .env' ) " 
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 68 installs, 0 updates, 0 removals
- Installing hamcrest/hamcrest-php (v2.0.0): Downloading (100%)
- Installing mockery/mockery (1.0): Downloading (100%)
- Installing vlucas/phpdotenv (v2.4.0): Downloading (100%)
- Installing symfony/css-selector (v3.3.13): Downloading (100%)
- Installing tijsverkoyen/css-to-inline-styles (2.2.0): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.6.0): Downloading (100%)
- Installing symfony/var-dumper (v3.3.13): Downloading (100%)
- Installing symfony/routing (v3.3.13): Downloading (100%)
.
.
.
phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.5)
phpunit/phpunit suggests installing phpunit/php-invoker (^1.1)
phpunit/phpunit suggests installing ext-xdebug (*)
Writing lock file
Generating autoload files
>  IlluminateFoundationComposerScripts::postAutoloadDump
>  @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Package manifest generated successfully.
>  @php artisan key:generate
Application key [base64:OSR3DIZa17WwmS2vMEsJTzvfgXPhDypt7WCu5lNUqqA=] set successfully.

Now that laravel is installed on your domain, you can now change user and group ownership of laravel project directory and also set file permission for storage directory

[root@cwp public_html]# chown -R laravel:laravel lara/
[root@cwp public_html]# chmod -R 0777 lara/storage/

After that, you need to configure your Apache VirtualHost for Laravel. So, you need to create then open apache configuration and create entry for laravel domain as follows

[root@cwp public_html]# vim /usr/local/apache/conf/httpd.conf

And make the following modifications to the .conf file.

< VirtualHost *:80> 
Servername laravel.example.com
DocumentRoot /home/laravel/public_html/lara/public
< /VirtualHost> 
< Directory /home/laravel/public_html/lara/public> 
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted
suPHP_UserGroup laravel laravel
< /Directory> 

And finally, restart your Apache service with the help of the following command.

[root@cwp public_html]# systemctl restart httpd

Now, open the browser and type your domian name to access laravel home page.

dashboard

With this, the installation of Laraval comes to an end.

Tags:
gabriel
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

Why the need the Laravel installation on WHM and Cpanel?

A

Laravel is a PHP framework used to develop PHP based applications in Linux systems. Laravel is especially designed for easy development of web applications. It supports multi-platform and all

Q

what is the required php modules?

A

# apt-get install php-cli php-gd php-mbstring php-mcrypt php-zip php-opcache php-xml

Q

The Laravel View is Not Working On Linux Server?

A

go to your server.php, and comment this line : //require_once __DIR__.'/public/index.php'; and make it as require_once __DIR__.'/index.php'; Now your URL should look like www.linuxhelp.com

Q

What are all the requirements for Laravel on Ubuntu?

A

It requires three major Packages. that are

MySQL, Nginx, and PHP

Q

Do I have two domains and two different web hosts on the same cPanel account?

A

No, because the accounts are on different web servers.



You can have multiple domains on one cPanel account if you use addon domains or aliases.

Related Tutorials in How to install Laravel on CentOS Web Panel

Related Tutorials in How to install Laravel on CentOS Web Panel

How to install Laravel on CentOS Web Panel
How to install Laravel on CentOS Web Panel
Nov 30, 2017
How to install Wordpress using CentOS Web Panel
How to install Wordpress using CentOS Web Panel
Aug 7, 2017
How to install Imagemagick in CentOS Web Panel
How to install Imagemagick in CentOS Web Panel
Feb 15, 2017
How to update Apache and suPHP Apache module in CentOS Web Panel.
How to update Apache and suPHP Apache module in CentOS Web Panel.
Feb 13, 2017
How to manage multiple servers using CentOS Web Panel
How to manage multiple servers using CentOS Web Panel
Mar 24, 2016
How to install BigTree CMS on CentOS Web Panel
How to install BigTree CMS on CentOS Web Panel
Aug 24, 2017
How to make basic configuration in CentOS Web Panel
How to make basic configuration in CentOS Web Panel
Feb 4, 2017
How to install CentOS Web Panel in CentOS
How to install CentOS Web Panel in CentOS
Feb 4, 2017

Related Forums in How to install Laravel on CentOS Web Panel

Related Forums in How to install Laravel on CentOS Web Panel

CentOS Web Panel
robert class=
DNS server is not working on Centos Web Panel
Dec 29, 2017
CentOS Web Panel
anettejoseph class=
Centos Web Panel : How to find mysql root password
Jan 30, 2018
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 Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

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.