0

I am trying to test drive laravel 4 yet of course I have to install Composer first. Now there are two installation types (local vs. global). I want a global installation to avoid using

php composer.phar and rather use composer. That said the instructions shown in their website shows:

$ mv composer.phar /usr/local/bin/composer

I am using shared hosting on justhost and this is not going to work because inside bin there is no composer. Where should I move it to to ensure it is global?

thanks,

4

2 回答 2

1

你需要把它放在路径的任何地方。所以你可以通过运行来检查你的

echo $PATH

你应该看到类似的东西:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

然后选择其中之一(由“:”分隔)并将其移动到那里:

mv composer.phar /usr/sbin/composer
于 2013-10-26T12:27:16.517 回答
1

通常共享主机不会授予您访问 bin-directories 的权限,因此唯一的选择是在您的共享主机上进行“本地”作曲家安装(假设您对主机帐户具有终端访问权限)。最有可能的是,您谈到的示例预设了对上述目录的完全终端访问权限。游戏还没有结束,可以采用许多替代方案。例如:1)获得一个 VPS 帐户(这是最昂贵的解决方案) 2)建立一个本地开发环境(MAMP、WAMP、XAMP、Vagrant)并将最终项目传输到您的共享主机(使用 FTP/SFTP)3)使用 PAAS(平台即服务)。亚马逊提供一年免费订阅选项,但必须使用信用卡进行注册。fortabbitphpcloud

于 2013-10-26T12:59:23.713 回答