Ramin Hossaini

Ubuntu: Installing Apache, PHP 5, and MySQL 5

Jun
01

Apache

sudo apt-get install apache2

Locations:

  • HTML directory: /var/www
  • Apache2 conf: /etc/apache2/apache2.conf

PHP 5

Install PHP, and also enable the PHP and Rewrite module in Apache:

sudo apt-get install php5
sudo a2enmod php5
sudo a2enmod rewrite

Locations:

  • php.ini: /etc/php5/apache2/php.ini

MySQL 5

sudo apt-get install mysql-server
sudo apt-get install php5-mysql

Restart Apache

sudo /etc/init.d/apache2 restart

Leave a Reply

Your email address will not be published. Required fields are marked *