Installing Laravel 5 on CentOS - laravel

I'm trying to install larvel 5 on my vps(the os is centos) and when I run the command
php composer.phar create-project laravel/laravel --prefer-dist
I get this result
Installing laravel/laravel (v5.0.22)
- Installing laravel/laravel (v5.0.22)
Loading from cache
then it's stop !

Not sure why your cache is failing, but did you try using source instead of distr?
php composer.phar create-project laravel/laravel --prefer-source

Related

How can I install Laravel 9.4.1 version?

I want to install Laravel 9.4.1 in my system but it is installing 9.3.0 automatically when I write this command:
composer create-project laravel/laravel newproject
I have am using PHP 8.1.6.
You must use the following command:
composer create-project --prefer-dist laravel/laravel:^9.3.8 <your_name_project>
the latest version is 9.3.8
Laravel 9.4.1 version has not been released, so it's wise not to install.
composer create-project laravel/laravel newproject
This command automatically installs a supported project using the Laravel framework, and this command:
composer create-project laravel/laravel:^9.3.8 your-project-name
Installs the 9.3.8 Laravel LTS version.

installation of composer on shared hosting

I have installed composer on shared hosting.
It's successfully installed on my shared hosting.
I have followed this tutorial for installation.
Link :- https://www.globo.tech/learning-center/laravel-under-cpanel/
Screenshot after installation.
I have used below command and it's working fine for me.
php composer.phar
But when I tried to install laravel in my public_html directory using below command,
composer create-project --prefer-dist laravel/laravel borrowpet "5.2.*"
It's not working. It shows composer command not please find below screenshot for error.
Please let me know what I'm missing while installing composer.
Use the command php composer.phar create-project --prefer-dist laravel/laravel borrowpet "5.2.*"
and make sure you execute the command from the directory where compser.phar exists.

Create Laravel project with composer not working

I installed with success composer.phar in my computer but when I try to create a Laravel project with composer I have this error "exportnot open input file: path". Here you can see a print of terminal:
How can I fix it?
Try it like this:
php composer.phar create-project laravel/laravel IsabellProgetto
Try like this:
composer create-project --prefer-dist laravel/laravel your-project-name "5.2.*"
composer create-project laravel/laravel newproject

How to install Laravel 4 using composer

When laravel 5 is not yet released, I install Laravel 4 using this command composer create-project laravel/laravel your-project-name --prefer-dist. But now when I use it, It installs laravel 5. I just want to use laravel 4, not yet ready for 5.
I've tried the other answers but doesn't work for me. So here's the command I use.
composer create-project laravel/laravel=4.1.27 your-project-name --prefer-dist
Source :
Installing specific laravel version with composer create-project
UPDATE
Laravel updated the installation docs of 4.* after releasing 5.
composer create-project laravel/laravel {directory} 4.2 --prefer-dist
Source: http://laravel.com/docs/4.2#install-laravel
If nothing specified composer create-project will get the latest stable version. You can change that by just specifying the version you want:
composer create-project laravel/laravel project-name ~4.2.0 --prefer-dist
This will install the latest 4.2.* version of laravel
You should download latest laravel 4.2 release from github - https://github.com/laravel/laravel/releases/tag/v4.2.11
then use composer update to download all relevant packages including latest laravel version
I use Alternate Method.
Docs says Alternate Method
Once Composer is installed, download the 4.2 version https://github.com/laravel/laravel/archive/v4.2.11.zip of the Laravel framework and extract its contents into a directory on your server. Next, in the root of your Laravel application, run the php composer.phar install (or composer install) command to install all of the framework's dependencies. This process requires Git to be installed on the server to successfully complete the installation.
If you want to update the Laravel framework, you may issue the php composer.phar update command.
U can use this
composer create-project laravel/laravel {directory} 4.2 --prefer-dist
replacing {directory} with the actual directory of your project

Install Older Version of Laravel using Composer

How do I install older version of Laravel framework using composer? The current version is 4.1 and I want to install Laravel 4.0.
either update your composer.json to what GregD mentioned or fetch it directly with
composer create-project laravel/laravel your-project-name 4.0.*
prefer this, as there can be some caveats when getting version 4.1 and wanting to downgrade (or even upgrade).
Finally it works, I just did four things:
composer create-project laravel/laravel mobilebanking 4.0
Change "dev" to "stable" in composer.json
Then run
composer self-update
After that, run this command
composer update --no-scripts
composer create–project laravel/laravel MiProyecto 5.3.* o
composer create–project laravel/laravel=5.3.* MiProyecto
Browse packagist - https://packagist.org/packages/laravel/laravel
Find version you need and add it to composer i.e.
"require": {
"laravel/laravel": "v4.0.0",
},
Install it like this:
composer create-project laravel/laravel path/to/your/directory version
For Laravel versions 5.5 it looks like this:
composer create-project laravel/laravel path/to/your/directory 5.5

Resources