Wednesday, February 28, 2018

how to install Java SE Development Kit 8 ubuntu 14.04

ubuntu 14.04 Java SE Development Kit 8
Java SE Development Kit 8u102


This command will completely remove OpenJDK/JRE from your system
sudo apt-get purge openjdk-\*

This command will create a directory to hold your Oracle Java JDK and JRE binaries.
sudo mkdir -p /usr/local/java


Download the Oracle Java JDK/JRE for Linux. Make sure you select the correct compressed binaries for your system architecture 32-bit or 64-bit (which end in tar.gz).
Select
Linux x64    172.95 MB      jdk-8u102-linux-x64.tar.gz


Copy the Oracle Java binaries into the /usr/local/java directory.
sudo cp -r jdk-8u102-linux-x64.tar.gz /usr/local/java

Unpack the compressed Java binaries, in the directory /usr/local/java
sudo tar xvzf jdk-8u102-linux-x64.tar.gz


Edit the system PATH file /etc/profile and add the following system variables to your system path


Scroll down to the end of the file using your arrow keys and add the following lines below to the end of your /etc/profile file:

JAVA_HOME=/usr/local/java/jdk1.8.0_102
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH


Inform your Ubuntu Linux system where your Oracle Java JDK/JRE is located.
If you are installing the JDK then Type/Copy/Paste:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_102/jre/bin/java" 1

Only if you are installing the JDK then Type/Copy/Paste:
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_102/bin/javac" 1



Inform your Ubuntu Linux system that Oracle Java JDK/JRE must be the default Java.
If you are installing the JDK then Type/Copy/Paste:
sudo update-alternatives --set java /usr/local/java/jdk1.8.0_102/jre/bin/java
If you are installing the JDK then Type/Copy/Paste:
sudo update-alternatives --set javaws /usr/local/java/jdk1.8.0_102/bin/javaws

test jdk installation
http://www.javatester.org

java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)


64-bit Oracle Java instructions
To enable your Java plug-in in your web browsers you must make a symbolic link from the web browsers plug-in directory to the location of the Java plug-in included in your distribution of Oracle Java.

cd /usr/lib/firefox-addons/plugins/
sudo ln -s /usr/local/java/jdk1.8.0_102/jre/lib/amd64/libnpjp2.so

oracle java control panel to add website in exception list
/usr/local/java/jdk1.8.0_102/bin/ControlPanel

how to install docker Ubuntu Xenial 16.04 (LTS)

install Docker Community Edition (Docker CE) on Ubuntu  Xenial 16.04 (LTS)

 To install Docker CE, you need the 64-bit version

 Uninstall old versions
 sudo apt-get remove docker docker-engine docker.io
 The contents of /var/lib/docker/

 The Docker CE package is now called docker-ce.

 Some users download the DEB package
 Most users set up Docker’s repositories and install from them, for ease of installation and upgrade tasks. This is the recommended approach.
 Some users download the DEB package and install it manually and manage upgrades completely manually. This is useful in situations such as installing Docker on air-gapped systems with no access to the internet.
 In testing and development environments, some users choose to use automated convenience scripts to install Docker.

Update the apt package index
$sudo apt-get update

Requirements

$sudo apt-get install apt-transport-https
$sudo apt-get install ca-certificates
$sudo apt-get install curl
$sudo apt-get install software-properties-common

Add Docker’s official GPG key
$curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Verify  key
$sudo apt-key fingerprint 0EBFCD88

set up the stable repository
$sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Update the apt package index
$sudo apt-get update

Install the latest version of Docker CE
$sudo apt-get install docker-ce

$docker version

OS requirements
To install Docker CE, you need the 64-bit version of one of these Ubuntu versions:
    Zesty 17.04
    Xenial 16.04 (LTS)
    Trusty 14.04 (LTS)

Verify old versions are removed.
$sudo apt-get remove docker docker-engine docker.io

how to install Java SE Development Kit 8 ubuntu 15.10

ubuntu 14.04 Java SE Development Kit 8
Java SE Development Kit 8u102


This command will completely remove OpenJDK/JRE from your system
sudo apt-get purge openjdk-\* 

This command will create a directory to hold your Oracle Java JDK and JRE binaries.
sudo mkdir -p /usr/local/java 


Download the Oracle Java JDK/JRE for Linux. Make sure you select the correct compressed binaries for your system architecture 32-bit or 64-bit (which end in tar.gz). 
Select
Linux x64    172.95 MB      jdk-8u102-linux-x64.tar.gz


Copy the Oracle Java binaries into the /usr/local/java directory.
sudo cp -r jdk-8u102-linux-x64.tar.gz /usr/local/java

Unpack the compressed Java binaries, in the directory /usr/local/java 
sudo tar xvzf jdk-8u102-linux-x64.tar.gz


