We quite regularly setup new VPS instances for our clients and there is always a long check list of stuff that has to be done. All these items can very often be a pain to remember but thankfully Digital Ocean have two REALLY helpful tutorials on their blog that make the process a lot less of a hassle.
First we have to configure the server's permissions which is covered in detail in Initial server setup with CentOS 7 but the summary is:
- Login as root.
- Create a non root user account and add to the "wheel" group.
- Add your public key to the new user account.
- Disable root login.
- Restart SSH.
Once this is done, we can setup the web and db server, which is covered in some detail in How to install CentOS, Nginx, PHP and Mysql, again the summary is:
- Install Nginx
- Install Mysql.
- Install PHP
- Setup Nginx to process PHP