Skip to content

Instantly share code, notes, and snippets.

@jbarreraballestas
Last active September 30, 2022 01:27
Show Gist options
  • Save jbarreraballestas/82e44ac2c6807b51a731abee8287e395 to your computer and use it in GitHub Desktop.
Save jbarreraballestas/82e44ac2c6807b51a731abee8287e395 to your computer and use it in GitHub Desktop.
RedHat: executed commands for install nginx php-fpm for use laravel
sudo yum update -y
sudo yum module list nginx
sudo yum module enable nginx:1.20
sudo yum install nginx -y
sudo firewall-cmd --permanent --add-port={80/tcp,443/tcp}
sudo systemctl enable nginx
sudo systemctl start nginx
sestatus
sudo firewall-cmd --list-ports
systemctl is-enabled nginx
sudo yum module list php
sudo yum module install php:8.0
sudo systemctl start php-fpm
sudo systemctl enable php-fpm
ll /usr/share/nginx/html/
sudo chown -R $USER:$USER /usr/share/nginx/html/
echo '<?php phpinfo(); ?>' > /usr/share/nginx/html/index.php
sudo yum install nano -y
sudo nano /etc/nginx/nginx.conf
cd /etc/nginx/
sudo mkdir sites-enabled
cd sites-enabled/
sudo nano default
sudo nano /etc/nginx/nginx.conf
nginx -t
sudo nginx -t
sudo systemctl restart php-fpm nginx
cd /var/www/
sudo chown -R $USER:$USER /var/www/
sudo yum install zip unzip -y
ls
php --version
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php && php -r "unlink('composer-setup.php');" && sudo mv composer.phar /usr/local/bin/composer
composer --version
sudo yum module list nodejs
sudo yum module enable nodejs:16
sudo yum install nodejs
node --version
npm --version
composer create-project laravel/laravel laravel
clear
cd laravel/
sudo chown -R $USER:apache storage bootstrap/cache/ && sudo chmod -R 775 storage bootstrap/cache/
sestatus
sudo nano /etc/selinux/config
sudo chcon -R -t httpd_sys_rw_content_t /var/www/laravel/storage/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment