Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lde-for-ubuntu [2025/12/08 09:05] kkaragozlde-for-ubuntu [2025/12/08 09:48] (current) – [Installing PHP and Required Modules] kkaragoz
Line 21: Line 21:
  
 <code bash> <code bash>
-sudo apt install -y php8.4 php8.4-fpm php8.4-cli php8.4-gd php8.4-mbstring php8.4-xml php8.4-zip php8.4-intl+sudo apt install -y php8.4 php8.4-fpm php8.4-cli php8.4-gd php8.4-mbstring php8.4-xml php8.4-zip php8.4-intl php8.4-pdo php8.4-mysql
  
  
Line 93: Line 93:
 </code> </code>
  
-==== Test the Connectivity ====+==== Testing MariaDB ====
 <code bash> <code bash>
 mysql -u root -pTypeThePasswordThatYouSet mysql -u root -pTypeThePasswordThatYouSet
Line 143: Line 143:
  
 Threads: 1  Questions: 74  Slow queries: 0  Opens: 33  Open tables: 26  Queries per second avg: 0.031 Threads: 1  Questions: 74  Slow queries: 0  Opens: 33  Open tables: 26  Queries per second avg: 0.031
 +</code>
 +
 +===== Composer Installation =====
 +Composer has an awesome description and installation guide on its webpage. You can use the following link: [[https://getcomposer.org/download/]] and see the section that "Command-line installation". I am just referencing the same code here:
 +
 +It is better to go your home directory first:
 +<code bash>
 +cd ~
 +</code>
 +
 +== 1. Download the terminal script ==
 +<code bash>
 +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
 +</code>
 +
 +== 2. Check the hash file ==
 +<code bash>
 +php -r "if (hash_file('sha384', 'composer-setup.php') === 'c8b085408188070d5f52bcfe4ecfbee5f727afa458b2573b8eaaf77b3419b0bf2768dc67c86944da1544f06fa544fd47') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"
 +</code>
 +It should return the following message: **Installer verified**
 +== 3. Run the Script ==
 +<code bash>
 +php composer-setup.php
 +</code>
 +
 +It should return the following message:
 +
 +<code bash>
 +All settings correct for using Composer
 +Downloading...
 +
 +Composer (version 2.9.2) successfully installed to: /home/USER/composer.phar
 +Use it: php composer.phar
 +</code>
 +
 +
 +== 4. Delete (Unlink) the File ==
 +<code bash>
 +php -r "unlink('composer-setup.php');"
 +</code>
 +
 +== 5. Add it to the PATH ==
 +Then you can add the composer into your PATH to access the composer with just running `composer` command from any directory:
 +<code bash>
 +sudo mv composer.phar /usr/local/bin/composer
 +</code>
 +
 +== 6. Test the Installation ==
 +<code bash>
 +composer --version
 +</code>
 +
 +You need to see something similar like:
 +<code bash>
 +Composer version 2.9.2 2025-11-19 21:57:25
 +PHP version 8.4.15 (/usr/bin/php8.4)
 +Run the "diagnose" command to get more detailed diagnostics output.
 </code> </code>
Back to top