Closed charris-crs closed 4 years ago
@charris-crs manually moving the composer.phar file should be enough when you do not have root permissions on your environment. If that won't work, I would suggest to login as root via sudo su -
(assuming your account has that permission) and installing composer again.
According to the documentation the files should be moved to the correct folder. In my environment we have cloned the environment to /var/www/vbo365-rest-self-service
and pointed our Apache configuration to that folder.
you should run the composer
command inside the cloned repository folder. The user running that command should have enough permissions to create files / folders in that repository folder.
Good luck!
Maurice
Maurice Many thanks for your response.
I will give it a go.
Thanks
I have moved composer mv composer.phar /usr/local/bin/composer I have cloned the repository to /var/html I have tried to run composer from this directory but I still get the error [RuntimeException] /var/www/vendor does not exist and could not be created.
Trying to run as sudo gives the following error Do not run Composer as root/super user! See https://getcomposer.org/root for details
@charris-crs The error message you get when trying to run composer, please make sure the composer.json
file is in that folder and the user that you use has permissions to create and write files / folder in that folder.
Could you do a 'ls' in the /var/html folder? I presume you still have the vbo365-rest folder in which you should enter and run the composer command.
vboadmin@vbo365rest:/var/www$ ls html vbo365-rest
Should I move "vbo365-rest" inside folder "html"?
You need to move all the content from inside the vbo365-rest folder into the html folder.
Normally these should be enough: mv /var/www/vbo365-rest/ /var/www/html mv /var/www/vbo365-rest/. /var/www/html
Afterward, go to the /var/www/html folder and try to run composer again.
Thanks Niels so I need the folder "/var/www/vbo365-rest" but the content needs to be in "/var/www/html"
Regards
Correct, the content from in the vbo365-rest folder needs to be in the html folder.
Thanks Niels
This has now worked
Regards
Clive
Hi Niels
I have created an install from scratch doc, which maybe of use. Regards
Thanks for sharing. I will look into it and if needed update the readme file.
I have version 3 working OK but need to move to version 4. I have created a VM from Ubuntu 18.04 and installed a LAMP package
I get an error when downloading and installing composer with the command curl -sS https://getcomposer.org/installer | /usr/bin/php && /bin/mv -f composer.phar /usr/local/bin/composer
/bin/mv: cannot move 'composer.phar' to '/usr/local/bin/composer': Permission denied
I can manually move this using sudo but has anything else been left incomplete? How can I successfully install composer?
I can clone the repository git clone https://github.com/nielsengelen/vbo365-rest.git
Should I be in any particular directory to do this?
I have created /portal for all downloads and run the command from here.
The instruction "Place these files under the web service root (/var/www/)" needs clarification
is it the directory vbo365-rest I should be moving or just the files and directories in it?
When running Composer install I get an error No composer.json in current directory, do you want to use the one at /var/www? [Y,n]? [RuntimeException] /var/www/vendor does not exist and could not be created. Is vendor a variable or should I just manually create it as a directory?
How do I overcome these errors?
After running the composer routines as above I can no longer access the apache default page.
Thanks