{"id":101,"date":"2016-08-09T08:02:37","date_gmt":"2016-08-09T08:02:37","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=101"},"modified":"2016-08-10T04:11:17","modified_gmt":"2016-08-10T04:11:17","slug":"install-laravel-5-on-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/08\/09\/install-laravel-5-on-ubuntu-14-04\/","title":{"rendered":"Install Laravel 5 On Ubuntu 14.04"},"content":{"rendered":"<p>References:<\/p>\n<p>1.\u00a0<a href=\"https:\/\/www.howtoforge.com\/tutorial\/install-laravel-on-ubuntu-for-apache\/\" target=\"_blank\">https:\/\/www.howtoforge.com\/tutorial\/install-laravel-on-ubuntu-for-apache\/<\/a><\/p>\n<p>2.\u00a0<a href=\"https:\/\/laravel.com\/docs\/5.2\" target=\"_blank\">https:\/\/laravel.com\/docs\/5.2<\/a><\/p>\n<p>How to install:<\/p>\n<ol>\n<li>Laravel uses composer much for installation. So first check the composer version (I already installed the composer) through the terminal.\n<pre class=\"lang:default decode:true \" title=\"check composer version\">teddy@teddy-K43SJ:~$ composer --version\r\n<\/pre>\n<p>Here is the result for my system.<\/p>\n<pre class=\"lang:default decode:true\" title=\"composer check\">You are running composer with xdebug enabled. This has a major impact on runtime performance. See https:\/\/getcomposer.org\/xdebug\r\nWarning: This development build of composer is over 60 days old. It is recommended to update it by running \"\/usr\/local\/bin\/composer self-update\" to get the latest version.\r\nComposer version 1.0-dev (6eb50623e6e00bac4ed893802836e50b62c83434) 2016-02-08 19:03:10\r\n<\/pre>\n<p><a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/check_composer.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-104\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/check_composer.png\" alt=\"check_composer\" width=\"723\" height=\"166\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/check_composer.png 723w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/check_composer-300x69.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>My composer version is 1.0-dev. It says my composer version is over 60 days old. Let update it.<\/p>\n<pre class=\"lang:default decode:true \" title=\"composer update error\">teddy@teddy-K43SJ:~$ composer self-update<\/pre>\n<p>But the result shows\u00a0complain\u00a0about permission.<\/p>\n<pre class=\"lang:default decode:true \" title=\"composer error\">[ErrorException]                                                             \r\n  rename(\/home\/teddy\/.composer\/cache\/composer-temp.phar,\/usr\/local\/bin\/compos  \r\n  er): Permission denied<\/pre>\n<p><a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/composer_update_error.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-106\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/composer_update_error.png\" alt=\"composer_update_error\" width=\"724\" height=\"267\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/composer_update_error.png 724w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/composer_update_error-300x111.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>Here we need &#8216;sudo&#8217; to update it.<\/p>\n<pre class=\"lang:default decode:true \" title=\"composer update sudo\">teddy@teddy-K43SJ:~$ sudo composer self-update<\/pre>\n<p>Here is the success result.\u00a0<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/composer_update_sudo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-108\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/composer_update_sudo.png\" alt=\"composer_update_sudo\" width=\"719\" height=\"149\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/composer_update_sudo.png 719w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/composer_update_sudo-300x62.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>Okay. Lets check it again. <a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/check_composer2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/check_composer2.png\" alt=\"check_composer2\" width=\"721\" height=\"93\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/check_composer2.png 721w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/check_composer2-300x39.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>My latest composer version is \u00a01.2-dev.<\/li>\n<li>Ready to install Laravel. First I need to go in laravel directory in Documents\/works\/. Then there are two ways\u00a0how to install it. They are &#8216;Laravel Installer&#8217; and &#8216;composer create-project&#8217;. Somehow <a href=\"https:\/\/laravel.com\/docs\/5.2\" target=\"_blank\">Laravel Doc<\/a> mention the installer first. I dont know which one is the best but this QA from <a href=\"http:\/\/stackoverflow.com\/questions\/22944478\/difference-between-require-and-install-vs-create-project-in-composer\" target=\"_blank\">stackoverflow<\/a> can give a perspective. First I used &#8216;composer create-project&#8217; way to create a new project &#8216;mylaravelproject&#8217;. Here is the installation:\n<pre class=\"lang:default decode:true \" title=\"Install Laravel\">teddy@teddy-K43SJ:~$ cd Documents\/works\/laravel\/\r\nteddy@teddy-K43SJ:~\/Documents\/works\/laravel$ composer create-project --prefer-dist laravel\/laravel mylaravelproject\r\nYou are running composer with xdebug enabled. This has a major impact on runtime performance. See https:\/\/getcomposer.org\/xdebug\r\nInstalling laravel\/laravel (v5.2.31)\r\n  - Installing laravel\/laravel (v5.2.31)\r\n    Downloading: 100%         \r\n\r\nCreated project in mylaravelproject\r\n&gt; php -r \"copy('.env.example', '.env');\"\r\nLoading composer repositories with package information\r\nUpdating dependencies (including require-dev)\r\n  - Installing vlucas\/phpdotenv (v2.3.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/polyfill-mbstring (v1.2.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/var-dumper (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/translation (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/routing (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/process (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/polyfill-util (v1.2.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/polyfill-php56 (v1.2.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/http-foundation (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/event-dispatcher (v3.1.3)\r\n    Downloading: 100%         \r\n\r\n  - Installing psr\/log (1.0.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/debug (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/http-kernel (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/finder (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/console (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing swiftmailer\/swiftmailer (v5.4.3)\r\n    Downloading: 100%         \r\n\r\n  - Installing jakub-onderka\/php-console-color (0.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing jakub-onderka\/php-console-highlighter (v0.3.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing dnoegel\/php-xdg-base-dir (0.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing nikic\/php-parser (v2.1.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing psy\/psysh (v0.7.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing paragonie\/random_compat (v1.4.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing nesbot\/carbon (1.21.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing mtdowling\/cron-expression (v1.1.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing monolog\/monolog (1.21.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing league\/flysystem (1.0.26)\r\n    Downloading: 100%         \r\n\r\n  - Installing jeremeamia\/superclosure (2.2.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing doctrine\/inflector (v1.1.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing classpreloader\/classpreloader (3.0.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing laravel\/framework (v5.2.42)\r\n    Downloading: 100%         \r\n\r\n  - Installing fzaninotto\/faker (v1.6.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing hamcrest\/hamcrest-php (v1.2.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing mockery\/mockery (0.9.5)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/yaml (v3.1.3)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/version (1.0.6)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/global-state (1.1.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/recursion-context (1.0.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/exporter (1.2.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/environment (1.3.7)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/diff (1.4.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/comparator (1.2.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing doctrine\/instantiator (1.0.5)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-text-template (1.2.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/phpunit-mock-objects (2.3.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-timer (1.0.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-file-iterator (1.4.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-token-stream (1.4.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-code-coverage (2.2.4)\r\n    Downloading: 100%         \r\n\r\n  - Installing webmozart\/assert (1.0.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpdocumentor\/reflection-common (1.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpdocumentor\/type-resolver (0.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpdocumentor\/reflection-docblock (3.1.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpspec\/prophecy (v1.6.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/phpunit (4.8.27)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/css-selector (v3.0.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/dom-crawler (v3.0.9)\r\n    Downloading: 100%         \r\n\r\nsymfony\/var-dumper suggests installing ext-symfony_debug ()\r\nsymfony\/translation suggests installing symfony\/config ()\r\nsymfony\/routing suggests installing doctrine\/annotations (For using the annotation loader)\r\nsymfony\/routing suggests installing symfony\/config (For using the all-in-one router or any loader)\r\nsymfony\/routing suggests installing symfony\/dependency-injection (For loading routes from a service)\r\nsymfony\/routing suggests installing symfony\/expression-language (For using expression matching)\r\nsymfony\/event-dispatcher suggests installing symfony\/dependency-injection ()\r\nsymfony\/http-kernel suggests installing symfony\/browser-kit ()\r\nsymfony\/http-kernel suggests installing symfony\/class-loader ()\r\nsymfony\/http-kernel suggests installing symfony\/config ()\r\nsymfony\/http-kernel suggests installing symfony\/dependency-injection ()\r\npsy\/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)\r\nparagonie\/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)\r\nmonolog\/monolog suggests installing aws\/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)\r\nmonolog\/monolog suggests installing doctrine\/couchdb (Allow sending log messages to a CouchDB server)\r\nmonolog\/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))\r\nmonolog\/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)\r\nmonolog\/monolog suggests installing graylog2\/gelf-php (Allow sending log messages to a GrayLog2 server)\r\nmonolog\/monolog suggests installing mongodb\/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)\r\nmonolog\/monolog suggests installing php-amqplib\/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)\r\nmonolog\/monolog suggests installing php-console\/php-console (Allow sending log messages to Google Chrome)\r\nmonolog\/monolog suggests installing rollbar\/rollbar (Allow sending log messages to Rollbar)\r\nmonolog\/monolog suggests installing ruflin\/elastica (Allow sending log messages to an Elastic Search server)\r\nmonolog\/monolog suggests installing sentry\/sentry (Allow sending log messages to a Sentry server)\r\nleague\/flysystem suggests installing league\/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)\r\nleague\/flysystem suggests installing league\/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)\r\nleague\/flysystem suggests installing league\/flysystem-azure (Allows you to use Windows Azure Blob storage)\r\nleague\/flysystem suggests installing league\/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)\r\nleague\/flysystem suggests installing league\/flysystem-copy (Allows you to use Copy.com storage)\r\nleague\/flysystem suggests installing league\/flysystem-dropbox (Allows you to use Dropbox storage)\r\nleague\/flysystem suggests installing league\/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)\r\nleague\/flysystem suggests installing league\/flysystem-rackspace (Allows you to use Rackspace Cloud Files)\r\nleague\/flysystem suggests installing league\/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)\r\nleague\/flysystem suggests installing league\/flysystem-webdav (Allows you to use WebDAV storage)\r\nleague\/flysystem suggests installing league\/flysystem-ziparchive (Allows you to use ZipArchive adapter)\r\nlaravel\/framework suggests installing aws\/aws-sdk-php (Required to use the SQS queue driver and SES mail driver (~3.0).)\r\nlaravel\/framework suggests installing doctrine\/dbal (Required to rename columns and drop SQLite columns (~2.4).)\r\nlaravel\/framework suggests installing guzzlehttp\/guzzle (Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).)\r\nlaravel\/framework suggests installing league\/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (~1.0).)\r\nlaravel\/framework suggests installing league\/flysystem-rackspace (Required to use the Flysystem Rackspace driver (~1.0).)\r\nlaravel\/framework suggests installing pda\/pheanstalk (Required to use the beanstalk queue driver (~3.0).)\r\nlaravel\/framework suggests installing predis\/predis (Required to use the redis cache and queue drivers (~1.0).)\r\nlaravel\/framework suggests installing pusher\/pusher-php-server (Required to use the Pusher broadcast driver (~2.0).)\r\nlaravel\/framework suggests installing symfony\/psr-http-message-bridge (Required to psr7 bridging features (0.2.*).)\r\nsebastian\/global-state suggests installing ext-uopz (*)\r\nphpunit\/phpunit suggests installing phpunit\/php-invoker (~1.1)\r\nWriting lock file\r\nGenerating autoload files\r\n&gt; Illuminate\\Foundation\\ComposerScripts::postUpdate\r\n&gt; php artisan optimize\r\nGenerating optimized class loader\r\n&gt; php artisan key:generate\r\nApplication key [base64:ANAqub0Biko5oe7BYFuleX15JW\/QbYb3lWvFocHvHyU=] set successfully.\r\n<\/pre>\n<p>Here is the files and directories are created. <a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/laravel_files_created.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-111\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/laravel_files_created-1024x272.png\" alt=\"laravel_files_created\" width=\"840\" height=\"223\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/laravel_files_created-1024x272.png 1024w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/laravel_files_created-300x80.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/laravel_files_created-768x204.png 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/laravel_files_created-1200x319.png 1200w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/laravel_files_created.png 1257w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>It seems &#8216;composer create-project&#8217; installation download all the component required to start developing laravel project at one shot! Please see all component in &#8216;vendor&#8217; directory. Before I try to give a shot on this new installation, I need to set some permission on a few directories suggested on the <a href=\"https:\/\/laravel.com\/docs\/5.2\" target=\"_blank\">laravel doc<\/a> like &#8216;storage&#8217; and &#8216;bootstrap\/cache&#8217;.<\/p>\n<pre class=\"lang:default decode:true\" title=\"set permission\">sudo chmod -R 777 storage\r\nsudo chmod -R 777 bootstrap\/cache\/\r\n<\/pre>\n<p><a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/set_permission.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-127\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/set_permission.png\" alt=\"set_permission\" width=\"717\" height=\"94\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/set_permission.png 717w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/set_permission-300x39.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>Now, I am ready to try it on my web browser. Many article suggest to setup a virtual host but I want to test it right away without it. I can <a href=\"http:\/\/stackoverflow.com\/questions\/17210641\/configure-laravel-without-making-virtual-host\" target=\"_blank\">use PHP CLI<\/a> to do that. Here is the command on my linux terminal.<\/p>\n<pre class=\"lang:default decode:true \" title=\"php cli\">php -S localhost:8000 -t public<\/pre>\n<p>PHP CLI is running.<\/p>\n<pre class=\"lang:default decode:true \" title=\"php cli is running\">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/mylaravelproject$ php -S localhost:8000 -t public\r\nPHP 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1 Development Server started at Wed Aug 10 10:01:34 2016\r\nListening on http:\/\/localhost:8000\r\nDocument root is \/home\/teddy\/Documents\/works\/laravel\/mylaravelproject\/public\r\nPress Ctrl-C to quit.\r\n[Wed Aug 10 10:02:03 2016] 127.0.0.1:57295 [200]: \/\r\n[Wed Aug 10 10:02:03 2016] 127.0.0.1:57296 [200]: \/favicon.ico<\/pre>\n<p><a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/php_cli_running.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-128\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/php_cli_running.png\" alt=\"php_cli_running\" width=\"717\" height=\"164\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/php_cli_running.png 717w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/php_cli_running-300x69.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>Open it on the web browser with url:<\/p>\n<pre class=\"lang:default decode:true \" title=\"localhost\">http:\/\/localhost:8000\r\n<\/pre>\n<p>Here is the welcome screen.<\/p>\n<figure id=\"attachment_130\" aria-describedby=\"caption-attachment-130\" style=\"width: 840px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-10-102210.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-130 size-large\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-10-102210-1024x576.png\" alt=\"laravel welcome screen\" width=\"840\" height=\"473\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-10-102210-1024x576.png 1024w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-10-102210-300x169.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-10-102210-768x432.png 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-10-102210-1200x675.png 1200w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/Screenshot-from-2016-08-10-102210.png 1366w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><figcaption id=\"caption-attachment-130\" class=\"wp-caption-text\">laravel welcome screen<\/figcaption><\/figure>\n<p>The another way is to use &#8216;Laravel Installer&#8217;. From <a href=\"http:\/\/stackoverflow.com\/questions\/22944478\/difference-between-require-and-install-vs-create-project-in-composer\" target=\"_blank\">this stackoverflow QA<\/a>, this way seems to download just required &#8216;vendor&#8217; component\/bundle. It may be for the expert level that needed more thought about laravel (CMIIW). I hope I can learn it later.<\/li>\n<li>Setup the virtualhost. after the successful first try, I think it need to setup a virtualhost config so I dont need to run\/stop the PHP CLI on my linux terminal everytime when I want to give it a try. First, I need to create a new apache configuration file. I name it &#8216;mylaravel.conf&#8217;.\n<pre class=\"lang:default decode:true \" title=\"apache config file\">sudo gedit \/etc\/ache2\/sites-available\/mylaravel.conf<\/pre>\n<p><a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/apache_conf_file.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-132\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/apache_conf_file.png\" alt=\"apache_conf_file\" width=\"722\" height=\"60\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/apache_conf_file.png 722w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/apache_conf_file-300x25.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>Here is the file content.<\/p>\n<pre class=\"lang:default decode:true \" title=\"mylaravel.conf\">&lt;VirtualHost *:80&gt;\r\n    ServerName mylaravelproject.dev\r\n    DocumentRoot \/home\/teddy\/Documents\/works\/laravel\/mylaravelproject\/public\r\n\r\n    &lt;Directory \/home\/teddy\/Documents\/works\/laravel\/mylaravelproject&gt;\r\n        AllowOverride All\r\n        Require all granted\r\n    &lt;\/Directory&gt;\r\n\r\n    ErrorLog ${APACHE_LOG_DIR}\/error.log\r\n    CustomLog ${APACHE_LOG_DIR}\/access.log combined\r\n&lt;\/VirtualHost&gt;<\/pre>\n<p>Make sure the &#8216;Document root&#8217; path is written correctly. the entry &#8216;Require all granted&#8217; is required here or I would get an error like this: &#8216;Forbidden You don&#8217;t have permission to access \/ on this server&#8217;. Then I need apache to enable the site and reload it.<\/p>\n<pre class=\"lang:default decode:true \" title=\"enable the site and reload\">sudo a2ensite mylaravel\r\nsudo service apache2 reload<\/pre>\n<p>Here is the process.<\/p>\n<pre class=\"lang:default decode:true \" title=\"enable and reload process\">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/mylaravelproject$ sudo a2ensite mylaravel\r\nEnabling site mylaravel.\r\nTo activate the new configuration, you need to run:\r\n  service apache2 reload\r\nteddy@teddy-K43SJ:~\/Documents\/works\/laravel\/mylaravelproject$ sudo service apache2 reload\r\n * Reloading Apache httpd web server apache2                                     *<\/pre>\n<p>&#8216;mylaravel&#8217; on &#8216;sudo a2ensite mylaravel&#8217; is the config file name without .conf extension. then I need to register the site so I can open it through localhost with this command &#8216;sudo gedit \/etc\/hosts&#8217;.<\/p>\n<pre class=\"lang:default decode:true\" title=\"register in hosts file\">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/mylaravelproject$ sudo gedit \/etc\/hosts<\/pre>\n<p>then add this entry in the &#8216;hosts&#8217; file.<\/p>\n<pre class=\"lang:default decode:true\" title=\"localhost entry\">127.0.0.1\tmylaravelproject.dev<\/pre>\n<p>then restart the apache server &#8216;sudo service apache2 restart&#8217;. Now I can open it through my web browser with this url:\u00a0<a href=\"http:\/\/mylaravelproject.dev\/\" target=\"_blank\">http:\/\/mylaravelproject.dev\/<\/a><\/li>\n<li>The next step is to learn more about laravel like Application Structure, Configuration, Router, etc. This tutorial\u00a0<a href=\"http:\/\/www.tutorialspoint.com\/laravel\/index.htm\" target=\"_blank\">Laravel Tutorial<\/a> and\u00a0<a href=\"http:\/\/id-laravel.com\/\" target=\"_blank\">Belajar Laravel Ala Indonesia<\/a> are worth to be read. I hope I can write my experience on this blog someday.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>References: 1.\u00a0https:\/\/www.howtoforge.com\/tutorial\/install-laravel-on-ubuntu-for-apache\/ 2.\u00a0https:\/\/laravel.com\/docs\/5.2 How to install: Laravel uses composer much for installation. So first check the composer version (I already installed the composer) through the terminal. teddy@teddy-K43SJ:~$ composer &#8211;version Here is the result for my system. You are running composer with xdebug enabled. This has a major impact on runtime performance. See https:\/\/getcomposer.org\/xdebug Warning: This &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/08\/09\/install-laravel-5-on-ubuntu-14-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install Laravel 5 On Ubuntu 14.04&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,13],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-laravel","category-tutorial"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":14,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":2939,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/101\/revisions\/2939"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}