Install and setting up local webserver

Tuesday, August 16, 2011 0 Comments

Here is how to install and setting up webserver in Ubuntu (or its derivatives ie. Mint, Sabily, Blankon and so on):

  1. sudo apt-get install apache2 mysql-server php5 php5-xmlrpc php5-mysql php5-gd php5-cli php5-curl php5-common php5-mcrypt
  2. you could add phpmyadmin at the end of way #1 to install phpmyadmin from repository
  3. And done..
Now, let setting it up :D

First, we will enable mod_rewrite :
  1. sudo a2enmod rewrite
Second, still using Terminal, do the following steps :
  1. sudo gedit /etc/apache2/sites-enabled/000-default
  2. Change AllowOverride None -> AllowOverride All
  3. Save it
  4. Restart Apache by typing : sudo service apache2 restart
Third, installing phpmyadmin
  1. Get the installation file in phpmyadmin's Download Page
  2. Extract inside /var/www
  3. By reading the documentation should be enough. But, here I give you my config.inc.php file
<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 3.4.0 setup script
 * Date: Tue, 16 Aug 2011 02:11:42 +0700
 */
/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['nopassword'] = true;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['CountTables'] = true;
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
/* End of servers configuration */
$cfg['blowfish_secret'] = '4e496f5db8be03.04479396';
$cfg['DefaultLang'] = 'en';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>

Or, you could see it in better / nice way thru http://pastebin.com/6h9JYt6a

-------
Update on November 10, 2012
You could also add phpmyadmin to install phpmyadmin from the repository. Or just type sudo apt-get install phpmyadmin. I've edited the post above

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Do you think I forgot to change this text? No, dude. I did it on purpose ahahahay..