Steven SullivanSteven Sullivan - 5th October 2016

NOW WORKS WITH THE NEW VERSION 0.9.8-20! 🙂

Please upgrade to VestaCP release 20. A security flaw currently affecting servers is present in release < 20. If upgrade is not yet available, please patch

I decided to create the perfect VestaCP server installer script (in my opinion) for CentOS 7 (I have only tried it on CentOS 7). Basically, you run it, it asks a few questions and then it sets up a perfect server including CSF, Monit and PHP 7 (if you want it). Amazing, right?

THIS SCRIPT SHOULD BE USED ON A NEW SERVER. THIS SCRIPT INSTALLS VESTACP TOO.
I DO NOT ACCEPT ANY RESPONSIBILITY, SHOULD THIS SCRIPT DAMAGE YOUR SERVER.

What this VestaCP Server Installer does:

  1. Installs VestaCP with: NGINX & PHP-FPM, MariaDB, Named, Remi repository, vsftpd, no firewall (CSF will be installed), Exim, Dovecot, and SpamAssassin.
  2. Makes the new LetsEncrypt in-built script work properly + creates an SSL certificate for the hostname.
  3. Installs CSF as a Firewall with common settings.
  4. Asks if you want to install Softaculous.
  5. Sets the hostname properly (so Exim uses the full hostname), and then prevents the system from editing the file (because of reboots).
  6. Makes the server use it’s own DNS server to perform lookups. This helps SpamAssassin to reduce more spam. It also prevents the server from editing the file.
  7. Asks you if you would like to harden the /etc/sysctl.conf file for security.
  8. Enables Dovecot quotas and configures Dovecot performance.
  9. Installs SpamAssassin rules to help prevent further spam.
  10. Updates the file /etc/exim/dnsbl.conf to further reduce spam.
  11. Updates Exim to make sure there is no delay accepting email.
  12. Fixes NGINX and secures it even further so you receive a A (A+ requires you enable HSTS) at Quality SSL Labs.
  13. Fixes PHP-FPM to use less memory and crash less often.
  14. Installs and configures Monit to monitor your server.
  15. Asks you if you want to install PHP 7. WordPress supports PHP 7.
  16. Makes websites use HTTP2 instead of HTTP1.1

vestacp server installer  monit-logo  csf_large

 

Run the following commands to install the VestaCP Server Installer

Before installing please make sure your hostname resolves to an IP address otherwise the LetsEncrypt script won’t be able to secure your VestaCP Server Installer correctly!

wget https://raw.githubusercontent.com/SS88UK/VestaCP-Server-Installer/master/CentOS7.sh -O ./CentOS7.sh
chmod 777 ./CentOS7.sh
sudo ./CentOS7.sh

 

Next hold tight and watch it set-up the server. It may take 15 minutes just securing the server as part of the script generates DH parameters to secure NGINX (this could take up to 1 hour on 1 core DigitalOcean VPS’s).

Right at the very end the console instructs you to reboot the server – you should.

 

If you’re looking for the older version for 0.9.8-17, you’ll find it here:

wget https://raw.githubusercontent.com/SS88UK/VestaCP-Server-Installer/master/CentOS7-0.9.8-17.sh -O ./CentOS7.sh