Created
February 22, 2022 06:53
-
-
Save DevSecOpsGuy/760c794d72180c6b1c65cecaed58f477 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt update | |
ufw status | |
apt install nginx | |
systemctl status nginx | |
ufw app list | |
ufw allow "nginx full" | |
goto >> http://ipaddress | |
apt install mysql-server | |
systemctl status mysql.service | |
mysql_secure_installation | |
N>Y>Y>Y | |
mysql -u root -p | |
mysql> CREATE USER 'niru'@'localhost' IDENTIFIED BY '1234'; | |
mysql> GRANT ALL PRIVILEGES ON * . * TO 'niru'@'localhost'; | |
mysql> FLUSH PRIVILEGES; | |
mysql -u niru -p | |
apt install php-fpm php-mysql | |
systemctl status php7.4-fpm.service | |
vi /etc/nginx/sites-available/default | |
43 # Add index.php to the list if you are using PHP | |
44 index index.php index.html index.htm index.nginx-debian.html; | |
45 | |
46 server_name _; | |
47 | |
48 location / { | |
49 # First attempt to serve request as file, then | |
50 # as directory, then fall back to displaying a 404. | |
51 try_files $uri $uri/ =404; | |
52 } | |
53 | |
54 # pass PHP scripts to FastCGI server | |
55 # | |
56 location ~ \.php$ { | |
57 # include snippets/fastcgi-php.conf; | |
58 # | |
59 # # With php-fpm (or other unix sockets): | |
60 fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |
61 # # With php-cgi (or other tcp sockets): | |
62 # fastcgi_pass 127.0.0.1:9000; | |
63 include fastcgi_params; | |
64 fastcgi_index index.php; | |
65 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
66 } | |
nginx -t | |
systemctl restart nginx.service | |
vi /var/www/html/info.php | |
<?php | |
phpinfo(); | |
?> | |
goto >> http://ipaddress/info.php | |
wget https://files.phpmyadmin.net/phpMyAdmin/5.1.3/phpMyAdmin-5.1.3-english.tar.gz | |
ls | |
tar -xvzf phpMyAdmin-5.1.3-english.tar.gz | |
ls | |
mv phpMyAdmin-5.1.3-english /usr/share/phpmyadmin | |
ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin | |
goto >> http://ipaddress/phpmyadmin | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment