Apache+MySQL+PHP on Linux (via apt-get)


It’s time to install web-server. Apache, as you know, my favorite! I like Debian Linux with apt package manager.
Here must be simple.

1. Install Apache:

sudo apt-get install apache2

2. Configure Apache:
a) set ServerName:

ServerName localhost

b) set vhost:

<VirtualHost *:80>
 DocumentRoot /var/www/fte
 ServerName fte.com
 ServerAlias *.fte.com
</VirtualHost>

3. Install MySQL server:

apt-get install mysql-server mysql-client

4. Install MySQL+PHP:

sudo apt-get install php5-common php5 libapache2-mod-php5 php5-cli php5-cgi php5-mysql

5. Restart Apache:

sudo /etc/init.d/apache2 restart

6. Install phpmyadmin

sudo apt-get install phpmyadmin

Good job!