Category Archives: ubuntu

How to install Maven on Ubuntu?

In this tutorial, we will show you how to install Apache Maven 3 on Ubuntu 12.

1. Search Maven package

In a terminal, run apt-cache search maven, to get all the available Maven package.

$ apt-cache search maven
....
libxmlbeans-maven-plugin-java-doc - Documentation for Maven XMLBeans Plugin
maven - Java software project management and comprehension tool
maven-debian-helper - Helper tools for building Debian packages with Maven
maven2 - Java software project management and comprehension tool

The maven package always comes with latest Apache Maven.

2. Install it

Run command sudo apt-get install maven, to install the latest Apache Maven.

$ sudo apt-get install maven

It takes few minutes to download, patient.

3. Verification

Run command mvn -version to verify your installation.

$ mvn -version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_09, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.5.0-17-generic", arch: "amd64", family: "unix"

The Apache Maven is installed successfully.

Where is Maven installed?
The command apt-get install the Maven in /usr/share/maven.

$ls -ls /usr/share/maven
total 16
4 drwxr-xr-x 2 root root 4096 Dec 7 01:28 bin
4 drwxr-xr-x 2 root root 4096 Dec 7 01:28 boot
0 lrwxrwxrwx 1 root root 10 May 28 2012 conf -> /etc/maven
4 drwxr-xr-x 2 root root 4096 Dec 7 01:28 lib
4 drwxr-xr-x 2 root root 4096 Dec 7 01:28 man
 

The Maven configuration files are stored in /etc/maven

$ls -ls /etc/maven
total 16
4 -rw-r--r-- 1 root root 184 Jan 21 2012 m2.conf
12 -rw-r--r-- 1 root root 10224 Jan 21 2012 settings.xml
 

how to convert ip from dynamic to static in ubuntu?

Source From :-
http://www.unixmen.com/how-to-convert-my-ip-from-dynamic-to-static-in-ubuntu/

 1. First edit network interface using your favorite text editor/terminal :

    sudo vi /etc/network/interfaces
    sudo nano /etc/network/interfaces
    sudo gedit /etc/network/interfaces

Normally you  are  using   eth0  for  card  ethernet  you will see  some  thing  like  this :

    auto eth0
    iface eth0 inet dhcp

2. Remove line 2 and add:

    auto eth0
    iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

    save a and  exit

    192.168.1.100 suppose  to be  your  static  IP you can change it  to  the IP   you  want

    192.168.1.1 is  the  router  IP

Now we’ll need to add in the DNS settings by editing the resolv.conf file:

    sudo vi /etc/resolv.conf

and  add  the 2 ip adresss  of  your  DNS servers  ( internet provider)

3- remove dhcp client

In terminal, type the following command:

    sudo apt-get remove dhcp-client

4- Restart network

    sudo /etc/init.d/networking restart

Now you shloud have a static IP instead of dynamic one.

Is done.

First edit network interface using your favorite text editor :

sudo vi /etc/network/interfaces

Normally you  are  using   eth0  for  card  ethernet  you will see  some  thing  like  this :

auto eth0
iface eth0 inet dhcp

Remove line 2 and add:

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

save a and  exit
192.168.1.100 suppose  to be  your  static  IP you can change it  to  the IP   you  want
192.168.1.1 is  the  router  IP

Now we’ll need to add in the DNS settings by editing the resolv.conf file:

sudo vi /etc/resolv.conf

and  add  the 2 ip adresss  of  your  DNS servers  ( internet provider)
3- remove dhcp client
In terminal, type the following command:

sudo apt-get remove dhcp-client

4- Restart network

sudo /etc/init.d/networking restart

Now you shloud have a static IP instead of dynamic one.
Is done.
– See more at: http://www.unixmen.com/how-to-convert-my-ip-from-dynamic-to-static-in-ubuntu/#sthash.jV5JJv6s.dpuf

First edit network interface using your favorite text editor :

