The "Questions that may already have your answer" do give various instructions on how to install Drush and/or Composer, but they don't address my question. I did come across this comment:
Q: drush - which folder for install on VPS / root server (newbie): A: "You can install Drush in the folder of your choice. Preferably outside www-directory."
My question: I'm not sure if this is applicable to Composer as well? And if it is applicable to Composer as well, why do people give specific folders into which Composer must be installed into?
The reason for my concern into which folder I install Composer is because I want to run it without problems (in any case with as little as possible).
I'm listing the different options:
mdir bin, cd bin, install Composer in [~/bin] directory.
Install in /home/username/bin
Install in [~/bin] and move to /usr/local/bin
Install in the /usr/local/bin folder That is a hidden folder, I can access it if I say "cd /usr/local/bin" in my terminal, but it doesn't show in the file manager of cpanel. How does that relate to /home/username/bin (or doesn't it)?
Install in the public_html folder (home/username/public_html)
One article says that Drupal is installed in the /var/www/drupal folder.
Another articles says that Drupal is installed in domains/websitename.com/htdocs/www
It seems to me that the [~/bin] directory is the preferred one?