doushi1900
2019-06-11 14:46
浏览 66
已采纳

在具有不同域托管的VPS上安装作曲家

I am new to the composer, I have a VPS with several domains hosted. The VPS is the CentOS. Now I need to install the composer in order to meet several PHP systems' requirement. Now I have several questions about the installation.

1st, I have several systems, should I need to install several composers for each?

2nd, I have the root account to VPS and also have several cPanel accounts on it, owner and group are different to different cPanel accounts, when I install the composer, should I need to log in with different accounts and install it or only install by root?

3rd, where should I place the composer, any specific folder or the folder directly under the PHP system?

Hope someone can help to answer the above questions.

Best regards,

Kelvin.

图片转代码服务由CSDN问答提供 功能建议

我是作曲家的新手,我有一个托管多个域的VPS。 VPS是CentOS。 现在我需要安装composer才能满足几个PHP系统的要求。 现在我有几个关于安装的问题。

第一,我有几个系统,我是否需要为每个系统安装几个作曲家?

2,我有VPS的root帐户,并且还有几个cPanel帐户,所有者和组与不同的cPanel帐户不同,当我安装作曲家时,我是否需要登录 使用不同的帐户并安装它或仅由root安装?

第三,我应该将作曲家,任何特定文件夹或文件夹直接放在PHP系统下?

希望有人可以帮助回答上述问题。

致以最诚挚的问候,

Kelvin。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • douyue2313 2019-06-11 17:29
    最佳回答

    1st - You need to install composer tool globally. This means that you need to install it once but you need to run composer install on each folder that has a composer.json file, in order to install its dependencies.

    2nd - I am not sure how you server is organised regarding permissions, but I think installing it with root is enough.

    3rd - I normally move and rename the composer.phar file to a location like /usr/local/bin.

    --- Try doing these steps ---

    Download composer (get instructions on link below)

    https://getcomposer.org/download/

    Make the phar executable:

    chmod a+x composer.phar

    Run this to move and rename it:

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

    After this, you should be able to call composer from anywhere on your server. To test it, simply run: composer.

    Now proceed to you app folder (where composer.json is located) and run: composer install

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题