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.

  • 写回答

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法