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

How to install laravel 5.6.16 on centos 7

2644

How to install laravel 5.6.16 on centos 7

Laravel is a powerful MVC-PHP framework, designed for developers who need a simple and elegant toolkit to create full-featured web applications In this guide, we will install Laravel 5.6.16 on CentOS 7

Installation

start with installing apache web server by using the following command

[root@linuxhelp ~]# yum install httpd
Loaded plugins: fastestmirror, langpacks
base                                                                                                      | 3.6 kB  00:00:00     
extras                                                                                                    | 3.4 kB  00:00:00     
updates                                                                                                   | 3.4 kB  00:00:00     
(1/2): extras/7/x86_64/primary_db                                                                         | 185 kB  00:00:00     
(2/2): updates/7/x86_64/primary_db                                                                        | 6.9 MB  00:00:09     
.
.
Installed:
  httpd.x86_64 0:2.4.6-67.el7.centos.6                                                                                           
Dependency Installed:
  apr.x86_64 0:1.4.8-3.el7_4.1          apr-util.x86_64 0:1.5.2-6.el7         httpd-tools.x86_64 0:2.4.6-67.el7.centos.6        
  mailcap.noarch 0:2.1.41-2.el7        

After the installation process, you can use the commands below to start your Apache service and make it run at startup

[root@linuxhelp ~]# systemctl start httpd.service 
[root@linuxhelp ~]# systemctl enable httpd.service 
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

Next, we are going to install php 7.1 It is not provided by the official RHEL repository so you have to add “ Webtatic” repo in order to install it easily.
First, install EPEL repository with the following command

[root@linuxhelp ~]# yum install epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.dhakacom.com
 * extras: mirror.dhakacom.com
 * updates: mirror.dhakacom.com
Resolving Dependencies
-->  Running transaction check
--->  Package epel-release.noarch 0:7-9 will be installed
-->  Finished Dependency Resolution

.
.
Running transaction
  Installing : epel-release-7-9.noarch                                                                                       1/1 
  Verifying  : epel-release-7-9.noarch                                                                                       1/1 

Installed:
  epel-release.noarch 0:7-9                                                                                                      

Complete!

Now you can add the Webtatic repo

