• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
seegatesite header

Seegatesite.com

Seegatesite.com - Programming Tutorial , Sharing , How and Learn Together

  • TOOLS
    • Bootstrap Navbar Online Generator
    • Customize Sidebar Menu Bootstrap 3
    • Bootstrap Demo
  • ADVERTISE
  • CATEGORIES
    • Android
    • Blogging Tips
    • Database
    • CSS
    • Info Gadget
    • Javascript
    • Linux
    • PHP
    • Various
    • WordPress
  • Q&A
  • PHP
  • JAVASCRIPT
  • JQUERY
  • ANGULAR
  • WORDPRESS
  • SEO
  • REACT
🏠 » PHP » Step by Step Installation Laravel 5 On Ubuntu for Beginners

Step by Step Installation Laravel 5 On Ubuntu for Beginners

By Sigit Prasetya Nugroho ∙ March 19, 2016 ∙ PHP ∙ 1 Comment

Share : TwitterFacebookTelegramWhatsapp

Seegatesite.com – Laravel is different from other PHP framework, where you can download the master file fully and placed on your web server. Laravel has a dependence on some PHP library, where the library isn’t included in the laravel’s source. So we need to download the library separately.

Is laravel installation complicated ??

In my opinion, extremely complicated. This might be the first PHP framework I am trying to learn. Probably for those professionals who familiar with composer, lavarel installation becomes very easy. One of the interesting things of the laravel framework is about Composer. The whole requirement done by the composer, so any dependency with other libraries can be resolved by the composer. In other words, we don’t need to download one by one libraries needed by laravel. The principle is similar to apt-get in linux or NPM in nodejs. Because Composer is cool stuff, then there is no harm in us to install it first.

This article discusses how to install laravel on the ubuntu operating system, for Windows’s users, there could be some similarities, because using the composer.

Related Articles :

  • Login Page – Tutorial CRUD Client and API Server Using JQuery And Lumen Part 2
  • Tutorial CRUD Client and API Server Using JQuery And Lumen Part 1
  • How To Solve Problems Illegal mix of collations (latin1_swedish_ci,IMPLICIT) In Laravel

Table of Contents

  • 1 How to install laravel 5 on ubuntu for beginners
    • 1.1 Install the composer on ubuntu / linux
    • 1.2 Installation laravel 5
    • 1.3 Thus article step by step installation laravel 5 on Ubuntu for beginners, hope useful

How to install laravel 5 on ubuntu for beginners

In laravel official site has been described in detail how to install laravel 5 step by step. But still some starters like me failed to do the installation. Here are the steps :

Laravel need requirement as follows

  • PHP >= 5.5.9
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension

Make sure you have fulfilled the above request

Install the composer on ubuntu / linux

How to install the composer on linux easy enough. According getcomposer.com run the following script on the terminal ubuntu

1
2
3
4
5
6
7
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
 
php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '41e71d86b40f28e771d4bb662b997f79625196afcca95a5abf44391188c695c6c1456e16154c75a211d238cc3bc5cb47') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
 
php composer-setup.php
 
php -r "unlink('composer-setup.php');"

We will get composer.phar file in the directory where we run the script above

Please check with the command “php composer.phar” on terminal, if it looks like the image below, you have successfully perform the installation composer on ubuntu

How To Install Composer On Ubuntu Step By Step Install Laravel 5 On Ubuntu

So that we can use composer in any folder , please move the composer.phar to /usr/local/bin/composer

mv composer.phar /usr/local/bin/composer

For windows’s users please use the following links https://getcomposer.org/doc/00-intro.md#installation-windows

Installation laravel 5

Please go to the web server folder ( cd /var/www/html/ ). Then run the following script to download laravel by composer

composer create-project laravel/laravel {directory} "~5.0.0" --prefer-dist

or

composer create-project laravel/laravel laravelApp "~5.0.0" --prefer-dist

Install Laravel 5 On Ubuntu Machine

Wait composer download files until completion. Then type ls on ubuntu terminal, you will find laravelApp folder that contains the complete file.

Then go to the laravelApp folder and run the command “composer update” to perform the update dependencies on laravel. But when doing the composer update, I had an error like below

- laravel/framework v5.0.9 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.

Laravel Framework V5.0.9 Requires Ext Mcrypt

Don’t worry, you only need to install the ext-mcrypt on your php server. Here are the steps to install ext-mcrypt on php ubuntu :

sudo apt-get install mcrypt php5-mcrypt
sudo php5enmod mcrypt
sudo service apache2 restart

If you’re windows user, i found link that can help you to resolve ext-mcrypt problems http://www.kvcodes.com/2014/07/laravel-requires-mcrypt-php-extension/

Do the composer update again

composer update

