Last active
July 19, 2016 02:59
-
-
Save KefDS/661bafd3281259817e7d16db34453529 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Links: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04 | |
| # https://www.digitalocean.com/community/tutorials/additional-recommended-steps-for-new-ubuntu-14-04-servers | |
| # Autenticarse como root | |
| ssh root@SERVER_IP_ADDRESS | |
| # Añadir usuario | |
| adduser user | |
| # Agregar el usuario al grupo suders | |
| gpasswd -a user sudo | |
| # Script para copiar la llave ssh al servidor | |
| ssh-copy-id user@SERVER_IP_ADDRESS | |
| # Deshabilitar shh como root | |
| nano /etc/ssh/sshd_config | |
| # Luego buscar PermitRootLogin yes y cambiar a no | |
| service ssh restart | |
| # Opcional | |
| # Firewall | |
| # Permitir ssh | |
| sudo ufw allow ssh | |
| # Puerto personalizado | |
| sudo ufw allow 4444/tcp | |
| # Activar firewall | |
| sudo ufw enable | |
| # Cambiar local zone | |
| sudo dpkg-reconfigure tzdata | |
| # Postgres en ubuntu 14.04 | |
| sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install postgresql-9.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment