Installing Laravel on Shared Hosting:
We are now in Home ~ directory,
$ cd ~/bin
$ mkdir composer
$ cd composer
[~/bin/composer]$
Run these command set to install Composer in ~/bin/composer directory Composer: Command-line installation (Link).
To quickly install Composer in the current directory:
To quickly install Composer in the current directory:
To check the setup file composer.phar:
[~/bin/composer]$ ls
[~/bin/composer]$ php composer.phar -v
Aliasing:
You need to make an alias for easy:
[~]$ vi ~/.bashrc
Add this line in the top of the file.
[ -z "$PS1" ] && return
Add this line in the very bottom of the file.
alias composer="/usr/bin/php5-cli ~/bin/composer/composer.phar"
source ~/.bashrc
composer -V
Composer version 1.8.4 2019-02-11 10:52:10
Install Laravel
Run to install Laravel installer itself:
composer global require laravel/installer
To create a project:
laravel new blog
NB: It not working then you need to alias the laravel executable on your .bashrc
go2belal@toptenofebay.com [~/.composer]# ll vendor/laravel/installer/bin
total 12
drwxr-xr-x 2 go2belal go2belal 4096 May 21 10:25 ./
drwxr-xr-x 4 go2belal go2belal 4096 Jun 23 13:40 ../
-rwxr-xr-x 1 go2belal go2belal 331 May 21 10:25 laravel*
go2belal@toptenofebay.com [~/.composer]# cd vendor/laravel/installer/bin
go2belal@toptenofebay.com [~/.composer/vendor/laravel/installer/bin]# pwd
/home4/go2belal/.composer/vendor/laravel/installer/bin
vi ~/.bashrc
alias laravel='/home4/go2belal/.composer/vendor/laravel/installer/bin/laravel'
source ~/.bashrc
laravel -v
Debug: some times you may see this message:
source ~/.bashrc
composer -V
-jailshell: /usr/bin/php5-cli: No such file or directory
Then run:
$ which php /usr/local/bin/php
and replace the "/usr/bin/php5-cli" with "/usr/local/bin/php"
in ~/.bashrc file.
Run again:
source ~/.bashrc
composer -V
Composer version 1.8.4 2019-02-11 10:52:10
This particular is usually apparently essential and moreover outstanding truth along with for sure fair-minded and moreover admittedly useful My business is looking to find in advance designed for this specific useful stuffs… Web Hosting
ReplyDeleteI think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Web Hosting
ReplyDelete