- sudo apt update
- sudo add-apt-repository ppa:ondrej/php
- curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
- sudo apt-get install -y nodejs
- sudo apt install zip unzip
- sudo apt install nginx
- sudo apt update
- sudo apt-get install git
sudo apt install mysql-server
sudo apt install php8.0-fpm php8.0-mysql
sudo apt install php8.0-mbstring php8.0-xml php8.0-bcmath php8.0-simplexml php8.0-intl php8.0-mbstring php8.0-gd php8.0-curl php8.0-zip
sudo apt install php7.4-fpm php7.4-mysql
sudo apt install php7.4-mbstring php7.4-xml php7.4-bcmath php7.4-simplexml php7.4-intl php7.4-mbstring php7.4-gd php7.4-curl php7.4-zip
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/bin/composer
1. sudo mysql
2. CREATE DATABASE school_managment_new;
3. CREATE USER 'school_user'@'%' IDENTIFIED WITH mysql_native_password BY 'school_user';
5. GRANT ALL ON school_managment_new.* TO 'school_user'@'%';
6. FLUSH PRIVILEGES;
sudo vim /etc/nginx/sites-available/example
server {
listen 80;
server_name server_domain_or_IP;
root /var/www/example/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; // set you fpm path
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
sudo ln -s /etc/nginx/sites-available/example /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
sudo chown -R www-data.www-data /var/www/project/storage
sudo chown -R www-data.www-data /var/www/project/bootstrap/cache