在 Debian 6 上安装 laravel 和 composer

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17100799/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 07:57:56  来源:igfitidea点击:

Installing laravel and composer on Debian 6

laravelcomposer-php

提问by jpganz18

I want to use laravel, so, firstly I have to install composer, I uploaded laravel in a folder "laravel" now i go to the folder and I do this

我想使用laravel,所以,首先我必须安装composer,我将laravel上传到“laravel”文件夹中,现在我转到该文件夹​​并执行此操作

curl -sS https://getcomposer.org/installer | php

according the site of composer...

根据作曲家的网站...

So, now, according laravel I should do this

所以,现在,根据 laravel 我应该这样做

composer create-project laravel/laravel

but returns "composer command not found"

但返回“找不到作曲家命令”

When I finished installing composer I get this Use it: php composer.phar

当我完成安装 composer 我得到这个使用它:php composer.phar

So, I try again php composer.phar create-project laravel/laravel

所以,我再试一次 php composer.phar create-project laravel/laravel

and it runs,but it stays as Installing dependencies (incluiding require-dev)for a long long time.

它运行,但它在很长一段时间内保持安装依赖项(包括 require-dev)

My enviroment is Debian 6, and its a cloud server, so, internet should not be a problem. It just stays like that, any idea what I'm doing wrong? How to solve this and make it run?

我的环境是 Debian 6,它是一个云服务器,所以,互联网应该不是问题。它只是保持这样,知道我做错了什么吗?如何解决这个问题并让它运行?

Thanks

谢谢

回答by hacktotopo

$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer
# if you're installing as root or privileged account, don't leave the permissions on default 777
$ chmod 755 /usr/local/bin/composer
$ composer install