moktar
9/26/2019 - 11:37 AM

the right lemp in centos

nginx :
yum -y install epel-release
yum -y install nginx
systemctl start nginx
systemctl enable nginx

yum -y install net-tools
netstat -plntu

// go to browser check if ip point to nginx if not? 
firewall-cmd --permanent --add-service=http
firewall-cmd --reload

Enable the Nginx service at system startup.
systemctl enable nginx

PHP:
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
// Disable Remi PHP 5.4 repository
yum install -y yum-utils
yum-config-manager --disable remi-php54
// Enable Remi PHP 7.3 repository
yum-config-manager --enable remi-php73
yum install php

// Enable PHP-FPM Support on Virtual Host
nano /etc/nginx/conf.d/web.itzgeek.local.conf
server {
   server_name web.itzgeek.local;
   root /usr/share/nginx/html/web.itzgeek.local;

   location / {
       index index.html index.htm index.php;
   }

   location ~ \.php$ {
      include /etc/nginx/fastcgi_params;
      fastcgi_pass 127.0.0.1:9000;
      fastcgi_index index.php;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   }
}
mkdir /usr/share/nginx/html/web.itzgeek.local
echo "<?php phpinfo(); ?>" > /usr/share/nginx/html/web.itzgeek.local/index.php
systemctl restart nginx
systemctl restart php-fpm



source : 
https://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-linux-nginx-mariadb-php-lemp-stack-in-rhel-8.html

https://kifarunix.com/installing-php-7-3-3-on-centos-7-6/

https://www.howtoforge.com/tutorial/how-to-install-laravel-5x-with-nginx-and-php-fpm-7-on-centos-7/