Comando Úteis para servidores Linux (ubuntu)
Tabela de comandos links utilizadas na implantação de servidores VPS.
1 | Remover certbot | sudo apt remove certbot python3-certbot-nginx -y |
2 | Instale via Snap (recomendado pelo próprio Certbot) | sudo snap install core; sudo snap refresh core sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/bin/certbot |
3 | Rodar Certbot no NGINX Versão certbot |
sudo certbot --nginx certbot --version |
4 | Renovação automatica CERTBOT | sudo systemctl list-timers | grep certbot |
5 | Iniciar, Parar e Status NGINX | sudo systemctl start nginx sudo systemctl stop nginx sudo systemctl status nginx |
6 | Iniciar Python (DJango) em Produção | sudo gunicorn config.wsgi:application & |
7 | Iniciar Python (DJango) em Desenvolvimento | python manage.py runserver 0.0.0.0:8000v |
8 | Serviços que estão rodando porta 8000 (PID) | sudo lsof -i :8000 |
9 | Matar/Parar Processo | sudo kill -9 31703 (PID) |
10 | Acessar PostgreSQL | sudo -u postgres psql |
11 | Versão PostgreSQL | psql --version |
12 | Listar banco de dados | \l ou \list |
13 | Instalar Django conversão específica | pip install django==5.2.4 |
14 | Instalar Gunicorn | sudo pip3 install gunicorn |
15 | Instalar PIP (Python) | python3.12 get-pip.py |
16 | Nova Senha PostgreSQL para usuario postgres | \password postgres |