[root@linuxhelp ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Retrieving https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
warning: /var/tmp/rpm-tmp.BH9cmU: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:webtatic-release-7-3             ################################# [100%]

execute the command below to easily install PHP 7.1 and the needed extensions

[root@linuxhelp ~]# yum install php71w php71w-common php71w-gd php71w-phar php71w-xml php71w-cli php71w-mbstring php71w-tokenizer php71w-openssl php71w-pdo
Loaded plugins: fastestmirror, langpacks
epel/x86_64/metalink                                                                                      | 7.6 kB  00:00:00     
epel                                                                                                      | 4.7 kB  00:00:00     
webtatic                                                                                                  | 3.6 kB  00:00:00  
.
.
Installed:
  mod_php71w.x86_64 0:7.1.14-1.w7         php71w-cli.x86_64 0:7.1.14-1.w7              php71w-common.x86_64 0:7.1.14-1.w7        
  php71w-gd.x86_64 0:7.1.14-1.w7          php71w-mbstring.x86_64 0:7.1.14-1.w7         php71w-pdo.x86_64 0:7.1.14-1.w7           
  php71w-xml.x86_64 0:7.1.14-1.w7        

Complete!

Verify the php version using the following command

[root@linuxhelp ~]# php -v
PHP 7.1.14 (cli) (built: Feb  4 2018 09:05:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

Download Composer for installing the latest version of Laravel and also we need to get the Composer dependency manager

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

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

Execute the following command to move your Composer binary file to the executable path

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

Now you can run the command below to download and install Laravel directly into your Apache document root

[root@linuxhelp ~]# composer create-project laravel/laravel /var/www/html/laravel
Installing laravel/laravel (v5.6.12)
  - Installing laravel/laravel (v5.6.12): Downloading (100%)         
Created project in /var/www/html/laravel
>  @php -r " file_exists(' .env' ) || copy(' .env.example' , ' .env' ) " 
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 70 installs, 0 updates, 0 removals
.
.
Generating optimized autoload files
>  IlluminateFoundationComposerScripts::postAutoloadDump
>  @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
>  @php artisan key:generate
Application key [base64:La3/wukUecCGrWo466D/vfN0s9nUac9ej1w6qe8aCsA=] set successfully.

we have to Set the correct DocumentRoot so Open the HTTPD global configuration file

[root@linuxhelp ~]# nano /etc/httpd/conf/httpd.conf

Find the line that refers to

DocumentRoot " /var/www/html

And change with the following line

DocumentRoot " /var/www/html/laravel/public" 

Then save and exit. Now Restart Apache to take effect

[root@linuxhelp ~]# systemctl restart httpd

Set the Permissions, execute the following command one by one to set the proper permissions:

[root@linuxhelp ~]# chown -R apache:apache /var/www/html/laravel
[root@linuxhelp ~]# chmod -R 755 /var/www/html/laravel/storage

Now you can open your browser and see navigate to your IP address or your Domain
You should see a similar page that shown below
browser
And you can verify that you installed Laravel 5.5 with the following command

[root@linuxhelp ~]# cd /var/www/html/laravel
[root@linuxhelp laravel]# php artisan -v
Laravel Framework 5.6.16

with this, the method to install laravel 5.6.16 on centos 7 comes to an end.

Tags:
rebeccajazz
Author: 

Comments ( 1 )

scarmelchorgaln
Perfect for me, thank!
Add a comment

Frequently asked questions ( 5 )

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.

Q

How do I log in to my cPanel interface?

A

How do I log in to my cPanel interface?
To log in to your cPanel interface, enter one of the following URLs in your address bar:

http://example.com:2082

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

Does I change the root user’s default shell?

A

cPanel requires the root user to use the bash shell by default. Other users can use shells that are not bash if the system administrator wishes to make this an option.

Q

How do I log in to my cPanel interface with SSL certificate?

A

To log in to your cPanel interface, enter one of the following URLs in your address bar:
for SSL (more security):
https://example.com:2083

Related Tutorials in How to install laravel 5.6.16 on centos 7

Related Tutorials in How to install laravel 5.6.16 on centos 7

How To Install AnyDesk on Centos 7
How To Install AnyDesk on Centos 7
Apr 2, 2018
How to install Tiki Wiki CMS Groupware on CentOS 7
How to install Tiki Wiki CMS Groupware on CentOS 7
May 31, 2018
How to install PHP ImageMagick on CentOS 7
How to install PHP ImageMagick on CentOS 7
Nov 4, 2017
How to Upgrade and Downgrade the PHP Versions on CentOS 7.6
How to Upgrade and Downgrade the PHP Versions on CentOS 7.6
Jun 4, 2019
How to install Apache from Source Code on CentOS 7
How to install Apache from Source Code on CentOS 7
Oct 21, 2017
How to enable or disable repositories in CentOS
How to enable or disable repositories in CentOS
Mar 28, 2018
How to install AWStats on CentOS 7
How to install AWStats on CentOS 7
Dec 8, 2017
How to install Apache JMeter in CentOS 7
How to install Apache JMeter in CentOS 7
Mar 24, 2017

Related Forums in How to install laravel 5.6.16 on centos 7

Related Forums in How to install laravel 5.6.16 on centos 7

CentOS
connor class=
How To Completely Remove Apache package On CentOS 7.6
May 14, 2019
CentOS
ceriaimmaculate class=
setfacl : command not found
Jan 3, 2018
CentOS
mason class=
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
Nov 20, 2018
Linux
andrew class=
laravel.log could not be opened: failed to open stream: Permission denied
Apr 28, 2017
CentOS
landon class=
Command to find SNMP Version
May 28, 2018
CentOS
arjitharon class=
cannot start minio service help
Mar 10, 2018
Apache tomcat
AadrikaAnshu class=
Cannot find ./catalina.sh The file is absent or does not have execute permission This file is needed to run this program
Jun 17, 2019
gitlab
caden class=
Insufficient space in download directory /var/cache/yum/x86_64/6/base/packages
Jul 22, 2019

Related News in How to install laravel 5.6.16 on centos 7

Related News in How to install laravel 5.6.16 on centos 7

750 plus websites exposed due to Laravel debug mode
750 plus websites exposed due to Laravel debug mode
Oct 26, 2019
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 Luk Van De Looverbosch ?
How to create a root ?

Hello,
How to create root@linuxhelp in Linux Mint 20.1 64-bit ?
Thanks in advance for your reply.
Best regards.

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.