Posts Tagged ‘ppa’

How to install Java Virtual Machine on Debian 7 GNU / Linux

Wednesday, July 23rd, 2014

install-java-on-debian-gnu-linux-logo
Debian 7 stable as most stable Debian releases includes custom Open Source Oracle Java Virtual Machine version called IcedTea OpenJDK, just like with sun's proprietary java, open sourced icedtea fork is made of two components:
 

JREJava Runtime Environment

and

 

JDKJava Development Kit).


1. installing OpenJDK Open Source Java Virtual Machine on Debian GNU / Linux

openjdk_java_open_source_virtual_machine_linux-logo
The default meta-package for install java-jre is default-jre meta package which by default on Debian Wheezy points to openjdk:

 

 

apt-cache depends default-jdk
default-jdk
  Depends: default-jre
  Depends: openjdk-6-jdk

If you want to install default Open Source Java Debian package implementation run:
 

apt-get –yes install default-jre

apt-get –yes install default-jdk


2. Installing Oracle Java VM 7 on Debian / Ubuntu Linux and deb derivatives
/images/oracle_java_logo-linux-install-debian
Also it is possible to install Oracle Java 7 from binary via apt-get by adding a custom Ubuntu repository containing deb Oracle proprietary java install package called oracle-java7-installer:
 

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys EEA14886
apt-get update
apt-get install –yes oracle-java7-installer


 Above apt-get command can be used also to install Oracle Sun Java on Ubuntu Linux and other Debian derivatives, for example you can install it like this on Linux Mint and rest of deb based Desktop oriented Linuces …

installing-java-debian-7-linux-install-oracle-java-7-screenshot-1

installing-java-debian-7-linux-install-oracle-java-7-screenshot-2

If you already have the openjdk installed together with oracle java jdk, to make oracle jdk the default Virtual Machine install also oracle-java7-set-default:

apt-get install oracle-java7-set-default


3. Installing Oracle Java 8 the debian way on Debian and Ubuntu Linux

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv –keyserver keyserver.ubuntu.com –recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer


4. Install Oracle Proprietary Java on Debian Linux using any version from Oracle website

As some written software requires custom ex-SUN Microsystems and currently owned by Oracle Java proprietary non-free binaries to install them on Debian Linux 7, there is a way to download any sun java jdk version, create .deb package and install the package with dpkg.

Here is how:

a.) Install java-package meta-package

apt-get –yes install java-package

 

Building dependency tree       
Reading state information… Done
The following extra packages will be installed:
  autopoint debhelper gettext git git-man html2text intltool-debian liberror-perl libgettextpo0 libmail-sendmail-perl libsys-hostname-long-perl po-debconf rsync
Suggested packages:
  dh-make gettext-doc git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn git-email git-gui gitk gitweb libmail-box-perl
The following NEW packages will be installed:
  autopoint debhelper gettext git git-man html2text intltool-debian java-package liberror-perl libgettextpo0 libmail-sendmail-perl libsys-hostname-long-perl po-debconf rsync
0 upgraded, 14 newly installed, 0 to remove and 112 not upgraded.
Need to get 11.8 MB of archives.
After this operation, 24.7 MB of additional disk space will be used.

b.) Download your desiresd Oracle Java version


Then according to your Debian Linux platform install (32-bit x86 or 64-bit amd64) go in a browser to:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Accept the agreement and download latest Java release, if you need to install some specific Oracle Java version check out there Old Java download versions (archives) page

Note that in order to download, either you will need some text-browser like elinks or you will need to have a GUI environment with IceWeasel / Epiphany etc. If you're already using the Linux as a desktop environment with GNOME and you used IceWeasel to download java jdk it will be downloaded into /tmp

cd /tmp
make-jpkg <downloaded_jdk_file>

Install the binary package created:

dpkg -i oracle-j2sdk1.7_1.7.0+update44_amd64.deb

Enjoy 🙂

How to add repository manually from command line in Ubuntu Linux

Sunday, January 8th, 2012

I'm on a way trying to install Free Mega Games Pack and I'm facing troubles in following the instructions to add a the latest development wine version described on http://www.winehq.org/download/ubuntu
The guys from WineHQ has to update the wine install instructions, since the instructions are targetting older versions of Ubuntu which are not compatible with newer Ubuntus which comes natively with Unity
In order to complete the step in adding the WineHQ Ubuntu PPA development repository my only way was to add it using command line.
Here is how:

root@ubuntu:~# apt-add-repository ppa:ubuntu-wine/ppa
You are about to add the following PPA to your system:
Latest official WineHQ releases
Welcome to the Wine Team PPA. Here you can get the latest available Wine betas for every supported version of Ubuntu. This PPA is managed by Scott Ritchie, and is a replacement for the WineHQ budgetdedicated.com repository used for Jaunty and earlier.
More info: https://launchpad.net/~ubuntu-wine/+archive/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.bvo21sFWKG --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 883E8688397576B6C509DF495A9A06AEF9CB8DB0
gpg: requesting key F9CB8DB0 from hkp server keyserver.ubuntu.com
gpg: key F9CB8DB0: public key "Launchpad PPA for Ubuntu Wine Team" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)

Similarly adding a PPA repository on Debian is also possible by using a little shell script add-apt-repository.sh . add-apt-repository.sh simulates what ubuntu's apt-add-repositry python script does.

It is educative to mention PPA stands for (Personal package Archive) and the difference between normal repository and PPA is mainly in the fact that PPA repositories makes a package distributed by the repository like the native Ubuntu packages issued by Canonical.
Once for example a new version of a file is placed in PPA deb package repository, the newer package will be automatically installed to the system using it.