How to install Laravel 5.2

I install Laravel Wednesday in the directory /var/html/www , using the command

 php composer.phar global require "laravel/installer" 

It automatically changes the installation directory, a message is displayed:

Changed the current directory to /home/.composer

What is the reason? Do I need to add any other team?

+12
source share
3 answers

This is due to the fact that you have installed the installer with Laravel global , which makes it globally available for all projects and sets it on /home/.composer .

It should be all right, because it is only Laravel installer, rather than the project Laravel Which must be established at a later stage (see. Below), and it should be set in your /var/html/www then.

Run the following command in the /var/html/www to create a new project (not required Laravel installer):

 composer create-project --prefer-dist laravel/laravel YourProjectName 5.2 

or use the Laravel installer

 laravel new YourProjectName 

Learn more about how to install Laravel here.

+15
source

Let use

 composer create-project --prefer-dist laravel/laravel project_name "5.2.*" 
0
source

1) change the resolution of your directory to enable CRUD. Open a terminal and paste this command

 sudo chmod -R o+rw /var/html/www 

2) update the package manager cache by doing:

 sudo apt-get update 

3) cd to your directory to check if json composer exists

 cd /var/html/www 

and enter the

 composer 

4) To set a composer in his catalog, run

 curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer 

5) To check if it is running

 composer 

6) Now install laravel 5.2 in your directory (/ var / html / www)

 composer create-project laravel/laravel ProjectName 5.2 --prefer-dist 
-2
source

All Articles