[英]How can I install composer in live server cpanel
I want to use php spreadsheet package and from their site, I was told to install composer on cpanel but have met little success on the internet trying to figure out how to do it. 我想使用php电子表格包,从他们的网站,我被告知在cpanel上安装作曲家,但在互联网上遇到了一些成功,试图找出如何做到这一点。
Please, who can put me through on how to install composer on liveserver 请告诉我如何在liveserver上安装composer
You can use SSH for this (alternatively using cron jobs to run the commands will also work - way more tedious) 您可以使用SSH(或者使用cron作业运行命令也会工作 - 方式更繁琐)
Login to your cPanel account via SSH 通过SSH登录您的cPanel帐户
Make directory for your composer (can also be used for other executables that you might store) 为您的作曲家制作目录(也可以用于您可能存储的其他可执行文件)
mkdir ~/composer
cd ~/composer
Download composer 下载作曲家
wget https://getcomposer.org/download/1.6.5/composer.phar
Change the name of composer and make it executable 更改composer的名称并使其可执行
mv composer{.phar,}
chmod +x composer
You will now be able to call composer by 您现在可以通过调用composer
php ~/composer/composer install
But it's more convenient to have it run by just invoking composer in your terminal. 但是通过在终端中调用composer来运行它会更方便。 For this add the ~/composer directory to your $PATH.
为此,将〜/ composer目录添加到$ PATH。 I'm using VIM for text editing so
我正在使用VIM进行文本编辑
vim ~/.bashrc
Append those two lines at the bottom 在底部附加这两行
PATH=~/composer:$PATH
export PATH
Exit and login via SSH again - you will be able to freely call composer in your terminal 再次通过SSH退出并登录 - 您可以在终端中自由呼叫作曲家
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.