InstallĀ Aptitude command following aptitude update command
#apt-get install aptitude
Up-to-date and upgrade the system to current version
#aptitude update && aptitude safe-upgrade
Or update Debian system with apt-get command
#apt-get update && apt-get upgrade
Install Apache
#apt-get install apache2
Install mysql server
#apt-get install mysql-server
Finish up by running the MySQL set up script:
#mysql_secure_installation
Install PHP
#apt-get install php5 && apt-get install php-pear && apt-get install php5-mysql && apt-get install php5-gd
Finish up by restarting apache:
#service apache2 restart
ErrorĀ
Could not reliably determine the server’s fully qualified ***. Solved by Add ServerName localhost at /etc/apache2/apache2.conf at end of line
ServerName localhost
Enable and load mod_rewrite Apache2 on Debian 8
#a2enmod rewrite
Then open and edit /etc/apache2/apache2.conf find
Options Indexes FollowSymLinks AllowOverride All Require all granted
Replace “AllowOverride None” to “AllowOverride all”
Enable Apache2 mod_headers & mod_expires on
To increase PageSpeed: Leverage browser caching.
enable mod_headers:
#a2enmod headers Enabling module headers To activate the new configuration, you need to run: service apache2 restart
enable mod_expires:
#a2enmod expires Enabling module expires To activate the new configuration, you need to run: service apache2 restart
Then restart Apache server to make these changes effective
#service apache2 restart