This script automatize the first server install process in an Ubuntu/Debian environment.
- Get an empty virtual server
- Download and launch this script under the
/home/
$ cd
$ wget -p https://raw.githubusercontent.com/gubi/Donut/master/server_init.sh -O server_init.sh
$ ./server_init.sh <WEBSERVER_TYPE> <DOMAIN.TLD>
(for example: $ ./server_init.sh apache example.com
)
The script will proceed to execute this sequence of stuff:
- Add ondrej apt-repository for the latest version of PHP (Best supported)
- Add certbot apt-repository for the last version of Let’s Encrypt
- Update the System
- Upgrade the system
- Install your preferred Web Server
- Install
python-certbot
- Update the System
- Install
curl
andsoftware-properties-common
- Install the latest version of PHP
- Enable and configure the Firewall (ufw)
- Modify permissions on webserver root
- Remove the default
html
folder created by the web server - Create the
index.php
and theinfo.php
files - Configure the web server (removing also the default configurations)
- Enable certbot certificates to keep updated via
cron
- Restart the server