-
Create the VPS Server
-
Set time zone and encodings
- As root user run
dpkg-reconfigure tzdata && \ dpkg-reconfigure locales && \ apt-get update && \ apt-get upgrade -y && \ apt-get install -y git vim wget curl
- As root user run
-
Install unattended upgrades
apt-get install -y unattended-upgrades update-notifier-common && \ dpkg-reconfigure --priority=low unattended-upgrades
-
Optional
- Install Bashit to have a "sexy theme"
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it && ~/.bash_it/install.sh \ && mkdir -p ~/.bash_it/plugins/enabled/ \ && ln -s ~/.bash_it/plugins/available/history.plugin.bash ~/.bash_it/plugins/enabled/250---history.plugin.bash \ && sed -i 's/bobby/sexy/' ~/.bashrc
- Install Bashit to have a "sexy theme"
-
Configure a user with sudo privileges
- As root
useradd -m -s /bin/bash -G sudo "user-name"
- As root
-
Set password to the user created
- As root
passwd "user-name"
- As root
-
Chage user, add ssh keys and set permissions
mkdir ~/.ssh chmod 700 ~/.ssh vim ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys
ssh-keygen -t rsa -b 4096 -C "server" eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa
- Add the generated key to your repository and then test the conection
ssh -T [email protected]
-
Edit
/etc/ssh/sshd_config
PermitRootLogin no
-
Restart the sshd server
sudo systemctl restart sshd
-
Optional
- You can set a new hostname for your server
sudo hostnamectl set-hostname "server-name"
- You can set a new hostname for your server
-
In your terminal run
ansible-playbook "deploy-file-name".yml -i hosts -K
-
Notifications
You must be signed in to change notification settings - Fork 0
alluximx/Automate-Deployments
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published