Wednesday, 11 October 2017

VM - Development Guide


Install packages:-
==========


sudo apt-get update
sudo apt-get install
sudo apt-get install curl
sudo apt-get install default-jre


Java Installation & Managing Java:-
=====================

There can be multiple Java installations on one server. You can configure which version is the default for use in the command line by using update-alternatives, which manages which symbolic links are used for different commands.

sudo update-alernatives --config java  -> this lists out all the installed java's, so that we can chose among them which one to use

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

sudo apt-get install oracle-java8-installer  - Oracle JDK8
sudo apt-get install oracle-java9-installer  - Oracle JDK9

  
set JAVA_HOME env in /etc/environment
sudo gedit /etc/environment - save
to make it effect -> soure /etc/environment
check echo $JAVA_HOME -> Now should be able to see

Docker Installation:-
============
Docker is available in two editions: Community Edition (CE) and Enterprise Edition (EE).

Docker Community Edition (CE) is ideal for developers and small teams looking to get started with Docker and experimenting with container-based apps. Docker CE has two update channels, stable and edge:

Stable gives you reliable updates every quarter
Edge gives you new features every month

For more information about Docker CE, see Docker Community Edition.

Docker Enterprise Edition (EE) is designed for enterprise development and IT teams who build, ship, and run business critical applications in production at scale. For more information about Docker EE, including purchasing options, see Docker Enterprise Edition.

Set up the repository

    Update the apt package index:

    $ sudo apt-get update

    Install packages to allow apt to use a repository over HTTPS:

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

    Add Docker’s official GPG key:

    $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

    Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.

    $ sudo apt-key fingerprint 0EBFCD88

  
 [ Use the following command to set up the stable repository. You always need the stable repository, even if you want to install builds from the edge or test repositories as well. To add the edge or test repository, add the word edge or test (or both) after the word stable in the commands below.

    Note: The lsb_release -cs sub-command below returns the name of your Ubuntu distribution, such as xenial. Sometimes, in a distribution like Linux Mint, you might have to change $(lsb_release -cs) to your parent Ubuntu distribution. For example, if you are using Linux Mint Rafaela, you could use trusty.

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


  
   Install Docker CE

    Update the apt package index.

     sudo apt-get update

    Install the latest version of Docker CE, or go to the next step to install a specific version. Any existing installation of Docker is replaced.

     sudo apt-get install docker-ce ] OR 

[

Install docker engine from
https://apt.dockerproject.org/repo/pool/testing/d/docker-engine/ 
And, run following commands

sudo dpkg -i /path/to/package.deb

To make sure it was installed, just type:
sudo docker run hello-world

]

sudo docker login
sudo docker run hello-world
sudo docker ps
sudo docker ps -a
sudo docker build -t aai-resources .
sudo docker run -td aai-resources
sudo docker exec -t -i <container_id> /bin/bash
sudo docker logs aai-resources



No comments:

Post a Comment