How to Install LAMP on Ubuntu

LAMP is an open source Web development platform that uses Linux as the operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language.

1. Update your system

First we are making sure you are up to date by running:

~$ sudo apt-get update -y && sudo apt-get upgrade -y

2. Installing Apache2

Now that we have the L in place, it’s time to install the A.

~$ sudo apt-get install apache2

You can verify if that worked by entering your server’s IP into a browser, you should see something along those lines:


3. Installing MySQL

~$ sudo apt-get install mysql-server

During the installation, you will be prompted to enter the MySQL root password. Make sure to write that down.

Now we are also going to secure our installation:

~$ sudo mysql_secure_installation

Enter the root password you entered before.

Now you get asked a couple of questions, answer as below:

Enter current password for root (enter for none): Enter your root password

Would you like to setup VALIDATE PASSWORD plugin? N

Change the password for root? [Y/n] N

Remove anonymous users? [Y/n] {ENTER}

Disallow root login remotely? [Y/n] {ENTER}

Remove test database and access to it? [Y/n] {ENTER}

Reload privilege tables now? [Y/n] {ENTER}

That’s it. Let’s continue with PHP.

 4. Installing PHP

And last but not least, the P.

For PHP we need to install slightly more, PHP with all it’s dependencies:

~$ sudo apt-get install php libapache2-mod-php php-mysql php-curl php-gd php-intl php-pear php-imagick php-imap php-mcrypt php-memcache php-pspell php-recode php-sqlite3 php-tidy php-xmlrpc php-xsl php-mbstring php-gettext

Let’s restart apache2:

~$ sudo /etc/init.d/apache2 restart

5. Testing the configuration and wrapping up

To test your configuration, we first need to create the phpinfo.php file.

~$ sudo nano /var/www/html/phpinfo.php

Paste the following text into it:

<?php phpinfo(); ?>

Save with CTRL+O and exit with CTRL+X.

If you  now open http://YOURSERVERIP/phpinfo.php in your web browser, you should see the PHP configuration page:



Oracle Java for Ubuntu and setting JDK for Netbeans

For those who want to install Oracle Java JDK to develop Java programs and applications (the Oracle Java JRE is also included in the Oracle JDK) use this method:

Open your terminal and type:

sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Setting as default JDK

sudo apt-get install oracle-java8-set-default

Setting the path globally:

type : sudo nano /etc/bash.bashrc  and add this line at the end of page.

export JAVA_HOME=/usr/lib/jvm/java-8-oracle

loading bash.bash.bashrc

source /etc/bash.bashrc

Now you have to configure Netbeans to use this JDK or run Netbeans with

cd /usr/local/netbeans-8.1/etc or /usr/share/netbeans/8.1/etc (this is for version 8.1)

sudo nano netbeans.conf and change the line netbeans_jdkhome=”/usr” as below


Xamarin Studio and SharpDevelop(#develop) – First View

Xamarin (Software company created in May 2011) Studio is an IDE with many features for creating iOS, Mac, Android and Windows applications. It includes a rich editor, debugging, native platform integration with iOS, Mac, Android and Windows apps and integrated source control to name just of few of its many features.

Xamarin has over 505,000 developers in more than 120 countries around the world as of February 2014.


SharpDevelop is free and lightweight alternative to Microsoft Visual Studio.