farnodes / sysadmin

0 stars 0 forks source link

[PHP] #18

Open rsingh0706 opened 2 months ago

rsingh0706 commented 2 months ago

PHP

Service name: PHP Port: default port number Usage description:
CLI:

sudo apt update
sudo apt install php-fpm php-mysql php-curl php-gd php-xml php-mbstring php-xmlrpc php-soap php-intl php-zip -y
php -v
sudo systemctl start php7.4-fpm
sudo systemctl enable php7.4-fpm
sudo systemctl status php7.4-fpm
sudo vim index.php
<?php
phpinfo();
?>
php index.php
sudo mv index.php /var/www/html/  (write line 44) index.php
sudo vim /etc/nginx/sites-available/default (line uncomment 44,46,48,51,52,56,57,60,63)
sudo nginx -t
sudo systemctl restart nginx
sudo systemctl status nginx
sudo systemctl restart php7.4-fpm
sudo systemctl start php7.4-fpm

User: write user name

Path:

  1. list what can you do with it
  2. list what can you do with it