Hi, the following technique you are about to employ will save you time having to install *php-cli * via apt-get and php extensions on your linux when xammp already comes with php as a bundle.
- You already installed xammp
- Make sure you have followed step one...lol
To install composer run the command below
sudo curl -s https://getcomposer.org/installer | /opt/lampp/bin/php
After installation, we'll have to symlink php bundle that comes along with xampp after which we run the command below to allow 'composer' command to run globally (this will run from within the folder where you've just installed composer in which a composer.phar file has just been created):
sudo ln -s /opt/lampp/bin/php /usr/local/bin/php
Next, we'll run the below command to allow composer to reflect globally in the system
sudo mv composer.phar /usr/local/bin/composer
If you already installed composer via apt-get but wish to use the xammp php bundle (since composer must require php-cli), you can do that by adding XAMPP php to environment variables.
Run the following command:
Yep....That's all! Let me know your thoughts!
Top comments (2)
Yea. I understand but there are people who still use the kind of setup in the post