This is a subpost of the larger post Updated Comprehensive VPS Setup Documentation.
When initially setting up a VPS, I generally install the programs listed below. Before installing anything, it is important to first update and upgrade all packages already installed on the server with apt-get update && apt-get upgrade
- First, install Fail2Ban in order to prevent bruteforcing of SSH passwords
- Install Apache2
- Install MySQL Server
- Install PHP and its dependencies for MySQL and PHPMyAdmin
- Performance Tools
- Screenfetch lets you see system information
- Htop lets you see details about resource usage
- Nload lets you see details about network utilization
- NTP makes sure the time is kept up to date
- Git tracks changes in files and is required for LetsEncrypt
This command will do all of these things without prompting in between;
apt-get -y install fail2ban apache2 && apt-get -y install mysql-server && apt-get -y install php5 php-pear php5-mysql && apt-get -y install php5-mcrypt && php5enmod mcrypt && a2enmod rewrite && apt-get -y install php5-curl && service apache2 restart && mysql_secure_installation && apt-get -y install phpmyadmin && apt-get -y install screenfetch htop nload curl git ntp
You will be prompted to create a MySQL root password. PHPMyAdmin setup will ask you for this password, as will the MySQL Secure Installation tool.