marcpaes of TG4 - Infra
5/10/2018 - 3:09 PM

Linux - Comandos comuns

Comandos comuns

#BACKUP MYSQL
mysqldump --host="www.paguri.com" --user="marcpaes" --password="tecs638form" --compress paguri | mysql --database="paguri" --user="root" --password="tecs638form"

#USUARIOS
groups -- list all groups
cat /etc/passwd -- list all users
cat /etc/group | grep --regex "^www-data:.*" | awk -F: '{print $4}'
sudo groupadd www-data
sudo usermod -G www-data nginx
sudo chown -R ec2-user:www-data ./app

#NGINX
sudo nginx -s stop
sudo nginx