Edit the system PATH file /etc/profile and add the following system variables to your system path


Scroll down to the end of the file using your arrow keys and add the following lines below to the end of your /etc/profile file:

JAVA_HOME=/usr/local/java/jdk1.8.0_102
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH


Inform your Ubuntu Linux system where your Oracle Java JDK/JRE is located. 
If you are installing the JDK then Type/Copy/Paste: 
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_102/jre/bin/java" 1

Only if you are installing the JDK then Type/Copy/Paste: 
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_102/bin/javac" 1 



Inform your Ubuntu Linux system that Oracle Java JDK/JRE must be the default Java.
If you are installing the JDK then Type/Copy/Paste: 
sudo update-alternatives --set java /usr/local/java/jdk1.8.0_102/jre/bin/java
If you are installing the JDK then Type/Copy/Paste: 
sudo update-alternatives --set javaws /usr/local/java/jdk1.8.0_102/bin/javaws

test jdk installation
http://www.javatester.org

java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)


64-bit Oracle Java instructions
To enable your Java plug-in in your web browsers you must make a symbolic link from the web browsers plug-in directory to the location of the Java plug-in included in your distribution of Oracle Java.

cd /usr/lib/firefox-addons/plugins/
sudo ln -s /usr/local/java/jdk1.8.0_102/jre/lib/amd64/libnpjp2.so

oracle java control panel to add website in exception list
/usr/local/java/jdk1.8.0_102/bin/ControlPanel

how to reset root password

  • How to reset ESXi 5.x root password 

https://www.youtube.com/watch?v=Nehxe8j9lgg



  • Ubuntu 12.04, 14.04, 15.10 - Forgot Login Password? Change/Create New One. 

https://www.youtube.com/watch?v=qGpvCZO2oOc



  • Changing a forgotten root password on an ESX/ESXi host (1317898)

This article provides steps to reset a lost or forgotten root password of an ESX/ESXi host.If you have forgotten or do not know the password for the root user on an ESX host, you may be able to change it without reinstalling.Reinstalling the ESXi host is the only supported way to reset a password on ESXi.ESXi does not have a service console and as such traditional Linux methods of resetting a password, such as single-user mode.
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1317898




  • Alternate Root Shell Method 

All it takes is adjusting the boot parameters slightly and typing a command or two,
http://www.howtogeek.com/howto/linux/reset-your-forgotten-ubuntu-password-in-2-minutes-or-less



  • Linux İşletim Sistemlerinde “root” Parolası Sıfırlama Yapılandırması

http://www.koraykey.com/?p=4988

holla el mundo ruby script

@ubuntu:~/ruby_scripts$ vi a.rb

#!/usr/bin/env ruby

puts "holla el mundo"

# the very first ruby script


@ubuntu:~/ruby_scripts$ ruby a.rb
holla el mundo

how to ubuntu 12.04 desktop on vmplayer 5.x

  • Root User Problem
By default, the Root account password is locked in Ubuntu.
This means that you cannot login as Root directly or use the su command to become the Root user. 
since the Root account physically exists it is still possible to run programs with root-level privileges.
This is where sudo comes in - it allows authorized users (normally "Administrative" users) to run certain programs as Root without having to know the root password.
This means that in the terminal you should use sudo for commands that require root privileges; simply prepend sudo to all the commands you would normally run as Root
  • Enable Disable Root account
To enable the Root account (i.e. set a password) use:
sudo passwd root
Re-disabling your root account
sudo passwd -dl root
  • To download packages , use aptitude
sudo aptitude install g++ 
https://help.ubuntu.com/community/RootSudo

  • how to convert .deb to .rpm package
The "alien" tool can convert rpm to deb

  • to install .deb package
sudo dpkg -i package.deb

  • to list installed packages
"dpkg --get-selections" which will give us a list of all the currently installed packages.
  •  to install source package
gunzip mysql-5.5.27-linux2.6-i686.tar.gz 
tar xfv mysql-5.5.27-linux2.6-i686.tar
  • to install mysql server
sudo aptitude install mysql-server 
sudo aptitude install mysql-workbench



  • to enable shared folder on windows 7 host



Virtual Machine settings
Folder sharing = Always Enabled

you can list shared folder under  /mnt/hgfs/ directory

how to install python on ubuntu 12.04

  • download source code from www.python.org
platform: ubuntu 12.04
Python-2.7.3.tgz

./configure
make
sudo make altinstall

it's installed under directories below
/usr/local/bin/
/usr/bin/


on the terminal type "python"

yeniceri@ubuntu:~/Desktop/Python-2.7.3$ python
Python 2.7.3 (default, Aug 30 2012, 05:57:53)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Use quit() or Ctrl-D (i.e. EOF) to exit


first hello world code, child is born


>>> print "holla el mundo"
holla el mundo