sudo vi /etc/network/interfaces

Normally you  are  using   eth0  for  card  ethernet  you will see  some  thing  like  this :

auto eth0
iface eth0 inet dhcp

Remove line 2 and add:

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

save a and  exit
192.168.1.100 suppose  to be  your  static  IP you can change it  to  the IP   you  want
192.168.1.1 is  the  router  IP

Now we’ll need to add in the DNS settings by editing the resolv.conf file:

sudo vi /etc/resolv.conf

and  add  the 2 ip adresss  of  your  DNS servers  ( internet provider)
3- remove dhcp client
In terminal, type the following command:

sudo apt-get remove dhcp-client

4- Restart network

sudo /etc/init.d/networking restart

Now you shloud have a static IP instead of dynamic one.
Is done.
– See more at: http://www.unixmen.com/how-to-convert-my-ip-from-dynamic-to-static-in-ubuntu/#sthash.jV5JJv6s.dpuf

First edit network interface using your favorite text editor :

sudo vi /etc/network/interfaces

Normally you  are  using   eth0  for  card  ethernet  you will see  some  thing  like  this :

auto eth0
iface eth0 inet dhcp

Remove line 2 and add:

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

save a and  exit
192.168.1.100 suppose  to be  your  static  IP you can change it  to  the IP   you  want
192.168.1.1 is  the  router  IP

Now we’ll need to add in the DNS settings by editing the resolv.conf file:

sudo vi /etc/resolv.conf

and  add  the 2 ip adresss  of  your  DNS servers  ( internet provider)
3- remove dhcp client
In terminal, type the following command:

sudo apt-get remove dhcp-client

4- Restart network

sudo /etc/init.d/networking restart

Now you shloud have a static IP instead of dynamic one.
Is done.
– See more at: http://www.unixmen.com/how-to-convert-my-ip-from-dynamic-to-static-in-ubuntu/#sthash.jV5JJv6s.dpuf

First edit network interface using your favorite text editor :

sudo vi /etc/network/interfaces

Normally you  are  using   eth0  for  card  ethernet  you will see  some  thing  like  this :

auto eth0
iface eth0 inet dhcp

Remove line 2 and add:

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

save a and  exit
192.168.1.100 suppose  to be  your  static  IP you can change it  to  the IP   you  want
192.168.1.1 is  the  router  IP

Now we’ll need to add in the DNS settings by editing the resolv.conf file:

sudo vi /etc/resolv.conf

and  add  the 2 ip adresss  of  your  DNS servers  ( internet provider)
3- remove dhcp client
In terminal, type the following command:

sudo apt-get remove dhcp-client

4- Restart network

sudo /etc/init.d/networking restart

Now you shloud have a static IP instead of dynamic one.
Is done.
– See more at: http://www.unixmen.com/how-to-convert-my-ip-from-dynamic-to-static-in-ubuntu/#sthash.jV5JJv6s.dpuf

How to install Balsamiq Mockups in Ubuntu?

Step 1 :

Copy the following code in a text file and save it as executable file. that is with .sh extension.
eg. balsamiq-installer.sh

#!/usr/bin/env bash
if [ $EUID != 0 ]; then
    “This script must be run with sudo”
    exit $?
fi

echo ”  Installing dependencies”
apt-get install ia32-libs -y # Note: This dep is a bit overkill but it’s useful anyway
ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0

echo ”  Downloading installers”
wget -P /tmp/ http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin
wget -P /tmp/ http://builds.balsamiq.com/b/mockups-desktop/MockupsForDesktop32bit.deb

echo ”  Installing AIR”
chmod +x /tmp/AdobeAIRInstaller.bin
/tmp/AdobeAIRInstaller.bin -silent -eulaAccepted
echo ”  Installing Balsamiq”
dpkg -i /tmp/MockupsForDesktop32bit.deb

Step 2 :
Give chmod 777 permission to the file.

*** For 64 bit machine, change the mockup deb file name from 32 to 64.