篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Linux + php + composer + laravel在服务器端相关的知识,希望对你有一定的参考价值。
1. Find right php version directory
/usr/local/php72/bin/php
2. composer install to the php directory (https://getcomposer.org/download/)
/usr/local/php72/bin/php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
/usr/local/php72/bin/php -r "if (hash_file('SHA384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
/usr/local/php72/bin/php composer-setup.php --install-dir=composer
/usr/local/php72/bin/php -r "unlink('composer-setup.php');"
если нет доступа, то в папку проекта
3. alias
В корне пользователя создать .bash_profile
!!! не забыть прописать правильный путь к php
alias php='/opt/php71/bin/php -d memory_limit=256M'
alias composer='/opt/php71/bin/php -d memory_limit=500M /home/belkaz/belka-z.pp.ua/zachet/www/composer/composer.phar'
4. php artisan storage:link
или что-то типа ln -s /home/r/rsdavydov/my_project/public /home/r/rsdavydov/new_site/public_html
以上是关于text Linux + php + composer + laravel在服务器端的主要内容,如果未能解决你的问题,请参考以下文章