Helpful Debian commands

Hodgepodge of commands from the internet for my OWN reference

Read at your own risk..

pi@raspberrypi:~ $ ls -lh /var/www/ n pi@raspberrypi:~ $ sudo chown -R pi:www-data /var/www/html/ pi@raspberrypi:~ $ sudo chmod -R 770 /var/www/html/ pi@raspberrypi:~ $ ls -lh /var/www/

Hodgepodge of commands from the internet for my OWN reference..

read at your own risk..

pi@raspberrypi:~ $ ls -lh /var/www/ n
pi@raspberrypi:~ $ sudo chown -R pi:www-data /var/www/html/ pi@raspberrypi:~ $ sudo chmod -R 770 /var/www/html/ pi@raspberrypi:~ $ ls -lh /var/www/

Python virtual env Install all the packages needed for your application to run in an enclosed application.

sudo python3 -m venv /newdir make sure dir is created source venv/bin/activate Now your virtual environment should be a

ssh keys gen in linux once you have created a public and private key and saved them to a location following is how you activate it

eval ssh-agent

ssh-add private key

How to know the process on a port and stop it?

Find process running on a PID and kill it sudo netstat -nlp | grep :80 kill -9 pid env variables Install LAMP on a brand new raspberry pi https://www.instructables.com/Installing-LAMP-Linux-Apache-MySQL-PHP-on-a-Raspbe/

still to do ftp

if you have trouble loggin in phpmyadmin try this

https://askubuntu.com/a/751494 So what all do you need to do on a new pi?

configure firewalss configure apache for hostname install lamp sudo apt update and upgrade $ sudo apt install apache2 -y

You can now go to your IP address and visit your page

You also need to enabel a2enmod sudo a2enmod rewrite sudo systemctl restart apache2

links