0% found this document useful (0 votes)
27 views3 pages

LEMP Shalu

Uploaded by

SS
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
0% found this document useful (0 votes)
27 views3 pages

LEMP Shalu

Uploaded by

SS
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 3

1 sudo su

2 sudo apt update


3 sudo apt install nginx -y
4 systemctl status nginx
9 sudo apt update
10 sudo apt install mariadb-server
11 sudo mysql_secure_installation
12 sudo systemctl status mariadb
13 sudo mysql
14 GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password' WITH GRANT
OPTION;
15 sudo systemctl status mariadb
16 sudo mysqladmin version
17 php -v
18 nginx -t
19 systemctl reload nginx
20 systemctl restart nginx
21 systemctl status nginx.service
22 nginx -t
23 systemctl status nginx
24 sudo apt update
25 sudo apt install wget php-cli php-zip unzip
26 php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
27 HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
28 php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo
'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-
setup.php'); } echo PHP_EOL;"
29 sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
30 composer
34 cd ~
35 nginx -t
36 systemctl status nginx
43 sudo apt install software-properties-common -y
44 sudo add-apt-repository ppa:ondrej/php
45 sudo apt install php7.4-fpm php7.4-common php7.4-dom php7.4-intl php7.4-
mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli
php7.4-dev php7.4-imap php7.4-mbstring php7.4-soap php7.4-zip php7.4-bcmath -y
46 systemctl status php7.4-fpm
47 php -v
48 sudo apt install php-mbstring
49 composer require laravel/passport
50 sudo apt-get update
51 sudo apt install php-xml
52 sudo apt-get install php-mbstring
54 composer require cviebrock/eloquent-sluggable
67 composer update
68 sudo apt-get update
69 sudo apt-get upgrade
71 systemctl status nginx
72 sudo nginx -t
73 sudo systemctl restart nginx
74 sudo systemctl reload nginx
76 sudo mysql -v
77 sudo php -v
79 sudo composer
80 cd ~
81 ls
83 sudo composer create-project --prefer-dist laravel/laravel vidhvaa
84 cd vidhvaa/
85 php artisan
86 sudo nano .env
/var/www/vidhvaa/.env
APP_NAME=vidhvaa
APP_ENV=development
APP_KEY=APPLICATION_UNIQUE_KEY_DONT_COPY
APP_DEBUG=true
APP_URL=http://domain_or_IP

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=vidhvaa
DB_USERNAME=root
DB_PASSWORD=password

...

88 sudo mv ~/vidhvaa/ /var/www/


90 sudo chown -R www-data.www-data /var/www/vidhvaa/storage/
91 sudo chown -R www-data.www-data /var/www/vidhvaa/bootstrap/cache/
92 sudo nano /etc/nginx/sites-available/vidhvaa

/etc/nginx/sites-available/vidhvaa
server {
listen 80;
server_name server_domain_or_IP;
root /var/www/vidhvaa/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;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}

location ~ /\.(?!well-known).* {
deny all;
}
}
93 sudo ln -s /etc/nginx/sites-available/vidhvaa /etc/nginx/sites-enabled/
94 sudo nginx -t
95 sudo systemctl reload nginx

You might also like