jeudi 13 novembre 2014

How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?

The Script way


If you're on a fresh installation of Ubuntu with no previous Java installations, this script automates the process outlined above if you don't want to type all that into a console. Remember, you still need to download Java from Oracle's website -- Oracle's links are not wget friendly.
Before using this make sure that this script is in the same directory as the .tar.gz file extension that you downloaded and there are no files that start with jdk-7 in the same folder. If there are, please move them out of the folder temporarily. Remember to make the script executable (chmod +x <script's file>).
#!/bin/sh

tar -xvf jdk1.8*  #Change by the you downloaded from oracle
sudo mkdir /usr/lib/jvm
sudo mv ./jdk1.7* /usr/lib/jvm/jdk1.7.0
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdkx.y.z/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdkx.y.z/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdkx.y.z/bin/javaws" 1
sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
sudo chmod a+x /usr/bin/javaws
If you want to install the plugin for Firefox then add this to the end of the script:
mkdir ~/.mozilla/plugins
ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
sudo /etc/init.d/apparmor restart

mardi 23 septembre 2014

How to Enable DVD Playback in Ubuntu 14.04

Thanks to the open-source software libdvdread, it provides the library to read DVDs in Ubuntu Linux.
To install it, open Ubuntu Software Center and search for and install the packagelibdvdread4 and libdvdnav4.
install libdvdread4 library to read DVD
After that, press Ctrl+Alt+T on keyboard to open the terminal. When it opens, run:
sudo /usr/share/doc/libdvdread4/install-css.sh
This script will allow you to play encrypted DVDs in Ubuntu.
UPDATE: Since Medibuntu is no longer available, you have to install libdvdcss2 repository manually. Download it from the link below:
Once installed, you’ll be able to playback and navigate DVD menus in most video applications, including the default Totem and VLC.

lundi 12 mai 2014

10 Useful “IP” Commands to Configure Network Interfaces

review how we can assign Static IP AddressStatic RouteDefault Gateway etc.  Assigning IP Address on demand using IP command. IFCONFIG command is deprecated and replaced by IP command in Linux.

http://www.tecmint.com/ip-command-examples/

jeudi 8 mai 2014

Easy network traffic shaping on your ubuntu system (debian/Ubuntu)



Traffic shaping on Linux system used to require knowledge of lot of things like iptables, qdiscs & networking protocols. Things have changed and now there are couple of tools which handle all of this complexity without requiring much knowledge. And one of them is wondershaper.

First install wondershaper by issuing following command. sudo apt-get -y install wondershaper


Use following command template to make it work right away.

sudo wondershaper <interface name> <down speed> <up speed>


Where interface name is your network interface name like eth0 or eth1 or wifi0 and down speed , up speed are self explanatory and specified in kilo bits per second.

So sample command will look like

sudo wondershaper eth0 512 512


To disable wondershaper from controlling particular interface use following command. sudo wondershaper clear <interface name>


To make these changes permanent add following lines to /etc/network/interfaces under relevant interface section. up /sbin/wondershaper <interface name> <downspeed> <upspeed> down /sbin/wondershaper clear <interface name>


Thats it, From now on all sensitive traffic like your voip, HTTP, SSH will get prioritied while heavy traffic like bit torrent will not be prioritized. This is not a perfect tool for the job but simple enough to be used by newbies.

mercredi 8 janvier 2014

Bash scripting Tutorial

This bash script tutorial assumes no previous knowledge of bash scripting.As you will soon discover in this quick comprehensive bash scripting guide, learning the bash shell scripting is very easy task.

http://linuxconfig.org/bash-scripting-tutorial