This tutorial shows how to prepare a Debian Wheezy web server. This is just a simple setup of basic web server. I myself did it to set up a development environment for myself.
Make sure the system is up-to-date:
Source code viewer
apt-get update && apt-get upgrade -yProgramming Language: Bash
Install Web Server
First install the web server, add it to system start-up and start it up.Now, the Apache web server is installed and started. Its default page is accessible at localhost or 127.0.0.1.Source code viewer
apt-get install apache2 update-rc.d apache2 enable service apache2 startProgramming Language: Bash
PHP5, Apache PHP5 module and MySQL PHP module.
Next, we install PHP5, Apache PHP5 module and MySQL php module. Also restart apache2 so that the fresh installations work.Source code viewer
apt-get install php5 libapache2-mod-php5 php5-mysql service apache2 restartProgramming Language: Bash
Test PHP support
Test PHP support by creating an index.php file inside the web servers default document root '/var/www/', with the following contents.Source code viewer
<?phpProgramming Language: PHP
MariaDB
After a successful PHP is installation, our next step is adding mariadb repository and install MariaDB database server.Follow the on-screen instructions to set up a root password for the Mariadb server.Source code viewer
apt-get install python-software-properties apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db add-apt-repository 'deb http://mirror.stshosting.co.uk/mariadb/repo/10.0/debian wheezy main' apt-get update apt-get install mariadb-serverProgramming Language: Bash
phpmyadman
Optionally you can install phpmyadman for easy database access.1. Web server to reconfigure automatically: answer 'apache2'.Source code viewer
apt-get install phpmyadminProgramming Language: Bash
2. Configure database for phpmyadmin with dbconfig-common? – answer ‘NO’.