Composer Update Step By Step Installation Laravel 5 On Ubuntu For Beginners

Installation laravel 5 has finished, please check on your browser http://localhost/laravelApp/public/

Check what happened? you will only be given a white screen on your browser. In order to run normally, we have to change the file permissions on the storage’s folder with code below

chmod -R o+w storage/

Change Permission Storage Folder On Laravel Step By Step Installation Laravel 5 On Ubuntu For Beginners

Check again on your browser and voila, You have successfully installed laravel 5 on your machine

Step By Step Installation Laravel 5 On Ubuntu For Beginners

Until this point we have managed to install laravel 5. Here are some of errors that occur when you install laravel 5, may be able to help solve your problem.

1. No folders vendor on laravel application

Laravel Installation Error Step By Step Installation Laravel 5 On Ubuntu For Beginners

1
2
3
4
5
6
7
8
9
10
11
PHP Warning: require(/var/www/html/laravelApp/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/laravelApp/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required '/var/www/html/laravelApp/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/laravelApp/bootstrap/autoload.php on line 17
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
 
[RuntimeException]
Error Output: PHP Warning: require(/var/www/html/laravelApp/bootstrap/../v
endor/autoload.php): failed to open stream: No such file or directory in /v
ar/www/html/laravelApp/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required '/var/www/html/laravel
App/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/
share/pear') in /var/www/html/laravelApp/bootstrap/autoload.php on line 17

Solutions :

Please check the vendor’s folder in the ~/.composer/ and then copy the vendor’s folder to your application folder

Laravel Error Installation Vendor Folder Not Found

If no vendor’s folder in ~/.composer please run the following code at the terminal

composer global require "laravel/installer"

2. Error call to undefined method illuminate\Foundation\application::getCachedCompilePath().

Error Call To Undefined Method Illuminate Foundation Application GetCachedCompilePath Error Install Laravel 5

Solution :

Delete the vendor/compiled.php and run composer update again. Or also delete the storage/framework/compiled.php.

Hopefully the above tutorial can help you.

Thus article step by step installation laravel 5 on Ubuntu for beginners, hope useful

Another PHP Related Post :

  • Tutorial Create Simple POS Using ReactJS And Laravel Lumen Part 1
  • How To Replace String With Another String In PHP
  • Login Page – Tutorial CRUD Client and API Server Using JQuery And Lumen Part 2
  • Tutorial CRUD Client and API Server Using JQuery And Lumen Part 1
  • How To Solve Problems Illegal mix of collations (latin1_swedish_ci,IMPLICIT) In Laravel
  • How To Resolve No ‘Access-Control-Allow-Origin’ Header In Lumen

Avatar for Sigit Prasetya Nugroho

About Sigit Prasetya Nugroho

This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Reader Interactions

Comments

  1. Avatar for mgmg says

    March 21, 2016 at 12:12 am

    Holy cow dude, I want to kiss you! Thanks for this awesome guide!

    Something that I (A complete apache buffoon) ran into was this:
    The folder name in the /var/www/your_folder_name had to be /var/www/html to work. (Yeah, I know, I should configure apache) .

    Again, Many thanks!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Welcome to my Home,

Avatar for mgThis site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.



Popular Articles

Checked checkbox AdminLTE Bootstrap in Jquery

November 4, 2014 By Sigit Prasetya Nugroho 7 Comments

Simple create date format validation with jqueryUI

December 21, 2014 By Sigit Prasetya Nugroho Leave a Comment

Create Simple Progress Bar for Fake Online Generator with Jquery

January 10, 2015 By Sigit Prasetya Nugroho Leave a Comment

22+ Coolest Free Jquery Plugin For Premium Theme

October 3, 2015 By Sigit Prasetya Nugroho Leave a Comment

Easy Build Your Anti Copy Paste Plugin

October 6, 2015 By Sigit Prasetya Nugroho Leave a Comment

Popular Tags

adminlte (15) adsense (13) adsense tips (4) affiliate amazon (13) amazon (12) Android (8) angular (16) angular 4 (12) angular 5 (4) asin grabber (3) Bootstrap (27) codeigniter (5) create wordpress theme (5) crud (8) css (6) free wordpress theme (7) google adsense (4) imacros (4) increase traffic (6) jquery (34) laravel (10) laravel 5 (5) learn android (5) lumen api (4) modal dialog (5) mysql (6) nodeJs (4) optimize seo (4) pdo (6) php (30) plugin (53) pos (8) Publisher Tips (5) react (6) Reactjs (9) SEO (37) theme (17) tutorial angular (5) tutorial angular 4 (6) tutorial javascript (10) tutorial javascript beginners (4) twitter (3) wordpress (18) wordpress plugin (13) XMLRPC (5)




  • About
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions

©2022 Seegatesite.com