Installation PHP, Apache, MySQL, PhpMyAdmin On Ubuntu

sudo apt-get update
sudo apt-get upgrade (optional)

MySQL
=====
sudo apt-get install mysql-server mysql-client

Apache
=====
sudo apt-get install apache2

PHP
===
sudo apt-get install php5 libapache2-mod-php5 php5-mysql

Restart Apache
===========
/etc/init.d/apache2 restart

PHPMyAdmin
==========
sudo apt-get install phpmyadmin

I don’t like to use Apache’s default http folder /var/www so I need to update the apache2.conf file:
sudo gedit /etc/apache2/apache2.conf

Changing the default location will require me to make sure phpMyAdmin continues to load on http://localhost/phpMyAdmin so at the end of the same file I ll add the virtual host configuration for phpMyAdmin
Include /etc/phpmyadmin/apache.conf

Restart Apache    
===========
/etc/init.d/apache2 restart

------------------------------------------------------------------------------------------------------------------------------------

Increase Upload Max File size and other configurations

sudo gedit /etc/php5/apache2/php.ini
upload_max_filesize 2M
sudo /etc/init.d/apache2 restart

------------------------------------------------------------------------------------------------------------------------------------

Clean URLs with Apache 2 on Ubuntu

sudo a2enmod rewrite
sudo apache2ctl -M

If you are running Ubuntu 14.04+:
sudo gedit /etc/apache2/apache2.conf
Otherwise:
sudo gedit /etc/apache2/sites-available/default

AllowOverride None to AllowOverride All
sudo /etc/init.d/apache2 reload

------------------------------------------------------------------------------------------------------------------------------------

Enable Curl

sudo apt-get install php5-curl & sudo /etc/init.d/apache2 restart

------------------------------------------------------------------------------------------------------------------------------------

Tags

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
14 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.