Monday, October 31, 2016

Installing and running the docker daemon remotely.

Step-1: Installing the Docker
         sudo apt-get install docker.io
After installing, docker will start running automatically.
Step -2: Stoping the docker
         sudo service docker stop

Step-3: configuring the docker
  
sudo docker -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock -d &
This will make the docker daemon to listen through unix socket and the TCP port


Now access the docker daemon 
example-1
  docker -H=tcp://120.126.17.39:2375 run ubuntu


example-2
   docker run ubuntu

example-3
  docker -H=tcp://120.126.17.39:2375 ps -a


example-4
    docker ps -a


For uninstalling use following command
  sudo apt-get purge --auto-remove docker.io
 



When docker-engine is install, I found the command is slightly different from the previous one.
To install docker-engine:  [src]
        sudo apt-get install docker-engine
Stop the docker:
        sudo service docker stop
Following command will enable the docker to listen using both Linux socket and tcp:
          sudo dockerd -H unix:///var/run/docker.sock H tcp://0.0.0.0:2375
Now to access docker daemon:
          sudo docker -H tcp://0.0.0.0:2375 
                 or 
          sudo docker -H tcp://120.126.16.34:2375

tcp://120.126.16.34:2375 is the IP of the daemon host. The IP of daemon host can be different based on your configuration.

Thursday, October 27, 2016

Which port is opened in my Linux system ?

netstat command can be used to know all ports opened currently.

command 

netstat  <option>

option:
-a                              short form of '--all'
-t or --tcp                  for tcp connection
-u or --udp                for udp connection
-n                              for numeric presentation

Example

netstat -atn                     for all tcp connection
netstat -aun                    for all udp connection

netstat -ltn                     for all ACTIVE tcp connections
netstat -lun                     for all ACTIVE udp connections

Friday, October 21, 2016

Uninstalling Docker-engine from Ubuntu 14.04

Completely Uninstalling Docker-engine including Configuration data and other dependencies

        sudo apt-get purge --auto-remove docker-engine

Uninstalling Docker and its dependencies

        sudo apt-get remove --auto-remove docker-engine

Uninstalling Docker and its configuration data

        sudo apt-get purge docker-engine

Uninstalling only Docker

        sudo apt-get remove docker-engine

Thursday, October 20, 2016

Accessing remote printer [Fuji Xerox DocuPrint m215b]

In this post we will see, how to access a shared remote printer. Below picture describes the concern environment.


Let's say you as the user want to access the printer attached to another computer which is connected to internet. Its assume that the printer is already shared. So this post is all about configuring the user's computer to access the remote printer.

Environment :

OS: Windows 8 (The steps may vary slightly in other versions of Windows)
Printer Driver: In this demonstration Fuji Xerox DocuPrint m215b is used.
                           Driver for Windows 64bit  OS
                            (Compatible OS: Windows 7, Windows 10, Windows Server 2003, Windows Server 2003 64bit, Windows Vista, Windows Vista 64bit, Windows Server 2008, Windows Server 2008 64bit, Windows Server 2008 R2, Windows 7 64bit, Windows 8, Windows 8 64bit, Windows 8.1, Windows 8.1 64bit, Windows Server 2012, Windows Server 2012 R2, Windows 10 64bit )
                             (Click here to download the driver from official website)



 Driver Installation steps



Step1:  Download the Printer driver
Step 2: Now extract the content of the downloaded driver. Open the newly created Folder.

Step 3: Right click on the application and click on "Run As Administrator"

Step 4: Click on Unzip

Step 5: Now you will see another folder. Now close the dialog box and open the newly created folder.

Step 6 :  Now run the "install" application by double clicking on it.

Step 7:  Select "Personal installation" radio button and click on next button.

Step 8:  Click on "next" button after accepting the license agreement.

Step 9: Now wait for few mins

Step 10 : Click on "Finish" button to finish the installation process.




Adding Remote printer



Step 1: Open the control panel, and click on "Devices and Printers"

Step 2:  Click on "Add a printer"

Step 3:  Wait for auto search. Or you can click on "The printer that I want isn't listed"

Step 4:  Give the printer name (including computer name) and click on "Next" button.

Step 5:  You must see the printer name. Click on "Next" button.

Step 6: Click on "Print a test page" to check the accessibility of the printer. click "Finish" button to finish the configuration process.


That's all for now...Please comment if you encounter any problem.

-Thank you





Thursday, October 6, 2016

Installing OpenCV and Python in Windows


1. Download and install Python 2.7.x in windows
             windows install : http://python.org/ftp/python/2.7.5/python-2.7.5.msi
2.  The default installation directory C:\Python27


3. Download and install python package manager pip if NOT installed
                  A. Download get-pip.py script from  https://bootstrap.pypa.io/get-pip.py
                  B. Open command prompt
                  C. Enter following command to run the downloaded script
                                    python <path to get-pip.py file>

4.  Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/ to download and install python packages

5.  Now, Download Numpy python package (choose the .whl file based on your requirement)
                  A. Open command prompt
                  B. Go to the local directory where numpy-1.11.2+mkl*.whl file is present
                  C. Enter following command to Install Numpy
                                    pip install numpy-1.11.2*.whl
6. You can repeat Step-5 to install other required packages


7. Download and install OpenCV
                  A. Folllow the link to download OpenCV-3.1.0
                  B. Open the .exe file to install (in C drive)
                  C. Goto C:\opencv\build\python
                  D. Copy cv2.d to C:\Python27\Lib\site-packages

Please comment if you encounter any error....

-Thank you